Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137227
b: refs/heads/master
c: 1512222
h: refs/heads/master
i:
  137225: 6b52990
  137223: dbeb842
v: v3
  • Loading branch information
Sascha Hauer committed Mar 13, 2009
1 parent cbcfee2 commit 69161ba
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9db973a59b73fb5baf69f8b5d005daccec6d997e
refs/heads/master: 1512222b105beaff7b7fe11aa4220bcd0088e421
19 changes: 15 additions & 4 deletions trunk/drivers/video/imxfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* linux-arm-kernel@lists.arm.linux.org.uk
*/


#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
Expand Down Expand Up @@ -159,6 +158,17 @@ struct imxfb_info {
#define MIN_XRES 64
#define MIN_YRES 64

/* Actually this really is 18bit support, the lowest 2 bits of each colour
* are unused in hardware. We claim to have 24bit support to make software
* like X work, which does not support 18bit.
*/
static struct imxfb_rgb def_rgb_18 = {
.red = {.offset = 16, .length = 8,},
.green = {.offset = 8, .length = 8,},
.blue = {.offset = 0, .length = 8,},
.transp = {.offset = 0, .length = 0,},
};

static struct imxfb_rgb def_rgb_16_tft = {
.red = {.offset = 11, .length = 5,},
.green = {.offset = 5, .length = 6,},
Expand Down Expand Up @@ -286,6 +296,9 @@ static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)

pr_debug("var->bits_per_pixel=%d\n", var->bits_per_pixel);
switch (var->bits_per_pixel) {
case 32:
rgb = &def_rgb_18;
break;
case 16:
default:
if (readl(fbi->regs + LCDC_PCR) & PCR_TFT)
Expand Down Expand Up @@ -327,9 +340,7 @@ static int imxfb_set_par(struct fb_info *info)
struct imxfb_info *fbi = info->par;
struct fb_var_screeninfo *var = &info->var;

pr_debug("set_par\n");

if (var->bits_per_pixel == 16)
if (var->bits_per_pixel == 16 || var->bits_per_pixel == 32)
info->fix.visual = FB_VISUAL_TRUECOLOR;
else if (!fbi->cmap_static)
info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
Expand Down

0 comments on commit 69161ba

Please sign in to comment.