public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Only call skl_check_plane_surface() for visible planes
Date: Mon, 16 Jan 2017 15:02:02 +0200	[thread overview]
Message-ID: <20170116130202.GL31595@intel.com> (raw)
In-Reply-To: <20170113195410.28122-1-matthew.d.roper@intel.com>

On Fri, Jan 13, 2017 at 11:54:10AM -0800, Matt Roper wrote:
> When a plane is fully clipped (either because it's positioned offscreen,
> or because the CRTC is currently off), the clipping calculations we do
> during check_plane will leave nonsense/negative coordinates in plane's
> source rectangle.  This is generally harmless since we recognize that
> the plane should be turned off and we don't try to actually do anything
> with those values.  However on gen9 platforms, we still try to do
> surface offset math in skl_check_plane_surface() which gets confused and
> reports "Unable to find suitable display surface offset."  Given that
> the plane will be disabled anyway, none of these calculations are
> actually necessary, so just skip calling the function on non-visible
> planes.
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Fixes: b63a16f6cd ("drm/i915: Compute display surface offset in the plane check hook for SKL+")
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98258
> Testcase: igt/pm_rpm/legacy-planes
> Testcase: igt/pm_rpm/universal-planes
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
> There may be additional IGT tests (e.g., in kms_plane) that also trip over
> this.  I only listed the two that I was using for debugging when I tracked this
> down.
> 
>  drivers/gpu/drm/i915/intel_display.c | 2 +-
>  drivers/gpu/drm/i915/intel_sprite.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 0a38de9..9295f8a 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15149,7 +15149,7 @@ intel_check_primary_plane(struct drm_plane *plane,
>  	if (!state->base.fb)
>  		return 0;
>  
> -	if (INTEL_GEN(dev_priv) >= 9) {
> +	if (INTEL_GEN(dev_priv) >= 9 && state->base.visible) {
>  		ret = skl_check_plane_surface(state);
>  		if (ret)
>  			return ret;
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index ada8f7a..5cedea4 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -967,7 +967,7 @@ intel_check_sprite_plane(struct drm_plane *plane,
>  	dst->y1 = crtc_y;
>  	dst->y2 = crtc_y + crtc_h;
>  
> -	if (INTEL_GEN(dev) >= 9) {
> +	if (INTEL_GEN(dev) >= 9 && state->base.visible) {
>  		ret = skl_check_plane_surface(state);
>  		if (ret)
>  			return ret;

So kinda like
https://patchwork.freedesktop.org/patch/120204/

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

      parent reply	other threads:[~2017-01-16 13:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 19:54 [PATCH] drm/i915: Only call skl_check_plane_surface() for visible planes Matt Roper
2017-01-13 20:07 ` [PATCH] drm/i915: Only call skl_check_plane_surface() for visible planes (v2) Matt Roper
2017-01-13 20:53 ` ✓ Fi.CI.BAT: success for drm/i915: Only call skl_check_plane_surface() for visible planes (rev2) Patchwork
2017-01-16 13:02 ` Ville Syrjälä [this message]

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=20170116130202.GL31595@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox