dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: ville.syrjala@linux.intel.com
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 5/5] drm: Check plane src coordinates correctly during page flip for atomic drivers
Date: Fri, 16 Oct 2015 09:27:49 -0700	[thread overview]
Message-ID: <20151016162749.GD30151@intel.com> (raw)
In-Reply-To: <1444930802-8515-5-git-send-email-ville.syrjala@linux.intel.com>

On Thu, Oct 15, 2015 at 08:40:02PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Instead of relying on the old crtc-{x,y,mode} gunk, dig out the primary
> plane coordinates from the plane state when checking them against the
> new framebuffer during page flip.
> 
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

For the series:

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

I also confirmed that the i-g-t test I wrote here:
   http://lists.freedesktop.org/archives/intel-gfx/2015-October/077394.html
now passes with your patch series, so I believe Tvrtko's original bug
report should be fixed.


Matt

> ---
>  drivers/gpu/drm/drm_crtc.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index ffaa3f5..52feffc 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -5193,7 +5193,14 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
>  		goto out;
>  	}
>  
> -	ret = drm_crtc_check_viewport(crtc, crtc->x, crtc->y, &crtc->mode, fb);
> +	if (crtc->state) {
> +		const struct drm_plane_state *state = crtc->primary->state;
> +
> +		ret = check_src_coords(state->src_x, state->src_y,
> +				       state->src_w, state->src_h, fb);
> +	} else {
> +		ret = drm_crtc_check_viewport(crtc, crtc->x, crtc->y, &crtc->mode, fb);
> +	}
>  	if (ret)
>  		goto out;
>  
> -- 
> 2.4.9
> 

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-10-16 16:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15 17:39 [PATCH 1/5] drm: Don't leak fb when plane crtc coodinates are bad ville.syrjala
2015-10-15 17:39 ` [PATCH 2/5] drm: Swap w/h when converting the mode to src coordidates for a rotated primary plane ville.syrjala
2015-10-15 17:40 ` [PATCH 3/5] drm: Refactor plane src coordinate checks ville.syrjala
2015-10-15 17:40 ` [PATCH 4/5] drm: Check crtc viewport correctly with rotated primary plane on atomic drivers ville.syrjala
2015-10-16  0:32   ` Matt Roper
2015-10-16  8:38     ` Ville Syrjälä
2015-10-16 14:35       ` Daniel Vetter
2015-10-16 15:10         ` Ville Syrjälä
2015-10-16 15:26           ` Matt Roper
2015-10-16 15:38   ` [PATCH v2 " ville.syrjala
2015-10-15 17:40 ` [PATCH 5/5] drm: Check plane src coordinates correctly during page flip for " ville.syrjala
2015-10-16 16:27   ` Matt Roper [this message]
2015-10-16 16:40     ` Tvrtko Ursulin
2015-10-16 17:17       ` Daniel Vetter
2015-10-16 17:46         ` Matt Roper

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=20151016162749.GD30151@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=tvrtko.ursulin@linux.intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox