fbdev: Fix cursor in doublescan mode in atyfb

Started by Antonino A. Daplas on Nov 11, 2004

Subsystems (2)

Maintainers (2)

DORMANTno replies

open the first message on its own page

Message details and related content
fix hw cursor in doublescan modes 

Signed-off-by: Alexander Kern <redacted>
Signed-off-by: Antonino Daplas <redacted>
---

 mach64_cursor.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff -Nru a/drivers/video/aty/mach64_cursor.c b/drivers/video/aty/mach64_cursor.c
--- a/drivers/video/aty/mach64_cursor.c	2004-10-27 14:58:07 +08:00
+++ b/drivers/video/aty/mach64_cursor.c	2004-11-11 09:56:33 +08:00
@@ -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);
 	}
 





-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help