aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh7760fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/sh7760fb.c')
-rw-r--r--drivers/video/sh7760fb.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/video/sh7760fb.c b/drivers/video/sh7760fb.c
index 653bdfee3057..9f6d6e61f0cc 100644
--- a/drivers/video/sh7760fb.c
+++ b/drivers/video/sh7760fb.c
@@ -120,18 +120,6 @@ static int sh7760_setcolreg (u_int regno,
120 return 0; 120 return 0;
121} 121}
122 122
123static void encode_fix(struct fb_fix_screeninfo *fix, struct fb_info *info,
124 unsigned long stride)
125{
126 memset(fix, 0, sizeof(struct fb_fix_screeninfo));
127 strcpy(fix->id, "sh7760-lcdc");
128
129 fix->smem_start = (unsigned long)info->screen_base;
130 fix->smem_len = info->screen_size;
131
132 fix->line_length = stride;
133}
134
135static int sh7760fb_get_color_info(struct device *dev, 123static int sh7760fb_get_color_info(struct device *dev,
136 u16 lddfr, int *bpp, int *gray) 124 u16 lddfr, int *bpp, int *gray)
137{ 125{
@@ -334,7 +322,8 @@ static int sh7760fb_set_par(struct fb_info *info)
334 322
335 iowrite32(ldsarl, par->base + LDSARL); /* mem for lower half of DSTN */ 323 iowrite32(ldsarl, par->base + LDSARL); /* mem for lower half of DSTN */
336 324
337 encode_fix(&info->fix, info, stride); 325 info->fix.line_length = stride;
326
338 sh7760fb_check_var(&info->var, info); 327 sh7760fb_check_var(&info->var, info);
339 328
340 sh7760fb_blank(FB_BLANK_UNBLANK, info); /* panel on! */ 329 sh7760fb_blank(FB_BLANK_UNBLANK, info); /* panel on! */
@@ -435,6 +424,8 @@ static int sh7760fb_alloc_mem(struct fb_info *info)
435 424
436 info->screen_base = fbmem; 425 info->screen_base = fbmem;
437 info->screen_size = vram; 426 info->screen_size = vram;
427 info->fix.smem_start = (unsigned long)info->screen_base;
428 info->fix.smem_len = info->screen_size;
438 429
439 return 0; 430 return 0;
440} 431}
@@ -520,6 +511,8 @@ static int __devinit sh7760fb_probe(struct platform_device *pdev)
520 info->var.transp.length = 0; 511 info->var.transp.length = 0;
521 info->var.transp.msb_right = 0; 512 info->var.transp.msb_right = 0;
522 513
514 strcpy(info->fix.id, "sh7760-lcdc");
515
523 /* set the DON2 bit now, before cmap allocation, as it will randomize 516 /* set the DON2 bit now, before cmap allocation, as it will randomize
524 * palette memory. 517 * palette memory.
525 */ 518 */