Re: [PATCH v4 8/8] drm/mediatek: Config orientation property if panel provides it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Hsin-Yi Wang (2022-06-06 08:24:31)
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index d9f10a33e6fa..c56282412bfa 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -822,6 +823,12 @@ static int mtk_dsi_encoder_init(struct drm_device *drm, struct mtk_dsi *dsi)
>                 ret = PTR_ERR(dsi->connector);
>                 goto err_cleanup_encoder;
>         }
> +
> +       /* Read panel orientation */
> +       if (dsi->panel)
> +               drm_connector_set_panel_orientation(dsi->connector,
> +                               drm_panel_get_orientation(dsi->panel));
> +

It could be simplified like so?

	drm_connector_set_orientation_from_panel(dsi->connector, dsi->panel);

Then the API could get the orientation if the panel pointer is valid.
Does any code need to use/modify the orientation value besides
drm_connector_set_panel_orientation()?

>         drm_connector_attach_encoder(dsi->connector, &dsi->encoder);
>
>         return 0;



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux