From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>, <lucas.demarchi@intel.com>
Subject: Re: [PATCH 2/6] drm/i915/pcode: add struct drm_device based interface
Date: Mon, 16 Jun 2025 16:45:36 -0400 [thread overview]
Message-ID: <aFCCcHzOX7JqXE7q@intel.com> (raw)
In-Reply-To: <a40c9d61b47e4b0ebfb00c7244398d4daaecca3d.1749119274.git.jani.nikula@intel.com>
On Thu, Jun 05, 2025 at 01:29:34PM +0300, Jani Nikula wrote:
> In preparation for dropping the dependency on struct intel_uncore from
> display code, add a struct drm_device based interface to pcode.
>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/intel_pcode.c | 24 ++++++++++++++++++++++++
> drivers/gpu/drm/i915/intel_pcode.h | 10 ++++++++++
> 2 files changed, 34 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_pcode.c b/drivers/gpu/drm/i915/intel_pcode.c
> index b7e9b4ee1425..81da75108c60 100644
> --- a/drivers/gpu/drm/i915/intel_pcode.c
> +++ b/drivers/gpu/drm/i915/intel_pcode.c
> @@ -272,3 +272,27 @@ int snb_pcode_write_p(struct intel_uncore *uncore, u32 mbcmd, u32 p1, u32 p2, u3
>
> return err;
> }
> +
> +/* Helpers with drm device */
> +int intel_pcode_read(struct drm_device *drm, u32 mbox, u32 *val, u32 *val1)
> +{
> + struct drm_i915_private *i915 = to_i915(drm);
> +
> + return snb_pcode_read(&i915->uncore, mbox, val, val1);
> +}
> +
> +int intel_pcode_write_timeout(struct drm_device *drm, u32 mbox, u32 val, int timeout_ms)
> +{
> + struct drm_i915_private *i915 = to_i915(drm);
> +
> + return snb_pcode_write_timeout(&i915->uncore, mbox, val, timeout_ms);
> +}
> +
> +int intel_pcode_request(struct drm_device *drm, u32 mbox, u32 request,
> + u32 reply_mask, u32 reply, int timeout_base_ms)
> +{
> + struct drm_i915_private *i915 = to_i915(drm);
> +
> + return skl_pcode_request(&i915->uncore, mbox, request, reply_mask, reply,
> + timeout_base_ms);
> +}
> diff --git a/drivers/gpu/drm/i915/intel_pcode.h b/drivers/gpu/drm/i915/intel_pcode.h
> index 401ce27f72d4..c91a821a88d4 100644
> --- a/drivers/gpu/drm/i915/intel_pcode.h
> +++ b/drivers/gpu/drm/i915/intel_pcode.h
> @@ -8,6 +8,7 @@
>
> #include <linux/types.h>
>
> +struct drm_device;
> struct intel_uncore;
>
> int snb_pcode_read(struct intel_uncore *uncore, u32 mbox, u32 *val, u32 *val1);
> @@ -26,4 +27,13 @@ int intel_pcode_init(struct intel_uncore *uncore);
> int snb_pcode_read_p(struct intel_uncore *uncore, u32 mbcmd, u32 p1, u32 p2, u32 *val);
> int snb_pcode_write_p(struct intel_uncore *uncore, u32 mbcmd, u32 p1, u32 p2, u32 val);
>
> +/* Helpers with drm device */
> +int intel_pcode_read(struct drm_device *drm, u32 mbox, u32 *val, u32 *val1);
> +int intel_pcode_write_timeout(struct drm_device *drm, u32 mbox, u32 val, int timeout_ms);
> +#define intel_pcode_write(drm, mbox, val) \
> + intel_pcode_write_timeout((drm), (mbox), (val), 1)
> +
> +int intel_pcode_request(struct drm_device *drm, u32 mbox, u32 request,
> + u32 reply_mask, u32 reply, int timeout_base_ms);
> +
> #endif /* _INTEL_PCODE_H */
> --
> 2.39.5
>
next prev parent reply other threads:[~2025-06-16 20:45 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 10:29 [PATCH 0/6] drm/i915, drm/xe: add drm device based pcode interface for display Jani Nikula
2025-06-05 10:29 ` [PATCH 1/6] drm/i915/pcode: drop fast wait from snb_pcode_write_timeout() Jani Nikula
2025-06-16 20:41 ` Rodrigo Vivi
2025-06-16 20:48 ` Rodrigo Vivi
2025-06-16 20:48 ` Rodrigo Vivi
2025-06-05 10:29 ` [PATCH 2/6] drm/i915/pcode: add struct drm_device based interface Jani Nikula
2025-06-16 20:45 ` Rodrigo Vivi [this message]
2025-06-05 10:29 ` [PATCH 3/6] drm/xe/pcode: " Jani Nikula
2025-06-16 20:44 ` Rodrigo Vivi
2025-06-05 10:29 ` [PATCH 4/6] drm/i915/display: switch to struct drm_device based pcode interface Jani Nikula
2025-06-16 20:47 ` Rodrigo Vivi
2025-06-17 8:29 ` Jani Nikula
2025-06-18 13:48 ` Rodrigo Vivi
2025-06-05 10:29 ` [PATCH 5/6] drm/i915/dram: " Jani Nikula
2025-06-18 13:49 ` Rodrigo Vivi
2025-06-05 10:29 ` [PATCH 6/6] drm/xe/compat: remove old pcode compat interface Jani Nikula
2025-06-18 13:49 ` Rodrigo Vivi
2025-06-05 12:33 ` ✗ Fi.CI.SPARSE: warning for drm/i915, drm/xe: add drm device based pcode interface for display Patchwork
2025-06-05 12:56 ` ✓ i915.CI.BAT: success " Patchwork
2025-06-18 15:27 ` Jani Nikula
2025-06-05 14:51 ` ✓ CI.Patch_applied: " Patchwork
2025-06-05 14:51 ` ✓ CI.checkpatch: " Patchwork
2025-06-05 14:52 ` ✓ CI.KUnit: " Patchwork
2025-06-05 15:03 ` ✓ CI.Build: " Patchwork
2025-06-05 15:06 ` ✓ CI.Hooks: " Patchwork
2025-06-05 15:08 ` ✗ CI.checksparse: warning " Patchwork
2025-06-06 5:29 ` ✓ Xe.CI.BAT: success " Patchwork
2025-06-06 23:06 ` ✗ Xe.CI.Full: failure " Patchwork
2025-06-23 10:49 ` ✗ Fi.CI.BUILD: failure for drm/i915, drm/xe: add drm device based pcode interface for display (rev2) Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aFCCcHzOX7JqXE7q@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=lucas.demarchi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.