From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 14/14] drm/i915: Fix cursor visibility checks also for the right/bottom screen edges Date: Mon, 16 Sep 2013 23:52:17 +0200 Message-ID: <20130916215217.GH32145@phenom.ffwll.local> References: <1378308331-21388-1-git-send-email-ville.syrjala@linux.intel.com> <1378308331-21388-15-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ea0-f175.google.com (mail-ea0-f175.google.com [209.85.215.175]) by gabe.freedesktop.org (Postfix) with ESMTP id 8CBADE6950 for ; Mon, 16 Sep 2013 14:52:02 -0700 (PDT) Received: by mail-ea0-f175.google.com with SMTP id m14so2325329eaj.34 for ; Mon, 16 Sep 2013 14:52:01 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1378308331-21388-15-git-send-email-ville.syrjala@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: ville.syrjala@linux.intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Sep 04, 2013 at 06:25:31PM +0300, ville.syrjala@linux.intel.com wro= te: > From: Ville Syrj=E4l=E4 > = > First of all we should not be looking at fb->{width,height} as those do > not tell us what the actual pipe size is. Second of all we need to use > >=3D for the comparison. > = > So fix the comparison, and make use of the new pipe_src_{w,h} to > determine the real pipe source dimensions. > = > Reviewed-by: Chris Wilson > Signed-off-by: Ville Syrj=E4l=E4 Merged the entire series to dinq, thanks for patches&review. I've also made a small note that we should have an igt testcase for these cursor corner-cases somewhere ... Cheers, Daniel > --- > drivers/gpu/drm/i915/intel_display.c | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-) > = > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/= intel_display.c > index 20f373b..44e0a84 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -7000,19 +7000,16 @@ static void intel_crtc_update_cursor(struct drm_c= rtc *crtc, > int pipe =3D intel_crtc->pipe; > int x =3D intel_crtc->cursor_x; > int y =3D intel_crtc->cursor_y; > - u32 base, pos; > + u32 base =3D 0, pos =3D 0; > bool visible; > = > - pos =3D 0; > - > - if (on && crtc->enabled && crtc->fb) { > + if (on) > base =3D intel_crtc->cursor_addr; > - if (x > (int) crtc->fb->width) > - base =3D 0; > = > - if (y > (int) crtc->fb->height) > - base =3D 0; > - } else > + if (x >=3D intel_crtc->config.pipe_src_w) > + base =3D 0; > + > + if (y >=3D intel_crtc->config.pipe_src_h) > base =3D 0; > = > if (x < 0) { > -- = > 1.8.1.5 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch