[16/35] drm/exynos: dpi: set the panel orientation on the connector

Message ID 20261026-drm-panel-funcs-v1-16-5e3070a3478f@oss.qualcomm.com (mailing list archive)
State New
Headers
Series drm/panel: let the panels use the atomic state |

Commit Message

Dmitry Baryshkov Oct. 26, 2026, 11:10 a.m. UTC
The panel is used directly, without the panel bridge, so nothing sets
its orientation on the connector apart from the workaround in the
get_modes() of some panel drivers, which runs too late.

Assisted-by: LLM
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 drivers/gpu/drm/exynos/exynos_drm_dpi.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Luca Ceresoli Oct. 31, 2026, 10:48 a.m. UTC | #1
> The panel is used directly, without the panel bridge, so nothing sets
> its orientation on the connector apart from the workaround in the
> get_modes() of some panel drivers, which runs too late.
>
> Assisted-by: LLM
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> index 74d3a2bebb74..05014c2e7d92 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> @@ -109,6 +109,7 @@ static int exynos_dpi_create_connector(struct drm_encoder *encoder)
>  	}
>
>  	drm_connector_helper_add(connector, &exynos_dpi_connector_helper_funcs);
> +	drm_connector_set_orientation_from_panel(connector, ctx->panel);

Patches 15-21 are quite inconsistent in terms of error checking:

 * some don't check for errors (like this one)
 * some do and return silently on error
 * some do and log an error before returning

I don't see a good reason, so I'd make them all log and return on error.

Luca
  

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
index 74d3a2bebb74..05014c2e7d92 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
@@ -109,6 +109,7 @@  static int exynos_dpi_create_connector(struct drm_encoder *encoder)
 	}
 
 	drm_connector_helper_add(connector, &exynos_dpi_connector_helper_funcs);
+	drm_connector_set_orientation_from_panel(connector, ctx->panel);
 	drm_connector_attach_encoder(connector, encoder);
 
 	return 0;