diff mbox series

[1/5] drm: bridge: ti-sn65dsi83: Move LVDS format selection to .mode_set()

Message ID 20210621125518.13715-2-laurent.pinchart@ideasonboard.com (mailing list archive)
State New, archived
Headers show
Series ti-sn65dsi83: Finalize transition to atomic operations | expand

Commit Message

Laurent Pinchart June 21, 2021, 12:55 p.m. UTC
The LVDS format is selected based on the bus format reported by the
connector. This is currently done in .mode_fixup(), but that's not the
right place, as the format should be selected when setting the mode.
Move it to .mode_set().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/bridge/ti-sn65dsi83.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
index b4e8e61da76e..db2e7aa90667 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
@@ -509,19 +509,12 @@  static void sn65dsi83_mode_set(struct drm_bridge *bridge,
 			       const struct drm_display_mode *adj)
 {
 	struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge);
-
-	ctx->mode = *adj;
-}
-
-static bool sn65dsi83_mode_fixup(struct drm_bridge *bridge,
-				 const struct drm_display_mode *mode,
-				 struct drm_display_mode *adj)
-{
-	struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge);
 	struct drm_encoder *encoder = bridge->encoder;
 	struct drm_device *ddev = encoder->dev;
 	struct drm_connector *connector;
 
+	ctx->mode = *adj;
+
 	/* The DSI format is always RGB888_1X24 */
 	list_for_each_entry(connector, &ddev->mode_config.connector_list, head) {
 		switch (connector->display_info.bus_formats[0]) {
@@ -551,8 +544,6 @@  static bool sn65dsi83_mode_fixup(struct drm_bridge *bridge,
 			break;
 		}
 	}
-
-	return true;
 }
 
 #define MAX_INPUT_SEL_FORMATS	1
@@ -589,7 +580,6 @@  static const struct drm_bridge_funcs sn65dsi83_funcs = {
 	.post_disable	= sn65dsi83_post_disable,
 	.mode_valid	= sn65dsi83_mode_valid,
 	.mode_set	= sn65dsi83_mode_set,
-	.mode_fixup	= sn65dsi83_mode_fixup,
 
 	.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
 	.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,