Message ID | 1440588497-13954-2-git-send-email-animesh.manna@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On ke, 2015-08-26 at 16:58 +0530, Animesh Manna wrote: > Skl is fully dependent on dmc for going to low power state (dc5/dc6). > This requires a trigger from rpm. To ensure the dmc firmware > is available for runtime pm support rpm-reference-count is used > by not releasing the rpm reference if firmware loading is > not completed. The above doesn't explain to me why we need this change. Looking at the next patch makes it clearer: we need to move the firmware loading later since it needs to take a power domain reference instead of an RPM reference, and power domains are not initialized at this point yet. It's also worth mentioning in the commit log that this change is needed by an upcoming patch. > > So moved the intel_csr_ucode_init call after runtime pm enable. > > Cc: Daniel Vetter <daniel.vetter@intel.com> > Cc: Damien Lespiau <damien.lespiau@intel.com> > Cc: Imre Deak <imre.deak@intel.com> > Cc: Sunil Kamath <sunil.kamath@intel.com> > Signed-off-by: Animesh Manna <animesh.manna@intel.com> > --- > drivers/gpu/drm/i915/i915_dma.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c > index 2193cc2..48b9792 100644 > --- a/drivers/gpu/drm/i915/i915_dma.c > +++ b/drivers/gpu/drm/i915/i915_dma.c > @@ -885,9 +885,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) > > intel_uncore_init(dev); > > - /* Load CSR Firmware for SKL */ > - intel_csr_ucode_init(dev); > - > ret = i915_gem_gtt_init(dev); > if (ret) > goto out_freecsr; > @@ -1035,6 +1032,9 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) > > i915_audio_component_init(dev_priv); > > + /* Load CSR Firmware for SKL */ > + intel_csr_ucode_init(dev); We need to call this function earlier, since there could be a modeset before this for the console, after which the driver will disable any unneeded power domains. So this should be called after intel_power_domains_init_hw() to prevent this. > + > return 0; > > out_power_well:
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 2193cc2..48b9792 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -885,9 +885,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) intel_uncore_init(dev); - /* Load CSR Firmware for SKL */ - intel_csr_ucode_init(dev); - ret = i915_gem_gtt_init(dev); if (ret) goto out_freecsr; @@ -1035,6 +1032,9 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) i915_audio_component_init(dev_priv); + /* Load CSR Firmware for SKL */ + intel_csr_ucode_init(dev); + return 0; out_power_well:
Skl is fully dependent on dmc for going to low power state (dc5/dc6). This requires a trigger from rpm. To ensure the dmc firmware is available for runtime pm support rpm-reference-count is used by not releasing the rpm reference if firmware loading is not completed. So moved the intel_csr_ucode_init call after runtime pm enable. Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Imre Deak <imre.deak@intel.com> Cc: Sunil Kamath <sunil.kamath@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> --- drivers/gpu/drm/i915/i915_dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)