diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2018-05-02 04:54:38 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-05-02 04:54:37 -0700 |
commit | c38b8343986363b2ea42f82d68bfb79eab6bc7db (patch) | |
tree | f07f98999bf6cc1a87ee3d9dd6d645dfcc17cada /drivers/video/fbdev | |
parent | 1c294945bcd0850d97d3e5a835f4d2a0f8db94cd (diff) | |
parent | 0382cccfeeb0206e66e75abbc9aa7fbcc13a9f6c (diff) |
Merge "Merge android-4.4.128 (89904cc) into msm-4.4"
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r-- | drivers/video/fbdev/vfb.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/video/fbdev/vfb.c b/drivers/video/fbdev/vfb.c index 728cb6b23c42..7d8dfc7f1269 100644 --- a/drivers/video/fbdev/vfb.c +++ b/drivers/video/fbdev/vfb.c @@ -298,8 +298,23 @@ static int vfb_check_var(struct fb_var_screeninfo *var, */ static int vfb_set_par(struct fb_info *info) { + switch (info->var.bits_per_pixel) { + case 1: + info->fix.visual = FB_VISUAL_MONO01; + break; + case 8: + info->fix.visual = FB_VISUAL_PSEUDOCOLOR; + break; + case 16: + case 24: + case 32: + info->fix.visual = FB_VISUAL_TRUECOLOR; + break; + } + info->fix.line_length = get_line_length(info->var.xres_virtual, info->var.bits_per_pixel); + return 0; } @@ -540,6 +555,8 @@ static int vfb_probe(struct platform_device *dev) goto err2; platform_set_drvdata(dev, info); + vfb_set_par(info); + fb_info(info, "Virtual frame buffer device, using %ldK of video memory\n", videomemorysize >> 10); return 0; |