aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorSudhakar Rajashekhara <sudhakar.raj@ti.com>2009-12-01 16:17:43 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-01 19:32:19 -0500
commit3510b8f7f53bf0ded13888724734bba87d22ecc3 (patch)
tree0a4680d44c9867a1124bc6939170c7ae54d1aa2d /drivers/video
parentfa00e106eb6f082654d822a0946c0c86297ede2c (diff)
davinci: fb: fix frame buffer driver issues
Following issues have been addressed on DA8XX/OMAP-L1XX: a. Screen misalignment during booting when frame buffer console is enabled. b. Driver was configured always in PSEUDOCOLOR mode. This patch dynamically configures the driver either in PSEUDOCOLOUR or TRUECOLOR mode depending on bpp. c. The RED and BLUE offsets were interchanged resulting in wrong bootup logo colour. This patch has been tested on DA830/OMAP-L137 and DA850/OMAP-L138 EVMs. Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Cc: Steve Chen <schen@mvista.com> Cc: Pavel Kiryukhin <pkiryukhin@ru.mvista.com> Cc: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/da8xx-fb.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 035d56835b75..ea1fd3f47511 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -554,11 +554,11 @@ static int fb_check_var(struct fb_var_screeninfo *var,
554 var->transp.length = 0; 554 var->transp.length = 0;
555 break; 555 break;
556 case 16: /* RGB 565 */ 556 case 16: /* RGB 565 */
557 var->red.offset = 0; 557 var->red.offset = 11;
558 var->red.length = 5; 558 var->red.length = 5;
559 var->green.offset = 5; 559 var->green.offset = 5;
560 var->green.length = 6; 560 var->green.length = 6;
561 var->blue.offset = 11; 561 var->blue.offset = 0;
562 var->blue.length = 5; 562 var->blue.length = 5;
563 var->transp.offset = 0; 563 var->transp.offset = 0;
564 var->transp.length = 0; 564 var->transp.length = 0;
@@ -591,7 +591,7 @@ static int __devexit fb_remove(struct platform_device *dev)
591 unregister_framebuffer(info); 591 unregister_framebuffer(info);
592 fb_dealloc_cmap(&info->cmap); 592 fb_dealloc_cmap(&info->cmap);
593 dma_free_coherent(NULL, par->databuf_sz + PAGE_SIZE, 593 dma_free_coherent(NULL, par->databuf_sz + PAGE_SIZE,
594 info->screen_base, 594 info->screen_base - PAGE_SIZE,
595 info->fix.smem_start); 595 info->fix.smem_start);
596 free_irq(par->irq, par); 596 free_irq(par->irq, par);
597 clk_disable(par->lcdc_clk); 597 clk_disable(par->lcdc_clk);
@@ -749,6 +749,7 @@ static int __init fb_probe(struct platform_device *device)
749 (PAGE_SIZE - par->palette_sz); 749 (PAGE_SIZE - par->palette_sz);
750 750
751 /* the rest of the frame buffer is pixel data */ 751 /* the rest of the frame buffer is pixel data */
752 da8xx_fb_info->screen_base = par->v_palette_base + par->palette_sz;
752 da8xx_fb_fix.smem_start = par->p_palette_base + par->palette_sz; 753 da8xx_fb_fix.smem_start = par->p_palette_base + par->palette_sz;
753 da8xx_fb_fix.smem_len = par->databuf_sz - par->palette_sz; 754 da8xx_fb_fix.smem_len = par->databuf_sz - par->palette_sz;
754 da8xx_fb_fix.line_length = (lcdc_info->width * lcd_cfg->bpp) / 8; 755 da8xx_fb_fix.line_length = (lcdc_info->width * lcd_cfg->bpp) / 8;
@@ -787,6 +788,8 @@ static int __init fb_probe(struct platform_device *device)
787 da8xx_fb_info->var = da8xx_fb_var; 788 da8xx_fb_info->var = da8xx_fb_var;
788 da8xx_fb_info->fbops = &da8xx_fb_ops; 789 da8xx_fb_info->fbops = &da8xx_fb_ops;
789 da8xx_fb_info->pseudo_palette = par->pseudo_palette; 790 da8xx_fb_info->pseudo_palette = par->pseudo_palette;
791 da8xx_fb_info->fix.visual = (da8xx_fb_info->var.bits_per_pixel <= 8) ?
792 FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
790 793
791 ret = fb_alloc_cmap(&da8xx_fb_info->cmap, PALETTE_SIZE, 0); 794 ret = fb_alloc_cmap(&da8xx_fb_info->cmap, PALETTE_SIZE, 0);
792 if (ret) 795 if (ret)
@@ -825,7 +828,7 @@ err_free_irq:
825 828
826err_release_fb_mem: 829err_release_fb_mem:
827 dma_free_coherent(NULL, par->databuf_sz + PAGE_SIZE, 830 dma_free_coherent(NULL, par->databuf_sz + PAGE_SIZE,
828 da8xx_fb_info->screen_base, 831 da8xx_fb_info->screen_base - PAGE_SIZE,
829 da8xx_fb_info->fix.smem_start); 832 da8xx_fb_info->fix.smem_start);
830 833
831err_release_fb: 834err_release_fb: