aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/aty/mach64_cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/aty/mach64_cursor.c')
-rw-r--r--drivers/video/aty/mach64_cursor.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/video/aty/mach64_cursor.c b/drivers/video/aty/mach64_cursor.c
index faf95da8fcb..04c710804bb 100644
--- a/drivers/video/aty/mach64_cursor.c
+++ b/drivers/video/aty/mach64_cursor.c
@@ -77,9 +77,13 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
77 if (par->asleep) 77 if (par->asleep)
78 return -EPERM; 78 return -EPERM;
79 79
80 /* Hide cursor */
81 wait_for_fifo(1, par); 80 wait_for_fifo(1, par);
82 aty_st_le32(GEN_TEST_CNTL, aty_ld_le32(GEN_TEST_CNTL, par) & ~HWCURSOR_ENABLE, par); 81 if (cursor->enable)
82 aty_st_le32(GEN_TEST_CNTL, aty_ld_le32(GEN_TEST_CNTL, par)
83 | HWCURSOR_ENABLE, par);
84 else
85 aty_st_le32(GEN_TEST_CNTL, aty_ld_le32(GEN_TEST_CNTL, par)
86 & ~HWCURSOR_ENABLE, par);
83 87
84 /* set position */ 88 /* set position */
85 if (cursor->set & FB_CUR_SETPOS) { 89 if (cursor->set & FB_CUR_SETPOS) {
@@ -109,7 +113,7 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
109 y<<=1; 113 y<<=1;
110 h<<=1; 114 h<<=1;
111 } 115 }
112 wait_for_fifo(4, par); 116 wait_for_fifo(3, par);
113 aty_st_le32(CUR_OFFSET, (info->fix.smem_len >> 3) + (yoff << 1), par); 117 aty_st_le32(CUR_OFFSET, (info->fix.smem_len >> 3) + (yoff << 1), par);
114 aty_st_le32(CUR_HORZ_VERT_OFF, 118 aty_st_le32(CUR_HORZ_VERT_OFF,
115 ((u32) (64 - h + yoff) << 16) | xoff, par); 119 ((u32) (64 - h + yoff) << 16) | xoff, par);
@@ -177,11 +181,6 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
177 } 181 }
178 } 182 }
179 183
180 if (cursor->enable) {
181 wait_for_fifo(1, par);
182 aty_st_le32(GEN_TEST_CNTL, aty_ld_le32(GEN_TEST_CNTL, par)
183 | HWCURSOR_ENABLE, par);
184 }
185 return 0; 184 return 0;
186} 185}
187 186