aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2015-09-08 13:14:53 +0100
committerJon Medhurst <tixy@linaro.org>2015-11-02 09:40:57 +0000
commit1654e834e0c6c61dccaa62e4d15f1e2d865f611c (patch)
tree2ab8532c55a1bd57eebd0cebdd24b2637aaf0506 /drivers/gpu/drm
parent02115102558f5e79a6b1887cbe5666a3ba5b5045 (diff)
drm: hdlcd: Set default colour depth to match Android's expectations
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'drivers/gpu/drm')
-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 22bf366d6e38..70592c7abd63 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);