From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicholas Miell Subject: [PATCH] drm/radeon/kms: fix cursor image off-by-one error Date: Thu, 29 Sep 2011 19:07:14 -0700 Message-ID: <1317348434-30929-1-git-send-email-nmiell@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-yi0-f49.google.com (mail-yi0-f49.google.com [209.85.218.49]) by gabe.freedesktop.org (Postfix) with ESMTP id ABD739F616 for ; Thu, 29 Sep 2011 19:07:51 -0700 (PDT) Received: by yic24 with SMTP id 24so1325894yic.36 for ; Thu, 29 Sep 2011 19:07:51 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: michel@daenzer.net, Nicholas Miell List-Id: dri-devel@lists.freedesktop.org The mouse cursor hotspot calculation when the cursor is partially off the top or left side of the screen was off by one. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41158 Signed-off-by: Nicholas Miell --- drivers/gpu/drm/radeon/radeon_cursor.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c index 3189a7e..c495575 100644 --- a/drivers/gpu/drm/radeon/radeon_cursor.c +++ b/drivers/gpu/drm/radeon/radeon_cursor.c @@ -209,9 +209,9 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc, int w = radeon_crtc->cursor_width; if (x < 0) - xorigin = -x + 1; + xorigin = -x; if (y < 0) - yorigin = -y + 1; + yorigin = -y; if (xorigin >= CURSOR_WIDTH) xorigin = CURSOR_WIDTH - 1; if (yorigin >= CURSOR_HEIGHT) -- 1.7.6.2