All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 4/4] drm/i915: Pimp async flip debugs
Date: Thu, 3 Mar 2022 16:16:44 +0200	[thread overview]
Message-ID: <20220303141644.GD10068@intel.com> (raw)
In-Reply-To: <20220214105532.13049-5-ville.syrjala@linux.intel.com>

On Mon, Feb 14, 2022 at 12:55:32PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Print the offending plane/crtc id+name in the async flip debugs.

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>

> 
> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 63 ++++++++++++++------
>  1 file changed, 44 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 93db8ffa54f8..51ef393ff87b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -7541,18 +7541,24 @@ static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
>  	if (!new_crtc_state->uapi.async_flip)
>  		return 0;
>  
> -	if (intel_crtc_needs_modeset(new_crtc_state)) {
> -		drm_dbg_kms(&i915->drm, "Modeset Required. Async flip not supported\n");
> -		return -EINVAL;
> -	}
> -
>  	if (!new_crtc_state->hw.active) {
> -		drm_dbg_kms(&i915->drm, "CRTC inactive\n");
> +		drm_dbg_kms(&i915->drm,
> +			    "[CRTC:%d:%s] not active\n",
> +			    crtc->base.base.id, crtc->base.name);
>  		return -EINVAL;
>  	}
> +
> +	if (intel_crtc_needs_modeset(new_crtc_state)) {
> +		drm_dbg_kms(&i915->drm,
> +			    "[CRTC:%d:%s] modeset required\n",
> +			    crtc->base.base.id, crtc->base.name);
> +		return -EINVAL;
> +	}
> +
>  	if (old_crtc_state->active_planes != new_crtc_state->active_planes) {
>  		drm_dbg_kms(&i915->drm,
> -			    "Active planes cannot be changed during async flip\n");
> +			    "[CRTC:%d:%s] Active planes cannot be in async flip\n",
> +			    crtc->base.base.id, crtc->base.name);
>  		return -EINVAL;
>  	}
>  
> @@ -7593,75 +7599,94 @@ static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
>  			break;
>  		default:
>  			drm_dbg_kms(&i915->drm,
> -				    "Linear memory/CCS does not support async flips\n");
> +				    "[PLANE:%d:%s] Modifier does not support async flips\n",
> +				    plane->base.base.id, plane->base.name);
>  			return -EINVAL;
>  		}
>  
>  		if (new_plane_state->hw.fb->format->num_planes > 1) {
>  			drm_dbg_kms(&i915->drm,
> -				    "Planar formats not supported with async flips\n");
> +				    "[PLANE:%d:%s] Planar formats do not support async flips\n",
> +				    plane->base.base.id, plane->base.name);
>  			return -EINVAL;
>  		}
>  
>  		if (old_plane_state->view.color_plane[0].mapping_stride !=
>  		    new_plane_state->view.color_plane[0].mapping_stride) {
> -			drm_dbg_kms(&i915->drm, "Stride cannot be changed in async flip\n");
> +			drm_dbg_kms(&i915->drm,
> +				    "[PLANE:%d:%s] Stride cannot be changed in async flip\n",
> +				    plane->base.base.id, plane->base.name);
>  			return -EINVAL;
>  		}
>  
>  		if (old_plane_state->hw.fb->modifier !=
>  		    new_plane_state->hw.fb->modifier) {
>  			drm_dbg_kms(&i915->drm,
> -				    "Framebuffer modifiers cannot be changed in async flip\n");
> +				    "[PLANE:%d:%s] Modifier cannot be changed in async flip\n",
> +				    plane->base.base.id, plane->base.name);
>  			return -EINVAL;
>  		}
>  
>  		if (old_plane_state->hw.fb->format !=
>  		    new_plane_state->hw.fb->format) {
>  			drm_dbg_kms(&i915->drm,
> -				    "Framebuffer format cannot be changed in async flip\n");
> +				    "[PLANE:%d:%s] Pixel format cannot be changed in async flip\n",
> +				    plane->base.base.id, plane->base.name);
>  			return -EINVAL;
>  		}
>  
>  		if (old_plane_state->hw.rotation !=
>  		    new_plane_state->hw.rotation) {
> -			drm_dbg_kms(&i915->drm, "Rotation cannot be changed in async flip\n");
> +			drm_dbg_kms(&i915->drm,
> +				    "[PLANE:%d:%s] Rotation cannot be changed in async flip\n",
> +				    plane->base.base.id, plane->base.name);
>  			return -EINVAL;
>  		}
>  
>  		if (!drm_rect_equals(&old_plane_state->uapi.src, &new_plane_state->uapi.src) ||
>  		    !drm_rect_equals(&old_plane_state->uapi.dst, &new_plane_state->uapi.dst)) {
>  			drm_dbg_kms(&i915->drm,
> -				    "Plane size/co-ordinates cannot be changed in async flip\n");
> +				    "[PLANE:%d:%s] Size/co-ordinates cannot be changed in async flip\n",
> +				    plane->base.base.id, plane->base.name);
>  			return -EINVAL;
>  		}
>  
>  		if (old_plane_state->hw.alpha != new_plane_state->hw.alpha) {
> -			drm_dbg_kms(&i915->drm, "Alpha value cannot be changed in async flip\n");
> +			drm_dbg_kms(&i915->drm,
> +				    "[PLANES:%d:%s] Alpha value cannot be changed in async flip\n",
> +				    plane->base.base.id, plane->base.name);
>  			return -EINVAL;
>  		}
>  
>  		if (old_plane_state->hw.pixel_blend_mode !=
>  		    new_plane_state->hw.pixel_blend_mode) {
>  			drm_dbg_kms(&i915->drm,
> -				    "Pixel blend mode cannot be changed in async flip\n");
> +				    "[PLANE:%d:%s] Pixel blend mode cannot be changed in async flip\n",
> +				    plane->base.base.id, plane->base.name);
>  			return -EINVAL;
>  		}
>  
>  		if (old_plane_state->hw.color_encoding != new_plane_state->hw.color_encoding) {
>  			drm_dbg_kms(&i915->drm,
> -				    "Color encoding cannot be changed in async flip\n");
> +				    "[PLANE:%d:%s] Color encoding cannot be changed in async flip\n",
> +				    plane->base.base.id, plane->base.name);
>  			return -EINVAL;
>  		}
>  
>  		if (old_plane_state->hw.color_range != new_plane_state->hw.color_range) {
> -			drm_dbg_kms(&i915->drm, "Color range cannot be changed in async flip\n");
> +			drm_dbg_kms(&i915->drm,
> +				    "[PLANE:%d:%s] Color range cannot be changed in async flip\n",
> +				    plane->base.base.id, plane->base.name);
>  			return -EINVAL;
>  		}
>  
>  		/* plane decryption is allow to change only in synchronous flips */
> -		if (old_plane_state->decrypt != new_plane_state->decrypt)
> +		if (old_plane_state->decrypt != new_plane_state->decrypt) {
> +			drm_dbg_kms(&i915->drm,
> +				    "[PLANE:%d:%s] Decryption cannot be changed in async flip\n",
> +				    plane->base.base.id, plane->base.name);
>  			return -EINVAL;
> +		}
>  	}
>  
>  	return 0;
> -- 
> 2.34.1
> 

  reply	other threads:[~2022-03-03 14:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 10:55 [Intel-gfx] [PATCH 0/4] drm/i915: Fix async flip wm0/ddb optimization Ville Syrjala
2022-02-14 10:55 ` [Intel-gfx] [PATCH 1/4] drm/i915: Don't skip ddb allocation if data_rate==0 Ville Syrjala
2022-03-03 14:14   ` Lisovskiy, Stanislav
2022-02-14 10:55 ` [Intel-gfx] [PATCH 2/4] drm/i915: Check async flip capability early on Ville Syrjala
2022-03-03 14:15   ` Lisovskiy, Stanislav
2022-02-14 10:55 ` [Intel-gfx] [PATCH 3/4] drm/i915: Fix the async flip wm0/ddb optimization Ville Syrjala
2022-03-03 14:15   ` Lisovskiy, Stanislav
2022-02-14 10:55 ` [Intel-gfx] [PATCH 4/4] drm/i915: Pimp async flip debugs Ville Syrjala
2022-03-03 14:16   ` Lisovskiy, Stanislav [this message]
2022-02-15 22:43 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Fix async flip wm0/ddb optimization Patchwork
2022-02-16  2:17 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220303141644.GD10068@intel.com \
    --to=stanislav.lisovskiy@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.