summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/pmag-aa-fb.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2016-02-22 01:55:21 (GMT)
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-02-26 11:06:11 (GMT)
commit01ac59c34420d5807724a5bb21c1464e6dfb7a92 (patch)
tree3fa78bdc46ec0b5afbc3854ba9ef7a917fbf5305 /drivers/video/fbdev/pmag-aa-fb.c
parente26d682e929d2e4141a4e08d7acc320896289b62 (diff)
downloadlinux-01ac59c34420d5807724a5bb21c1464e6dfb7a92.tar.xz
video: fbdev: pmag-ba-fb: Fix and rework Bt455 colormap handling
The Bt455 is a greyscale RAMDAC, using the green color palette entries only while still providing registers for the red and blue components, all the three of which have to be loaded on palette updates. Chip documentation [1] mandates that the unused red and blue registers are written with 0. Therefore update code to follow this requirement and given that it makes the red and blue components unusable remove them from internal API calls altogether. References: [1] "Bt454 Bt455 170 MHz Monolithic CMOS 16 Color Palette RAMDAC", Brooktree Corporation, Document Number: L454001, Rev. I Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/fbdev/pmag-aa-fb.c')
-rw-r--r--drivers/video/fbdev/pmag-aa-fb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/video/fbdev/pmag-aa-fb.c b/drivers/video/fbdev/pmag-aa-fb.c
index def86f7..6f4466c 100644
--- a/drivers/video/fbdev/pmag-aa-fb.c
+++ b/drivers/video/fbdev/pmag-aa-fb.c
@@ -121,9 +121,9 @@ static int aafb_cursor(struct fb_info *info, struct fb_cursor *cursor)
u8 fg = cursor->image.fg_color ? 0xf : 0x0;
u8 bg = cursor->image.bg_color ? 0xf : 0x0;
- bt455_write_cmap_entry(par->bt455, 8, 0, bg, 0);
- bt455_write_cmap_entry(par->bt455, 9, 0, bg, 0);
- bt455_write_ovly_entry(par->bt455, 0, 0, fg, 0);
+ bt455_write_cmap_entry(par->bt455, 8, bg);
+ bt455_write_cmap_entry(par->bt455, 9, bg);
+ bt455_write_ovly_entry(par->bt455, 0, fg);
}
if (cursor->set & (FB_CUR_SETSIZE | FB_CUR_SETSHAPE | FB_CUR_SETIMAGE))
bt431_set_cursor(par->bt431,
@@ -143,7 +143,7 @@ static int aafb_blank(int blank, struct fb_info *info)
struct aafb_par *par = info->par;
u8 val = blank ? 0x00 : 0x0f;
- bt455_write_cmap_entry(par->bt455, 1, val, val, val);
+ bt455_write_cmap_entry(par->bt455, 1, val);
return 0;
}
@@ -211,8 +211,8 @@ static int pmagaafb_probe(struct device *dev)
info->screen_size = info->fix.smem_len;
/* Init colormap. */
- bt455_write_cmap_entry(par->bt455, 0, 0x00, 0x00, 0x00);
- bt455_write_cmap_entry(par->bt455, 1, 0x0f, 0x0f, 0x0f);
+ bt455_write_cmap_entry(par->bt455, 0, 0x0);
+ bt455_write_cmap_entry(par->bt455, 1, 0xf);
/* Init hardware cursor. */
bt431_erase_cursor(par->bt431);