From: Jani Nikula Date: Wed, 19 Nov 2025 18:52:45 +0000 (+0200) Subject: drm/i915: move dram_info to struct intel_display X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de4ca6f8e9277fed49192454b7940681977ab1e5;p=thirdparty%2Fkernel%2Flinux.git drm/i915: move dram_info to struct intel_display With all of dram code under display, also move dram_info to struct intel_display. This further cleans up struct xe_device from display related members. Reviewed-by: Ville Syrjälä Link: https://patch.msgid.link/cbbca93003952ea24ae60e66d79d901dba78ccd8.1763578288.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h index 9b8414b77c158..9b36654b593d9 100644 --- a/drivers/gpu/drm/i915/display/intel_display_core.h +++ b/drivers/gpu/drm/i915/display/intel_display_core.h @@ -394,6 +394,10 @@ struct intel_display { u32 mmio_base; } dsi; + struct { + const struct dram_info *info; + } dram; + struct { /* list of fbdev register on this device */ struct intel_fbdev *fbdev; diff --git a/drivers/gpu/drm/i915/display/intel_dram.c b/drivers/gpu/drm/i915/display/intel_dram.c index b4fa1fe8709c1..019a722a38bf1 100644 --- a/drivers/gpu/drm/i915/display/intel_dram.c +++ b/drivers/gpu/drm/i915/display/intel_dram.c @@ -817,7 +817,6 @@ static int xelpdp_get_dram_info(struct intel_display *display, struct dram_info int intel_dram_detect(struct intel_display *display) { - struct drm_i915_private *i915 = to_i915(display->drm); struct dram_info *dram_info; int ret; @@ -828,7 +827,7 @@ int intel_dram_detect(struct intel_display *display) if (!dram_info) return -ENOMEM; - i915->dram_info = dram_info; + display->dram.info = dram_info; if (DISPLAY_VER(display) >= 14) ret = xelpdp_get_dram_info(display, dram_info); @@ -865,7 +864,5 @@ int intel_dram_detect(struct intel_display *display) */ const struct dram_info *intel_dram_info(struct intel_display *display) { - struct drm_i915_private *i915 = to_i915(display->drm); - - return i915->dram_info; + return display->dram.info; } diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 5381a934a6719..96af7776bee59 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -60,7 +60,6 @@ #include "intel_step.h" #include "intel_uncore.h" -struct dram_info; struct drm_i915_clock_gating_funcs; struct intel_display; struct intel_pxp; @@ -279,8 +278,6 @@ struct drm_i915_private { u32 suspend_count; struct vlv_s0ix_state *vlv_s0ix_state; - const struct dram_info *dram_info; - struct intel_runtime_pm runtime_pm; struct i915_perf perf; diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h index 430ac085c22bf..10b91dac96ad5 100644 --- a/drivers/gpu/drm/xe/xe_device_types.h +++ b/drivers/gpu/drm/xe/xe_device_types.h @@ -34,7 +34,6 @@ #define TEST_VM_OPS_ERROR #endif -struct dram_info; struct intel_display; struct intel_dg_nvm_dev; struct xe_ggtt; @@ -637,7 +636,6 @@ struct xe_device { * drm_i915_private during build. After cleanup these should go away, * migrating to the right sub-structs */ - const struct dram_info *dram_info; struct intel_uncore { spinlock_t lock;