Re: [PATCH v2 1/2] drm/exynos/dsi: register connector if it is created after drm bind

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

 



Hi,

On 2018-10-26 12:40, Andrzej Hajda wrote:
> DSI device can be attached after DRM device is registered. In such
> case newly created connector must be registered by exynos_dsi.
> The patch fixes exynos_drm on rinato and trats boards.
>
> Fixes: 6afb7721e2a0 ("drm/exynos: move connector creation to attach callback")
> Reported-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> Signed-off-by: Andrzej Hajda <a.hajda@xxxxxxxxxxx>

v2 fixes the connector registration problem on Rinato and Trats board.
Thanks!

Tested-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>

> ---
> Hi,
>
> During just-before-send adjustements I have made horrible typo so there is v2.
>
> v2:
>  - fixed if condition
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 07af7758066d..ef5f19b084a6 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -14,6 +14,7 @@
>  
>  #include <drm/drmP.h>
>  #include <drm/drm_crtc_helper.h>
> +#include <drm/drm_fb_helper.h>
>  #include <drm/drm_mipi_dsi.h>
>  #include <drm/drm_panel.h>
>  #include <drm/drm_atomic_helper.h>
> @@ -1474,12 +1475,12 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
>  {
>  	struct exynos_dsi *dsi = encoder_to_dsi(encoder);
>  	struct drm_connector *connector = &dsi->connector;
> +	struct drm_device *drm = encoder->dev;
>  	int ret;
>  
>  	connector->polled = DRM_CONNECTOR_POLL_HPD;
>  
> -	ret = drm_connector_init(encoder->dev, connector,
> -				 &exynos_dsi_connector_funcs,
> +	ret = drm_connector_init(drm, connector, &exynos_dsi_connector_funcs,
>  				 DRM_MODE_CONNECTOR_DSI);
>  	if (ret) {
>  		DRM_ERROR("Failed to initialize connector with drm\n");
> @@ -1489,7 +1490,12 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
>  	connector->status = connector_status_disconnected;
>  	drm_connector_helper_add(connector, &exynos_dsi_connector_helper_funcs);
>  	drm_connector_attach_encoder(connector, encoder);
> +	if (!drm->registered)
> +		return 0;
>  
> +	connector->funcs->reset(connector);
> +	drm_fb_helper_add_one_connector(drm->fb_helper, connector);
> +	drm_connector_register(connector);
>  	return 0;
>  }
>  

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[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