summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bridge/tc358767.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2019-05-28 11:27:44 +0300
committerAndrzej Hajda <a.hajda@samsung.com>2019-05-31 15:41:29 +0200
commit3231573065ad4f4ecc5c9147b24f29f846dc0c2f (patch)
treef2aabe7b30168cbbbb0f2224bcea821007d7a4ba /drivers/gpu/drm/bridge/tc358767.c
parent46648a3cec2d5e1bf6af1919f5f79505fcbf3af8 (diff)
downloadtalos-op-linux-3231573065ad4f4ecc5c9147b24f29f846dc0c2f.tar.gz
talos-op-linux-3231573065ad4f4ecc5c9147b24f29f846dc0c2f.zip
drm/bridge: tc358767: read display_props in get_modes()
We need to know the link bandwidth to filter out modes we cannot support, so we need to have read the display props before doing the filtering. To ensure we have up to date display props, call tc_get_display_props() in the beginning of tc_connector_get_modes(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-22-tomi.valkeinen@ti.com
Diffstat (limited to 'drivers/gpu/drm/bridge/tc358767.c')
-rw-r--r--drivers/gpu/drm/bridge/tc358767.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index ffcbecf69d40..2b9d6046d76e 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -1188,6 +1188,13 @@ static int tc_connector_get_modes(struct drm_connector *connector)
struct tc_data *tc = connector_to_tc(connector);
struct edid *edid;
unsigned int count;
+ int ret;
+
+ ret = tc_get_display_props(tc);
+ if (ret < 0) {
+ dev_err(tc->dev, "failed to read display props: %d\n", ret);
+ return 0;
+ }
if (tc->panel && tc->panel->funcs && tc->panel->funcs->get_modes) {
count = tc->panel->funcs->get_modes(tc->panel);
OpenPOWER on IntegriCloud