From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 3/7] drm/i915/de: Convert intel_de_read_fw() into a vfunc
Date: Fri, 27 Nov 2026 16:38:55 +0200 [thread overview]
Message-ID: <b0f6ec11e1f79fdbcc0968b494c755c1c4b29796@intel.com> (raw)
In-Reply-To: <20261126212728.9034-4-ville.syrjala@linux.intel.com>
On Thu, 26 Nov 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> When we eventually implement the display MMIO stuff using
> raw readl()/writel()/etc we'll need to implement the LNL
> read vs. write reordering workaround in intel_de_read_fw().
> To avoid runtime platform checks convert intel_de_read_fw()
> into a vfunc. For now everyone implements this the same way,
> and the LNL w/a is still handled in the underlying xe_mmio
> code.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_de.c | 16 +++++++++++-----
> drivers/gpu/drm/i915/display/intel_de.h | 6 +++++-
> 2 files changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_de.c b/drivers/gpu/drm/i915/display/intel_de.c
> index fe77e8769c9b..658380cb8973 100644
> --- a/drivers/gpu/drm/i915/display/intel_de.c
> +++ b/drivers/gpu/drm/i915/display/intel_de.c
> @@ -201,11 +201,6 @@ __intel_de_write_fw(struct intel_display *display, intel_reg_t reg, u32 val)
> intel_uncore_write_fw(__to_uncore(display), reg, val);
> }
>
> -u32 intel_de_read_fw(struct intel_display *display, intel_reg_t reg)
> -{
> - return __intel_de_read_fw(display, reg);
> -}
> -
> void intel_de_write_fw(struct intel_display *display, intel_reg_t reg, u32 val)
> {
> __intel_de_write_fw(display, reg, val);
> @@ -429,6 +424,11 @@ __intel_de_write(struct intel_display *display, intel_reg_t reg, u32 val,
>
> #define I9XX_MMIO_FLAGS 0
>
> +static u32 i9xx_mmio_read_fw(struct intel_display *display, intel_reg_t reg)
> +{
> + return __intel_de_read_fw(display, reg);
> +}
> +
> static u32 i9xx_mmio_read(struct intel_display *display, intel_reg_t reg)
> {
> return __intel_de_read(display, reg, I9XX_MMIO_FLAGS);
> @@ -442,6 +442,7 @@ static void i9xx_mmio_write(struct intel_display *display, intel_reg_t reg, u32
> #undef I9XX_MMIO_FLAGS
>
> static const struct intel_mmio_funcs i9xx_mmio_funcs = {
> + .read_fw = i9xx_mmio_read_fw,
> .read = i9xx_mmio_read,
> .write = i9xx_mmio_write,
> };
> @@ -461,6 +462,7 @@ static void snb_mmio_write(struct intel_display *display, intel_reg_t reg, u32 v
> #undef SNB_MMIO_FLAGS
>
> static const struct intel_mmio_funcs snb_mmio_funcs = {
> + .read_fw = i9xx_mmio_read_fw,
> .read = snb_mmio_read,
> .write = snb_mmio_write,
> };
> @@ -480,6 +482,7 @@ static void hsw_mmio_write(struct intel_display *display, intel_reg_t reg, u32 v
> #undef HSW_MMIO_FLAGS
>
> static const struct intel_mmio_funcs hsw_mmio_funcs = {
> + .read_fw = i9xx_mmio_read_fw,
> .read = hsw_mmio_read,
> .write = hsw_mmio_write,
> .check_for_unclaimed_mmio = hsw_check_for_unclaimed_mmio,
> @@ -487,6 +490,7 @@ static const struct intel_mmio_funcs hsw_mmio_funcs = {
> };
>
> static const struct intel_mmio_funcs vlv_mmio_funcs = {
> + .read_fw = i9xx_mmio_read_fw,
> .read = hsw_mmio_read,
> .write = hsw_mmio_write,
> .check_for_unclaimed_mmio = vlv_check_for_unclaimed_mmio,
> @@ -508,6 +512,7 @@ static void tgl_mmio_write(struct intel_display *display, intel_reg_t reg, u32 v
> #undef TGL_MMIO_FLAGS
>
> static const struct intel_mmio_funcs tgl_mmio_funcs = {
> + .read_fw = i9xx_mmio_read_fw,
> .read = tgl_mmio_read,
> .write = tgl_mmio_write,
> .check_for_unclaimed_mmio = hsw_check_for_unclaimed_mmio,
> @@ -528,6 +533,7 @@ static void lnl_mmio_write(struct intel_display *display, intel_reg_t reg, u32 v
> #undef LNL_MMIO_FLAGS
>
> static const struct intel_mmio_funcs lnl_mmio_funcs = {
> + .read_fw = i9xx_mmio_read_fw,
> .read = lnl_mmio_read,
> .write = lnl_mmio_write,
> };
> diff --git a/drivers/gpu/drm/i915/display/intel_de.h b/drivers/gpu/drm/i915/display/intel_de.h
> index c21fff7be748..10b66de460be 100644
> --- a/drivers/gpu/drm/i915/display/intel_de.h
> +++ b/drivers/gpu/drm/i915/display/intel_de.h
> @@ -10,6 +10,7 @@
> #include "intel_dsb.h"
>
> struct intel_mmio_funcs {
> + u32 (*read_fw)(struct intel_display *display, intel_reg_t reg);
> u32 (*read)(struct intel_display *display, intel_reg_t reg);
> void (*write)(struct intel_display *display, intel_reg_t reg, u32 val);
> bool (*check_for_unclaimed_mmio)(struct intel_display *display);
> @@ -102,7 +103,10 @@ int intel_de_wait_for_clear_ms(struct intel_display *display, intel_reg_t reg,
> *
> * These will also skip the mmio_debug unclaimed register detection.
> */
> -u32 intel_de_read_fw(struct intel_display *display, intel_reg_t reg);
> +static inline u32 intel_de_read_fw(struct intel_display *display, intel_reg_t reg)
> +{
> + return display->mmio.funcs->read_fw(display, reg);
> +}
> void intel_de_write_fw(struct intel_display *display, intel_reg_t reg, u32 val);
>
> static inline u32
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-11-27 14:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 21:27 [PATCH 0/7] drm/i915/de: Nuke uncore Ville Syrjala
2026-11-26 21:27 ` [PATCH 1/7] drm/i915/de: Move the register tracepoint to display Ville Syrjala
2026-11-27 14:32 ` Jani Nikula
2026-11-26 21:27 ` [PATCH 2/7] drm/i915/de: Pimp the intel_reg_rw tracepoint printf format Ville Syrjala
2026-11-27 14:36 ` Jani Nikula
2026-11-26 21:27 ` [PATCH 3/7] drm/i915/de: Convert intel_de_read_fw() into a vfunc Ville Syrjala
2026-11-27 14:38 ` Jani Nikula [this message]
2026-11-26 21:27 ` [PATCH 4/7] drm/i915/de: Use raw readl()/writel()/etc for register access in display Ville Syrjala
2026-11-27 14:54 ` Jani Nikula
2026-11-26 21:27 ` [PATCH 5/7] drm/i915/de: Add intel_parent_mmio_regs() interface Ville Syrjala
2026-11-27 14:56 ` Jani Nikula
2026-11-26 21:27 ` [PATCH 6/7] drm/xe: Nuke the compat uncore stuff Ville Syrjala
2026-11-27 15:14 ` Jani Nikula
2026-11-27 15:34 ` Ville Syrjälä
2026-11-26 21:27 ` [PATCH 7/7] drm/i915/de: Document intel_de_write8()'s usage restrictions Ville Syrjala
2026-11-27 15:15 ` Jani Nikula
2026-11-26 22:27 ` ✓ i915.CI.BAT: success for drm/i915/de: Nuke uncore Patchwork
2026-11-26 23:43 ` ✗ CI.checkpatch: warning " Patchwork
2026-11-26 23:46 ` ✓ CI.KUnit: success " Patchwork
2026-11-27 0:24 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-27 12:20 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-11-28 3:25 ` ✓ i915.CI.Full: success " 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=b0f6ec11e1f79fdbcc0968b494c755c1c4b29796@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=ville.syrjala@linux.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.