linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Kern <alex.kern@gmx.de>
To: "Antonino A. Daplas" <adaplas@hotpop.com>
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH atyfb] fix hw cursor in doublescan modes
Date: Wed, 10 Nov 2004 19:25:30 +0100	[thread overview]
Message-ID: <200411101925.30957.alex.kern@gmx.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 86 bytes --]

fix hw cursor in doublescan modes 

Signed-off-by: Alexander Kern <alex.kern@gmx.de>


[-- Attachment #2: atyfb_fix_cursor_in_doublescanmode.patch --]
[-- Type: text/x-diff, Size: 1083 bytes --]

--- linux-2.6.head/drivers/video/aty/mach64_cursor.c.orig	2004-11-07 17:14:57.000000000 +0100
+++ linux-2.6.head/drivers/video/aty/mach64_cursor.c	2004-11-09 15:04:56.000000000 +0100
@@ -75,7 +75,7 @@
 {
 	struct atyfb_par *par = (struct atyfb_par *) info->par;
 	u16 xoff, yoff;
-	int x, y;
+	int x, y, h;
 
 #ifdef __sparc__
 	if (par->mmaped)
@@ -106,17 +106,20 @@
 			yoff = 0;
 		}
 
+		h = cursor->image.height;
+		
 		/*
-		 * In doublescan mode, the cursor location also needs to be
-		 * doubled.
+		 * In doublescan mode, the cursor location
+		 * and heigh also needs to be doubled.
 		 */
-                if (par->crtc.gen_cntl & CRTC_DBL_SCAN_EN)
+                if (par->crtc.gen_cntl & CRTC_DBL_SCAN_EN) {
 			y<<=1;
+			h<<=1;
+		}
 		wait_for_fifo(4, par);
 		aty_st_le32(CUR_OFFSET, (info->fix.smem_len >> 3) + (yoff << 1), par);
 		aty_st_le32(CUR_HORZ_VERT_OFF,
-			    ((u32) (64 - cursor->image.height + yoff) << 16) | xoff,
-			    par);
+			    ((u32) (64 - h + yoff) << 16) | xoff, par);
 		aty_st_le32(CUR_HORZ_VERT_POSN, ((u32) y << 16) | x, par);
 	}
 

                 reply	other threads:[~2004-11-10 18:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200411101925.30957.alex.kern@gmx.de \
    --to=alex.kern@gmx.de \
    --cc=adaplas@hotpop.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).