summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/arm/hdlcd_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/arm/hdlcd_drv.c')
-rw-r--r--drivers/gpu/drm/arm/hdlcd_drv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
index 22bf366d6e3..70592c7abd6 100644
--- a/drivers/gpu/drm/arm/hdlcd_drv.c
+++ b/drivers/gpu/drm/arm/hdlcd_drv.c
@@ -78,6 +78,9 @@ static int hdlcd_unload(struct drm_device *dev)
return 0;
}
+/* Use colour depth that Android user-side is hard-coded to expect */
+static const int preferred_bpp = config_enabled(CONFIG_ARM) ? 16 : 32;
+
static int hdlcd_load(struct drm_device *dev, unsigned long flags)
{
struct platform_device *pdev = dev->platformdev;
@@ -174,7 +177,7 @@ static int hdlcd_load(struct drm_device *dev, unsigned long flags)
init_completion(&hdlcd->frame_completion);
- hdlcd->fbdev = drm_fbdev_cma_init(dev, 32,
+ hdlcd->fbdev = drm_fbdev_cma_init(dev, preferred_bpp,
dev->mode_config.num_crtc,
dev->mode_config.num_connector);