Re: [PATCH] drm/i915/gt: Force the GT reset on shutdown

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

 



Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes:

> Before we return control to the system, and letting it reuse all the
> pages being accessed by HW, we must disable the HW. At the moment, we
> dare not reset the GPU if it will clobber the display, but once we know
> the display has been disabled, we can proceed with the reset as we
> shutdown the module. We know the next user must reinitialise the HW for
> their purpose.
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/489
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: stable@xxxxxxxxxx

Reviewed-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/gt/intel_gt.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
> index f069551e412f..ebc29b6ee86c 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt.c
> @@ -616,6 +616,11 @@ void intel_gt_driver_unregister(struct intel_gt *gt)
>  void intel_gt_driver_release(struct intel_gt *gt)
>  {
>  	struct i915_address_space *vm;
> +	intel_wakeref_t wakeref;
> +
> +	/* Scrub all HW state upon release */
> +	with_intel_runtime_pm(gt->uncore->rpm, wakeref)
> +		__intel_gt_reset(gt, ALL_ENGINES);
>  
>  	vm = fetch_and_zero(&gt->vm);
>  	if (vm) /* FIXME being called twice on error paths :( */
> -- 
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
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