Commit 4647a64f authored by Tomi Valkeinen's avatar Tomi Valkeinen Committed by Andrzej Hajda

drm/bridge: tc358767: use bridge mode_valid

We have tc_connector_mode_valid() to filter out videomdoes that the
tc358767 cannot support. As it is a bridge limitation, change the code
to use drm_bridge_funcs's mode_valid instead.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-19-tomi.valkeinen@ti.com
parent 2792c152
...@@ -1154,10 +1154,10 @@ static bool tc_bridge_mode_fixup(struct drm_bridge *bridge, ...@@ -1154,10 +1154,10 @@ static bool tc_bridge_mode_fixup(struct drm_bridge *bridge,
return true; return true;
} }
static enum drm_mode_status tc_connector_mode_valid(struct drm_connector *connector, static enum drm_mode_status tc_mode_valid(struct drm_bridge *bridge,
struct drm_display_mode *mode) const struct drm_display_mode *mode)
{ {
struct tc_data *tc = connector_to_tc(connector); struct tc_data *tc = bridge_to_tc(bridge);
u32 req, avail; u32 req, avail;
u32 bits_per_pixel = 24; u32 bits_per_pixel = 24;
...@@ -1226,7 +1226,6 @@ tc_connector_best_encoder(struct drm_connector *connector) ...@@ -1226,7 +1226,6 @@ tc_connector_best_encoder(struct drm_connector *connector)
static const struct drm_connector_helper_funcs tc_connector_helper_funcs = { static const struct drm_connector_helper_funcs tc_connector_helper_funcs = {
.get_modes = tc_connector_get_modes, .get_modes = tc_connector_get_modes,
.mode_valid = tc_connector_mode_valid,
.best_encoder = tc_connector_best_encoder, .best_encoder = tc_connector_best_encoder,
}; };
...@@ -1269,6 +1268,7 @@ static int tc_bridge_attach(struct drm_bridge *bridge) ...@@ -1269,6 +1268,7 @@ static int tc_bridge_attach(struct drm_bridge *bridge)
static const struct drm_bridge_funcs tc_bridge_funcs = { static const struct drm_bridge_funcs tc_bridge_funcs = {
.attach = tc_bridge_attach, .attach = tc_bridge_attach,
.mode_valid = tc_mode_valid,
.mode_set = tc_bridge_mode_set, .mode_set = tc_bridge_mode_set,
.pre_enable = tc_bridge_pre_enable, .pre_enable = tc_bridge_pre_enable,
.enable = tc_bridge_enable, .enable = tc_bridge_enable,
......
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