16bit and 32bit change problem
authorhuangdesheng <root@huangds-desktop.(none)>
Sat, 9 Apr 2011 07:24:22 +0000 (15:24 +0800)
committerhuangdesheng <root@huangds-desktop.(none)>
Sat, 9 Apr 2011 07:24:22 +0000 (15:24 +0800)
drivers/video/rk29_fb.c

index 99b49e4582bb02de1f2ae1ec15e46bd377fa8f65..a40437da0851396c8825785b1b52e3d5c0d737cf 100755 (executable)
@@ -1342,7 +1342,9 @@ static int fb0_set_par(struct fb_info *info)
     {
     case 16:    // rgb565
         par->format = 1;
-        fix->line_length = 2 * xres_virtual;
+        //fix->line_length = 2 * xres_virtual;
+        fix->line_length = (inf->fb0_color_deepth ? 4:2) * xres_virtual;   //32bit and 16bit change
+
         #ifdef CONFIG_FB_WORK_IPP
         dstoffset = ((ypos_virtual*screen->y_res/var->yres) *screen->x_res + (xpos_virtual*screen->x_res)/var->xres )*2;
         ipp_req.src0.fmt = IPP_RGB_565;