diff mbox series

[v2,14/17] drm/i915/dmc_wl: Init only after we have runtime device info

Message ID 20241106215231.103474-15-gustavo.sousa@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/dmc_wl: Fixes and enablement for Xe3_LPD | expand

Commit Message

Gustavo Sousa Nov. 6, 2024, 9:50 p.m. UTC
We should be able to use the DMC wakelock only if the display hardware
has support for DMC. We will add a check for that in an upcoming change.

Since info for DMC availability (HAS_DMC()) needs runtime device info,
move the call to intel_dmc_wl_init() to a place where we know we have
the hardware has been probed for such an info (i.e. after
intel_display_device_info_runtime_init()).

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Luca Coelho Nov. 7, 2024, 10:50 a.m. UTC | #1
On Wed, 2024-11-06 at 18:50 -0300, Gustavo Sousa wrote:
> We should be able to use the DMC wakelock only if the display hardware
> has support for DMC. We will add a check for that in an upcoming change.
> 
> Since info for DMC availability (HAS_DMC()) needs runtime device info,
> move the call to intel_dmc_wl_init() to a place where we know we have
> the hardware has been probed for such an info (i.e. after
> intel_display_device_info_runtime_init()).
> 
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
> ---
> 

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>

--
Cheers,
Luca.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
index 56b78cf6b854..4257cc380475 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -200,7 +200,6 @@  void intel_display_driver_early_probe(struct drm_i915_private *i915)
 	intel_dpll_init_clock_hook(i915);
 	intel_init_display_hooks(i915);
 	intel_fdi_init_hook(i915);
-	intel_dmc_wl_init(&i915->display);
 }
 
 /* part #1: call before irq install */
@@ -238,6 +237,7 @@  int intel_display_driver_probe_noirq(struct drm_i915_private *i915)
 		return 0;
 
 	intel_dmc_init(display);
+	intel_dmc_wl_init(display);
 
 	i915->display.wq.modeset = alloc_ordered_workqueue("i915_modeset", 0);
 	i915->display.wq.flip = alloc_workqueue("i915_flip", WQ_HIGHPRI |