From: Daniel Vetter Subject: Re: [PATCH] drm/plane-helper: Fix primary plane scaling check Date: Fri, 11 Apr 2014 09:25:10 +0200 Message-ID: <20140411072510.GU9262@phenom.ffwll.local> References: <1397164686-25090-1-git-send-email-matthew.d.roper@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 638316ECFD for ; Fri, 11 Apr 2014 00:25:13 -0700 (PDT) Received: by mail-ee0-f50.google.com with SMTP id c13so3818638eek.9 for ; Fri, 11 Apr 2014 00:25:12 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1397164686-25090-1-git-send-email-matthew.d.roper@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Matt Roper Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Thu, Apr 10, 2014 at 02:18:06PM -0700, Matt Roper wrote: > The src_w / src_h parameters to update_plane include a subpixel offset; > we need to shift off the subpixel bits before comparing to CRTC size > when checking for primary plane scaling. > > Signed-off-by: Matt Roper Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/drm_plane_helper.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c > index e768d35..9eca283 100644 > --- a/drivers/gpu/drm/drm_plane_helper.c > +++ b/drivers/gpu/drm/drm_plane_helper.c > @@ -145,6 +145,8 @@ int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc, > } > > /* Disallow scaling */ > + src_w >>= 16; > + src_h >>= 16; > if (crtc_w != src_w || crtc_h != src_h) { > DRM_DEBUG_KMS("Can't scale primary plane\n"); > return -EINVAL; > -- > 1.8.5.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch