Commit 7bb0a60a authored by Sam Ravnborg's avatar Sam Ravnborg

drm/bridge: tc358767: fix opencoded use of drm_panel_*

Replace open coded version with call to drm_panel_get_modes().

Include change to deal with the possible negative
return values from drm_panel_get_modes()

v2:
- Added more info to changelog (Philipp)
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Jernej Skrabec <jernej.skrabec@siol.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-2-sam@ravnborg.org
parent 0e1d8083
...@@ -1312,7 +1312,7 @@ static int tc_connector_get_modes(struct drm_connector *connector) ...@@ -1312,7 +1312,7 @@ static int tc_connector_get_modes(struct drm_connector *connector)
{ {
struct tc_data *tc = connector_to_tc(connector); struct tc_data *tc = connector_to_tc(connector);
struct edid *edid; struct edid *edid;
unsigned int count; int count;
int ret; int ret;
ret = tc_get_display_props(tc); ret = tc_get_display_props(tc);
...@@ -1321,11 +1321,9 @@ static int tc_connector_get_modes(struct drm_connector *connector) ...@@ -1321,11 +1321,9 @@ static int tc_connector_get_modes(struct drm_connector *connector)
return 0; return 0;
} }
if (tc->panel && tc->panel->funcs && tc->panel->funcs->get_modes) { count = drm_panel_get_modes(tc->panel);
count = tc->panel->funcs->get_modes(tc->panel); if (count > 0)
if (count > 0) return count;
return count;
}
edid = drm_get_edid(connector, &tc->aux.ddc); edid = drm_get_edid(connector, &tc->aux.ddc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment