[PATCH v1 02/16] drm/exynos: fix opencoded use of drm_panel_*

Sam Ravnborg sam at ravnborg.org
Sun Dec 1 11:32:21 UTC 2019


On Sun, Aug 04, 2019 at 10:16:23PM +0200, Sam Ravnborg wrote:
> drm_panel_attach() will check if there is a controller
> already attached - drop the check in the driver.
> 
> Use drm_panel_get_modes() so the driver no longer uses the function
> pointer.

Applied to drm-misc-next.

	Sam

> 
> Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
> Cc: Inki Dae <inki.dae at samsung.com>
> Cc: Joonyoung Shim <jy0922.shim at samsung.com>
> Cc: Seung-Woo Kim <sw0312.kim at samsung.com>
> Cc: Kyungmin Park <kyungmin.park at samsung.com>
> Cc: Kukjin Kim <kgene at kernel.org>
> Cc: Krzysztof Kozlowski <krzk at kernel.org>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-samsung-soc at vger.kernel.org
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dpi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> index 3cebb19ec1c4..5479ff71cbc6 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> @@ -43,7 +43,7 @@ exynos_dpi_detect(struct drm_connector *connector, bool force)
>  {
>  	struct exynos_dpi *ctx = connector_to_dpi(connector);
>  
> -	if (ctx->panel && !ctx->panel->connector)
> +	if (ctx->panel)
>  		drm_panel_attach(ctx->panel, &ctx->connector);
>  
>  	return connector_status_connected;
> @@ -85,7 +85,7 @@ static int exynos_dpi_get_modes(struct drm_connector *connector)
>  	}
>  
>  	if (ctx->panel)
> -		return ctx->panel->funcs->get_modes(ctx->panel);
> +		return drm_panel_get_modes(ctx->panel);
>  
>  	return 0;
>  }
> -- 
> 2.20.1


More information about the dri-devel mailing list