Re: [Intel-gfx] [PATCH v8 4/4] drm/mtk: add panel orientation property

2019-10-07 Thread Sean Paul
On Wed, Sep 25, 2019 at 03:58:33PM -0700, Derek Basehore wrote:
> This inits the panel orientation property for the mediatek dsi driver
> if the panel orientation (connector.display_info.panel_orientation) is
> not DRM_MODE_PANEL_ORIENTATION_UNKNOWN.
> 
> Signed-off-by: Derek Basehore 
> Acked-by: Sam Ravnborg 
> Reviewed-by: CK Hu 

Reviewed-by: Sean Paul 

> ---
>  drivers/gpu/drm/mediatek/mtk_dsi.c | 8 
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c 
> b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 224afb666881..2936932344eb 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -792,10 +792,18 @@ static int mtk_dsi_create_connector(struct drm_device 
> *drm, struct mtk_dsi *dsi)
>   DRM_ERROR("Failed to attach panel to drm\n");
>   goto err_connector_cleanup;
>   }
> +
> + ret = drm_connector_init_panel_orientation_property(>conn);
> + if (ret) {
> + DRM_ERROR("Failed to init panel orientation\n");
> + goto err_panel_detach;
> + }
>   }
>  
>   return 0;
>  
> +err_panel_detach:
> + drm_panel_detach(dsi->panel);
>  err_connector_cleanup:
>   drm_connector_cleanup(>conn);
>   return ret;
> -- 
> 2.23.0.351.gc4317032e6-goog
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH v8 4/4] drm/mtk: add panel orientation property

2019-09-25 Thread Derek Basehore
This inits the panel orientation property for the mediatek dsi driver
if the panel orientation (connector.display_info.panel_orientation) is
not DRM_MODE_PANEL_ORIENTATION_UNKNOWN.

Signed-off-by: Derek Basehore 
Acked-by: Sam Ravnborg 
Reviewed-by: CK Hu 
---
 drivers/gpu/drm/mediatek/mtk_dsi.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c 
b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 224afb666881..2936932344eb 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -792,10 +792,18 @@ static int mtk_dsi_create_connector(struct drm_device 
*drm, struct mtk_dsi *dsi)
DRM_ERROR("Failed to attach panel to drm\n");
goto err_connector_cleanup;
}
+
+   ret = drm_connector_init_panel_orientation_property(>conn);
+   if (ret) {
+   DRM_ERROR("Failed to init panel orientation\n");
+   goto err_panel_detach;
+   }
}
 
return 0;
 
+err_panel_detach:
+   drm_panel_detach(dsi->panel);
 err_connector_cleanup:
drm_connector_cleanup(>conn);
return ret;
-- 
2.23.0.351.gc4317032e6-goog

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx