Setting the orientation from get_modes() was a stopgap for the display
drivers not calling drm_connector_set_orientation_from_panel(). It is
also too late: by then the connector is registered and the property can
no longer be attached properly.

drm_bridge_connector and the panel bridge set the orientation on their
own, and the drivers using a panel directly do it when creating the
connector now. The exceptions are sun6i_mipi_dsi, sti_dvo and the Tegra
DSI, which get the panel only after the DRM device has been registered.
None of the in-tree boards using them has a rotated panel.

Assisted-by: LLM
Signed-off-by: Dmitry Baryshkov <[email protected]>
---
 drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 6 ------
 drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c       | 6 ------
 drivers/gpu/drm/panel/panel-edp.c                    | 6 ------
 drivers/gpu/drm/panel/panel-ilitek-ili9881c.c        | 6 ------
 drivers/gpu/drm/panel/panel-lvds.c                   | 6 ------
 drivers/gpu/drm/panel/panel-simple.c                 | 6 ------
 drivers/gpu/drm/panel/panel-sitronix-st7701.c        | 6 ------
 drivers/gpu/drm/panel/panel-sitronix-st7789v.c       | 6 ------
 8 files changed, 48 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c 
b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
index a70a2e58f88c..a67e0e57d8c3 100644
--- a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
+++ b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
@@ -318,12 +318,6 @@ static int boe_th101mb31ig002_get_modes(struct drm_panel 
*panel,
        const struct drm_display_mode *desc_mode = ctx->desc->modes;
 
        connector->display_info.bpc = 8;
-       /*
-        * TODO: Remove once all drm drivers call
-        * drm_connector_set_orientation_from_panel()
-        */
-       drm_connector_set_panel_orientation(connector, ctx->orientation);
-
        return drm_connector_helper_get_modes_fixed(connector, desc_mode);
 }
 
diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c 
b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
index 150dff3ab6c3..681a2418f154 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
@@ -1666,12 +1666,6 @@ static int boe_panel_get_modes(struct drm_panel *panel,
        connector->display_info.width_mm = boe->desc->size.width_mm;
        connector->display_info.height_mm = boe->desc->size.height_mm;
        connector->display_info.bpc = boe->desc->bpc;
-       /*
-        * TODO: Remove once all drm drivers call
-        * drm_connector_set_orientation_from_panel()
-        */
-       drm_connector_set_panel_orientation(connector, boe->orientation);
-
        return 1;
 }
 
diff --git a/drivers/gpu/drm/panel/panel-edp.c 
b/drivers/gpu/drm/panel/panel-edp.c
index d3a4cf9b1760..493a76f7416c 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -637,12 +637,6 @@ static int panel_edp_get_modes(struct drm_panel *panel,
        else if (!num)
                dev_warn(p->base.dev, "No display modes\n");
 
-       /*
-        * TODO: Remove once all drm drivers call
-        * drm_connector_set_orientation_from_panel()
-        */
-       drm_connector_set_panel_orientation(connector, p->orientation);
-
        return num;
 }
 
diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c 
b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
index 7bf38e96678a..9e64bdb403ed 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
@@ -2520,12 +2520,6 @@ static int ili9881c_get_modes(struct drm_panel *panel,
        else
                connector->display_info.subpixel_order = SubPixelHorizontalRGB;
 
-       /*
-        * TODO: Remove once all drm drivers call
-        * drm_connector_set_orientation_from_panel()
-        */
-       drm_connector_set_panel_orientation(connector, ctx->orientation);
-
        return 1;
 }
 
diff --git a/drivers/gpu/drm/panel/panel-lvds.c 
b/drivers/gpu/drm/panel/panel-lvds.c
index 37f7498449ec..92d397b131ba 100644
--- a/drivers/gpu/drm/panel/panel-lvds.c
+++ b/drivers/gpu/drm/panel/panel-lvds.c
@@ -98,12 +98,6 @@ static int panel_lvds_get_modes(struct drm_panel *panel,
                                         &lvds->bus_format, 1);
        connector->display_info.bus_flags = lvds->bus_flags;
 
-       /*
-        * TODO: Remove once all drm drivers call
-        * drm_connector_set_orientation_from_panel()
-        */
-       drm_connector_set_panel_orientation(connector, lvds->orientation);
-
        return 1;
 }
 
diff --git a/drivers/gpu/drm/panel/panel-simple.c 
b/drivers/gpu/drm/panel/panel-simple.c
index e4629428b1b2..0bd0afbd562e 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -396,12 +396,6 @@ static int panel_simple_get_modes(struct drm_panel *panel,
        /* add hard-coded panel modes */
        num += panel_simple_get_non_edid_modes(p, connector);
 
-       /*
-        * TODO: Remove once all drm drivers call
-        * drm_connector_set_orientation_from_panel()
-        */
-       drm_connector_set_panel_orientation(connector, p->orientation);
-
        return num;
 }
 
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c 
b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
index f16e0de1ea60..b6e62a4c67fa 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
@@ -635,12 +635,6 @@ static int st7701_get_modes(struct drm_panel *panel,
        connector->display_info.width_mm = desc_mode->width_mm;
        connector->display_info.height_mm = desc_mode->height_mm;
 
-       /*
-        * TODO: Remove once all drm drivers call
-        * drm_connector_set_orientation_from_panel()
-        */
-       drm_connector_set_panel_orientation(connector, st7701->orientation);
-
        return 1;
 }
 
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c 
b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
index da6ed31d151e..4d28efeafd64 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
@@ -361,12 +361,6 @@ static int st7789v_get_modes(struct drm_panel *panel,
        drm_display_info_set_bus_formats(&connector->display_info,
                                         &ctx->info->bus_format, 1);
 
-       /*
-        * TODO: Remove once all drm drivers call
-        * drm_connector_set_orientation_from_panel()
-        */
-       drm_connector_set_panel_orientation(connector, ctx->orientation);
-
        return 1;
 }
 

-- 
2.47.3

Reply via email to