Re: [PATCH] drm/i915: Uninit the DMC FW loader state during shutdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 11, 2021 at 04:45:29PM +0200, Imre Deak wrote:
> We need to wait for the DMC FW loader work to complete during shutdown,
> even if it's unlikely to be still pending by that time, fix this.
> 
> This also fixes the wakeref tracking WARN during shutdown about the
> leaked reference we hold due to a missing DMC firmware.
> 
> While at it add a TODO comment about unifying the shutdown and PM
> power-off sequences and later these sequences with the driver remove and
> system/runtime suspend sequences.
> 
> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> References: https://lore.kernel.org/lkml/20210303055517.GB2708@xsang-OptiPlex-9020
> Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
> Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>

Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/i915_drv.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 3edd5e47ad68..4a0e491e9692 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1038,10 +1038,18 @@ void i915_driver_shutdown(struct drm_i915_private *i915)
>  	intel_suspend_encoders(i915);
>  	intel_shutdown_encoders(i915);
>  
> +	intel_csr_ucode_suspend(i915);
> +
>  	/*
>  	 * The only requirement is to reboot with display DC states disabled,
>  	 * for now leaving all display power wells in the INIT power domain
> -	 * enabled matching the driver reload sequence.
> +	 * enabled.
> +	 *
> +	 * TODO:
> +	 * - unify the pci_driver::shutdown sequence here with the
> +	 *   pci_driver.driver.pm.poweroff,poweroff_late sequence.
> +	 * - unify the driver remove and system/runtime suspend sequences with
> +	 *   the above unified shutdown/poweroff sequence.
>  	 */
>  	intel_power_domains_driver_remove(i915);
>  	enable_rpm_wakeref_asserts(&i915->runtime_pm);
> -- 
> 2.25.1

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux