summaryrefslogtreecommitdiffstats
path: root/drivers/video/stifb.c
diff options
context:
space:
mode:
authorTrond Myklebust2008-03-19 22:59:44 +0100
committerTrond Myklebust2008-03-19 22:59:44 +0100
commitc7c350e92aab1bba68f26a6027b734adcf9824ba (patch)
treeaa99bd94c3049dd871d9c030d70a5f3d87591a95 /drivers/video/stifb.c
parentNFS: fix encode_fsinfo_maxsz (diff)
parentnfs: don't ignore return value from nfs_pageio_add_request (diff)
downloadkernel-qcow2-linux-c7c350e92aab1bba68f26a6027b734adcf9824ba.tar.gz
kernel-qcow2-linux-c7c350e92aab1bba68f26a6027b734adcf9824ba.tar.xz
kernel-qcow2-linux-c7c350e92aab1bba68f26a6027b734adcf9824ba.zip
Merge branch 'hotfixes' into devel
Diffstat (limited to 'drivers/video/stifb.c')
-rw-r--r--drivers/video/stifb.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c
index e7c8db2eb49b..f98be301140c 100644
--- a/drivers/video/stifb.c
+++ b/drivers/video/stifb.c
@@ -505,16 +505,24 @@ ngleSetupAttrPlanes(struct stifb_info *fb, int BufferNumber)
static void
rattlerSetupPlanes(struct stifb_info *fb)
{
+ int saved_id, y;
+
+ /* Write RAMDAC pixel read mask register so all overlay
+ * planes are display-enabled. (CRX24 uses Bt462 pixel
+ * read mask register for overlay planes, not image planes).
+ */
CRX24_SETUP_RAMDAC(fb);
- /* replacement for: SETUP_FB(fb, CRX24_OVERLAY_PLANES); */
- WRITE_WORD(0x83000300, fb, REG_14);
- SETUP_HW(fb);
- WRITE_BYTE(1, fb, REG_16b1);
+ /* change fb->id temporarily to fool SETUP_FB() */
+ saved_id = fb->id;
+ fb->id = CRX24_OVERLAY_PLANES;
+ SETUP_FB(fb);
+ fb->id = saved_id;
+
+ for (y = 0; y < fb->info.var.yres; ++y)
+ memset(fb->info.screen_base + y * fb->info.fix.line_length,
+ 0xff, fb->info.var.xres * fb->info.var.bits_per_pixel/8);
- fb_memset((void*)fb->info.fix.smem_start, 0xff,
- fb->info.var.yres*fb->info.fix.line_length);
-
CRX24_SET_OVLY_MASK(fb);
SETUP_FB(fb);
}