aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/s3c-fb.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 5c7ac01ab61d..b00c064beddf 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -116,6 +116,20 @@ struct s3c_fb_driverdata {
116}; 116};
117 117
118/** 118/**
119 * struct s3c_fb_palette - palette information
120 * @r: Red bitfield.
121 * @g: Green bitfield.
122 * @b: Blue bitfield.
123 * @a: Alpha bitfield.
124 */
125struct s3c_fb_palette {
126 struct fb_bitfield r;
127 struct fb_bitfield g;
128 struct fb_bitfield b;
129 struct fb_bitfield a;
130};
131
132/**
119 * struct s3c_fb_win - per window private data for each framebuffer. 133 * struct s3c_fb_win - per window private data for each framebuffer.
120 * @windata: The platform data supplied for the window configuration. 134 * @windata: The platform data supplied for the window configuration.
121 * @parent: The hardware that this window is part of. 135 * @parent: The hardware that this window is part of.
@@ -866,7 +880,24 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
866 } 880 }
867 881
868 /* setup the r/b/g positions for the window's palette */ 882 /* setup the r/b/g positions for the window's palette */
869 s3c_fb_init_palette(win_no, &win->palette); 883 if (win->variant.palette_16bpp) {
884 /* Set RGB 5:6:5 as default */
885 win->palette.r.offset = 11;
886 win->palette.r.length = 5;
887 win->palette.g.offset = 5;
888 win->palette.g.length = 6;
889 win->palette.b.offset = 0;
890 win->palette.b.length = 5;
891
892 } else {
893 /* Set 8bpp or 8bpp and 1bit alpha */
894 win->palette.r.offset = 16;
895 win->palette.r.length = 8;
896 win->palette.g.offset = 8;
897 win->palette.g.length = 8;
898 win->palette.b.offset = 0;
899 win->palette.b.length = 8;
900 }
870 901
871 /* setup the initial video mode from the window */ 902 /* setup the initial video mode from the window */
872 fb_videomode_to_var(&fbinfo->var, initmode); 903 fb_videomode_to_var(&fbinfo->var, initmode);