From: Jani Nikula <jani.nikula@intel.com>
To: Jani Nikula <jani.nikula@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: [PATCH v2] drm/{i915, xe}/display: add core workaround query to display parent interface
Date: Tue, 28 Jul 2026 20:02:56 +0300 [thread overview]
Message-ID: <20260728170257.615855-1-jani.nikula@intel.com> (raw)
In-Reply-To: <20260728162514.594285-1-jani.nikula@intel.com>
There are workarounds display needs to apply depending on information
only available to the core driver. Add a display parent interface for
the query. For starters, there's only one workaround like this, so keep
it simple instead of over-engineering.
This lets us drop an #ifdef I915 as well as xe dependency on some
display headers.
v2: git add xe_display_wa.h
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/display/intel_display_wa.c | 3 ++-
drivers/gpu/drm/i915/display/intel_display_wa.h | 9 ---------
drivers/gpu/drm/xe/display/xe_display.c | 2 ++
drivers/gpu/drm/xe/display/xe_display_wa.c | 13 +++++++++----
drivers/gpu/drm/xe/display/xe_display_wa.h | 9 +++++++++
include/drm/intel/display_parent_interface.h | 7 +++++++
6 files changed, 29 insertions(+), 14 deletions(-)
create mode 100644 drivers/gpu/drm/xe/display/xe_display_wa.h
diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.c b/drivers/gpu/drm/i915/display/intel_display_wa.c
index 3662e0f17c69..10dc2930468d 100644
--- a/drivers/gpu/drm/i915/display/intel_display_wa.c
+++ b/drivers/gpu/drm/i915/display/intel_display_wa.c
@@ -4,6 +4,7 @@
*/
#include <drm/drm_print.h>
+#include <drm/intel/display_parent_interface.h>
#include <drm/intel/step.h>
#include "intel_de.h"
@@ -131,7 +132,7 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa,
case INTEL_DISPLAY_WA_16011863758:
return DISPLAY_VER(display) >= 11;
case INTEL_DISPLAY_WA_16023588340:
- return intel_display_needs_wa_16023588340(display);
+ return display->parent->wa && display->parent->wa->wa_16023588340(display->drm);
case INTEL_DISPLAY_WA_16025573575:
return intel_display_needs_wa_16025573575(display);
case INTEL_DISPLAY_WA_16025596647:
diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.h b/drivers/gpu/drm/i915/display/intel_display_wa.h
index 338b32e4162d..425a300840aa 100644
--- a/drivers/gpu/drm/i915/display/intel_display_wa.h
+++ b/drivers/gpu/drm/i915/display/intel_display_wa.h
@@ -12,15 +12,6 @@ struct intel_display;
void intel_display_wa_apply(struct intel_display *display);
-#ifdef I915
-static inline bool intel_display_needs_wa_16023588340(struct intel_display *display)
-{
- return false;
-}
-#else
-bool intel_display_needs_wa_16023588340(struct intel_display *display);
-#endif
-
/*
* This enum lists display workarounds; each entry here must have a
* corresponding case in __intel_display_wa(). Keep both sorted by lineage
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index 8da4c457a4a0..10d80dc812bc 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -37,6 +37,7 @@
#include "xe_display_bo.h"
#include "xe_display_pcode.h"
#include "xe_display_rpm.h"
+#include "xe_display_wa.h"
#include "xe_dsb_buffer.h"
#include "xe_fb_pin.h"
#include "xe_frontbuffer.h"
@@ -458,6 +459,7 @@ static const struct intel_display_parent_interface parent = {
.pcode = &xe_display_pcode_interface,
.rpm = &xe_display_rpm_interface,
.stolen = &xe_display_stolen_interface,
+ .wa = &xe_display_wa_interface,
.has_auxccs = has_auxccs,
};
diff --git a/drivers/gpu/drm/xe/display/xe_display_wa.c b/drivers/gpu/drm/xe/display/xe_display_wa.c
index 2aa1b8c03411..46e41e8a3304 100644
--- a/drivers/gpu/drm/xe/display/xe_display_wa.c
+++ b/drivers/gpu/drm/xe/display/xe_display_wa.c
@@ -3,17 +3,22 @@
* Copyright © 2024 Intel Corporation
*/
-#include "intel_display_core.h"
-#include "intel_display_wa.h"
+#include <drm/intel/display_parent_interface.h>
+
#include "xe_device.h"
+#include "xe_display_wa.h"
#include "xe_wa.h"
#include <generated/xe_wa_oob.h>
-bool intel_display_needs_wa_16023588340(struct intel_display *display)
+static bool intel_display_needs_wa_16023588340(struct drm_device *drm)
{
- struct xe_device *xe = to_xe_device(display->drm);
+ struct xe_device *xe = to_xe_device(drm);
struct xe_gt *wa_gt = xe_root_mmio_gt(xe);
return wa_gt && XE_GT_WA(wa_gt, 16023588340);
}
+
+const struct intel_display_wa_interface xe_display_wa_interface = {
+ .wa_16023588340 = intel_display_needs_wa_16023588340,
+};
diff --git a/drivers/gpu/drm/xe/display/xe_display_wa.h b/drivers/gpu/drm/xe/display/xe_display_wa.h
new file mode 100644
index 000000000000..0262b463916d
--- /dev/null
+++ b/drivers/gpu/drm/xe/display/xe_display_wa.h
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: MIT */
+/* Copyright © 2026 Intel Corporation */
+
+#ifndef __XE_DISPLAY_WA_H__
+#define __XE_DISPLAY_WA_H__
+
+extern const struct intel_display_wa_interface xe_display_wa_interface;
+
+#endif
diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h
index de395df9ca30..bdc9f9ad4fcb 100644
--- a/include/drm/intel/display_parent_interface.h
+++ b/include/drm/intel/display_parent_interface.h
@@ -230,6 +230,10 @@ struct intel_display_vlv_iosf_interface {
int (*write)(struct drm_device *drm, enum vlv_iosf_sb_unit unit, u32 addr, u32 val);
};
+struct intel_display_wa_interface {
+ bool (*wa_16023588340)(struct drm_device *drm);
+};
+
/**
* struct intel_display_parent_interface - services parent driver provides to display
*
@@ -291,6 +295,9 @@ struct intel_display_parent_interface {
/** @vlv_iosf: VLV IOSF sideband. Optional. */
const struct intel_display_vlv_iosf_interface *vlv_iosf;
+ /** @wa: Display workarounds query. Optional. */
+ const struct intel_display_wa_interface *wa;
+
/* Generic independent functions */
struct {
/** @fence_priority_display: Set display priority. Optional. */
--
2.47.3
next prev parent reply other threads:[~2026-07-28 17:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 16:25 [PATCH] drm/{i915, xe}/display: add core workaround query to display parent interface Jani Nikula
2026-07-28 16:54 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2026-07-28 17:02 ` ✓ CI.KUnit: success " Patchwork
2026-07-28 17:02 ` Jani Nikula [this message]
2026-08-03 3:00 ` [PATCH v2] " Kandpal, Suraj
2026-08-03 11:55 ` Jani Nikula
2026-07-28 17:50 ` ✗ CI.checkpatch: warning for drm/{i915, xe}/display: add core workaround query to display parent interface (rev2) Patchwork
2026-07-28 17:51 ` ✓ CI.KUnit: success " Patchwork
2026-07-28 18:27 ` ✓ Xe.CI.BAT: " Patchwork
2026-07-28 18:37 ` ✓ i915.CI.BAT: " Patchwork
2026-07-28 22:17 ` ✗ i915.CI.Full: failure " Patchwork
2026-07-28 22:24 ` ✓ Xe.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=20260728170257.615855-1-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
/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.