[PATCH v3 6/8] drm/i915/reset: decide whether display reset is needed on gt side

Matt Roper matthew.d.roper at intel.com
Mon Mar 3 23:15:32 UTC 2025


On Mon, Mar 03, 2025 at 01:27:08PM +0200, Jani Nikula wrote:
> Move the checks for whether display reset is needed at all to gt side of
> things. This way, we can decide to skip the display calls altogether if
> display reset is not required.
> 
> Cc: Matt Roper <matthew.d.roper at intel.com>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

Reviewed-by: Matt Roper <matthew.d.roper at intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display_reset.c |  5 -----
>  drivers/gpu/drm/i915/gt/intel_reset.c              | 10 +++++++++-
>  2 files changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_reset.c b/drivers/gpu/drm/i915/display/intel_display_reset.c
> index acc728c75328..c48d822db58e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_reset.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_reset.c
> @@ -38,11 +38,6 @@ bool intel_display_reset_prepare(struct intel_display *display)
>  	if (!HAS_DISPLAY(display))
>  		return false;
>  
> -	/* reset doesn't touch the display */
> -	if (!intel_display_reset_test(display) &&
> -	    !gpu_reset_clobbers_display(display))
> -		return false;
> -
>  	if (atomic_read(&display->restore.pending_fb_pin)) {
>  		drm_dbg_kms(display->drm,
>  			    "Modeset potentially stuck, unbreaking through wedging\n");
> diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
> index f6c8e4d48b04..d4f2829477b4 100644
> --- a/drivers/gpu/drm/i915/gt/intel_reset.c
> +++ b/drivers/gpu/drm/i915/gt/intel_reset.c
> @@ -1419,9 +1419,17 @@ static void intel_gt_reset_global(struct intel_gt *gt,
>  	intel_wedge_on_timeout(&w, gt, 60 * HZ) {
>  		struct drm_i915_private *i915 = gt->i915;
>  		struct intel_display *display = &i915->display;
> +		bool need_display_reset;
>  		bool reset_display;
>  
> -		reset_display = intel_display_reset_prepare(display);
> +		need_display_reset = intel_gt_gpu_reset_clobbers_display(gt) &&
> +			intel_has_gpu_reset(gt);
> +
> +		reset_display = intel_display_reset_test(display) ||
> +			need_display_reset;
> +
> +		if (reset_display)
> +			reset_display = intel_display_reset_prepare(display);
>  
>  		intel_gt_reset(gt, engine_mask, reason);
>  
> -- 
> 2.39.5
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


More information about the Intel-gfx mailing list