Skip to content

Commit

Permalink
video: da8xx-fb: Fix casting of info->pseudo_palette
Browse files Browse the repository at this point in the history
The casting to (u16 *) on info->pseudo_palette is wrong and causes the
display to show a blue (garbage) vertical line on every other pixel column

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Jon Ringle authored and Tomi Valkeinen committed Apr 14, 2014
1 parent c9eaa44 commit 8d01864
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions drivers/video/da8xx-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,15 +663,7 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
(green << info->var.green.offset) |
(blue << info->var.blue.offset);

switch (info->var.bits_per_pixel) {
case 16:
((u16 *) (info->pseudo_palette))[regno] = v;
break;
case 24:
case 32:
((u32 *) (info->pseudo_palette))[regno] = v;
break;
}
((u32 *) (info->pseudo_palette))[regno] = v;
if (palette[0] != 0x4000) {
update_hw = 1;
palette[0] = 0x4000;
Expand Down

0 comments on commit 8d01864

Please sign in to comment.