drm/i915/display: add intel_display -> drm_device backpointer

BugLink: https://bugs.launchpad.net/bugs/2084225
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@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/47dd7bc4aae3c10b18097824e37617c072c66c0b.1713358679.git.jani.nikula@intel.com
(cherry picked from commit f02fedd882f8e619016f9089f72483b5a6c59c7f)
[koichiroden: prereq for "drm/i915/dp_mst: Fix MST state after a sink
reset"]
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
Jani Nikula
2024-04-17 16:02:39 +03:00
committed by Mehmet Basaran
parent b7868c8af4
commit 4c58eeb634
2 changed files with 6 additions and 0 deletions
@@ -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 */
@@ -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