[PATCH 5/5] drm: Check plane src coordinates correctly during page flip for atomic drivers
Matt Roper
matthew.d.roper at intel.com
Fri Oct 16 09:27:49 PDT 2015
On Thu, Oct 15, 2015 at 08:40:02PM +0300, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at 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 at intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
For the series:
Reviewed-by: Matt Roper <matthew.d.roper at 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
More information about the dri-devel
mailing list