summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2015-11-13 20:10:04 +0300
committerPhilipp Zabel <p.zabel@pengutronix.de>2015-11-24 13:29:21 +0300
commit9832e8110256f3e4301d97c0c6559e5b63825751 (patch)
treea3ab93b3eb29cb82cb80e6607acc67f22d812645
parenta7ed3c2b151e7581ed6022d0fe65903ccb502dc5 (diff)
downloadlinux-9832e8110256f3e4301d97c0c6559e5b63825751.tar.xz
drm/imx: parallel-display: allow to determine bus format from the connected panel
Similarly to commit 5e501ed7253b3 ("drm/imx: imx-ldb: allow to determine bus format from the connected panel"), if a panel is connected to the ldb output port via the of_graph bindings, the data mapping is determined from the display_info.bus_format field provided by the panel instead of from the optional interface_pix_fmt device tree property. Reported-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Gary Bisson <gary.bisson@boundarydevices.com>
-rw-r--r--drivers/gpu/drm/imx/parallel-display.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/parallel-display.c
index b4deb9cf9d71..2e9b9f1b5cd2 100644
--- a/drivers/gpu/drm/imx/parallel-display.c
+++ b/drivers/gpu/drm/imx/parallel-display.c
@@ -54,7 +54,11 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
if (imxpd->panel && imxpd->panel->funcs &&
imxpd->panel->funcs->get_modes) {
+ struct drm_display_info *di = &connector->display_info;
+
num_modes = imxpd->panel->funcs->get_modes(imxpd->panel);
+ if (!imxpd->bus_format && di->num_bus_formats)
+ imxpd->bus_format = di->bus_formats[0];
if (num_modes > 0)
return num_modes;
}