gpu:drm:tilcdc: get preferred_bpp value from DT
The preferred_bpp value in currently hard-coded to 16. This causes color corruption on the am335x-evm lcd panel which requires 32 bpp instead. This changes attempts to use the configured bpp value from the DT or built-in panel-info struct. Signed-off-by: Benoit Parrot <bparrot@ti.com> Acked-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:

committed by
Dave Airlie

parent
d6f76f3707
commit
dc28aa072f
@@ -157,7 +157,9 @@ static int tilcdc_load(struct drm_device *dev, unsigned long flags)
|
||||
struct platform_device *pdev = dev->platformdev;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
struct tilcdc_drm_private *priv;
|
||||
struct tilcdc_module *mod;
|
||||
struct resource *res;
|
||||
u32 bpp = 0;
|
||||
int ret;
|
||||
|
||||
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
|
||||
@@ -256,7 +258,15 @@ static int tilcdc_load(struct drm_device *dev, unsigned long flags)
|
||||
|
||||
platform_set_drvdata(pdev, dev);
|
||||
|
||||
priv->fbdev = drm_fbdev_cma_init(dev, 16,
|
||||
|
||||
list_for_each_entry(mod, &module_list, list) {
|
||||
DBG("%s: preferred_bpp: %d", mod->name, mod->preferred_bpp);
|
||||
bpp = mod->preferred_bpp;
|
||||
if (bpp > 0)
|
||||
break;
|
||||
}
|
||||
|
||||
priv->fbdev = drm_fbdev_cma_init(dev, bpp,
|
||||
dev->mode_config.num_crtc,
|
||||
dev->mode_config.num_connector);
|
||||
|
||||
|
Reference in New Issue
Block a user