[SRU][N][PATCH 2/3] drm/i915/display: add intel_display -> drm_device backpointer
Chris Chiu
chris.chiu at canonical.com
Tue Sep 24 07:36:45 UTC 2024
From: Jani Nikula <jani.nikula at intel.com>
BugLink: https://bugs.launchpad.net/bugs/2081786
As a baby step towards making struct intel_display the main data
structure for display, add a backpointer to struct drm_device that can
be used instead of &i915->drm.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/47dd7bc4aae3c10b18097824e37617c072c66c0b.1713358679.git.jani.nikula@intel.com
(cherry picked from commit f02fedd882f8e619016f9089f72483b5a6c59c7f)
Signed-off-by: Chris Chiu <chris.chiu at canonical.com>
---
drivers/gpu/drm/i915/display/intel_display_core.h | 3 +++
drivers/gpu/drm/i915/display/intel_display_device.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
index 47297ed85822..0a25f21f7922 100644
--- a/drivers/gpu/drm/i915/display/intel_display_core.h
+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
@@ -271,6 +271,9 @@ struct intel_wm {
};
struct intel_display {
+ /* drm device backpointer */
+ struct drm_device *drm;
+
/* Display functions */
struct {
/* Top level crtc-ish functions */
diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c
index 0b522c6a8d6f..bbb6fb581003 100644
--- a/drivers/gpu/drm/i915/display/intel_display_device.c
+++ b/drivers/gpu/drm/i915/display/intel_display_device.c
@@ -922,6 +922,9 @@ void intel_display_device_probe(struct drm_i915_private *i915)
const struct intel_display_device_info *info;
u16 ver, rel, step;
+ /* Add drm device backpointer as early as possible. */
+ i915->display.drm = &i915->drm;
+
if (HAS_GMD_ID(i915))
info = probe_gmdid_display(i915, &ver, &rel, &step);
else
--
2.34.1
More information about the kernel-team
mailing list