On Thu, Nov 02, 2023 at 05:52:22PM +0200, Jani Nikula wrote: > The core code has no business accessing i915->display directly. These > could be further spread to respective files, but this is a start. > > Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx> Reviewed-by: Matt Roper <matthew.d.roper@xxxxxxxxx> > --- > drivers/gpu/drm/i915/display/intel_display_driver.c | 6 ++++++ > drivers/gpu/drm/i915/i915_driver.c | 6 ------ > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c > index 44b59ac301e6..0a5b922f2ad6 100644 > --- a/drivers/gpu/drm/i915/display/intel_display_driver.c > +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c > @@ -181,6 +181,12 @@ void intel_display_driver_early_probe(struct drm_i915_private *i915) > if (!HAS_DISPLAY(i915)) > return; > > + mutex_init(&i915->display.backlight.lock); > + mutex_init(&i915->display.audio.mutex); > + mutex_init(&i915->display.wm.wm_mutex); > + mutex_init(&i915->display.pps.mutex); > + mutex_init(&i915->display.hdcp.hdcp_mutex); > + > intel_display_irq_init(i915); > intel_dkl_phy_init(i915); > intel_color_init_hooks(i915); > diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c > index 80e85cadb9a2..01fd25b622d1 100644 > --- a/drivers/gpu/drm/i915/i915_driver.c > +++ b/drivers/gpu/drm/i915/i915_driver.c > @@ -231,16 +231,10 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv) > > spin_lock_init(&dev_priv->irq_lock); > spin_lock_init(&dev_priv->gpu_error.lock); > - mutex_init(&dev_priv->display.backlight.lock); > > mutex_init(&dev_priv->sb_lock); > cpu_latency_qos_add_request(&dev_priv->sb_qos, PM_QOS_DEFAULT_VALUE); > > - mutex_init(&dev_priv->display.audio.mutex); > - mutex_init(&dev_priv->display.wm.wm_mutex); > - mutex_init(&dev_priv->display.pps.mutex); > - mutex_init(&dev_priv->display.hdcp.hdcp_mutex); > - > i915_memcpy_init_early(dev_priv); > intel_runtime_pm_init_early(&dev_priv->runtime_pm); > > -- > 2.39.2 > -- Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation