drm/exynos: fix opencoded use of drm_panel_*
authorSam Ravnborg <sam@ravnborg.org>
Sun, 4 Aug 2019 20:16:23 +0000 (22:16 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Sun, 1 Dec 2019 11:17:54 +0000 (12:17 +0100)
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.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-3-sam@ravnborg.org
drivers/gpu/drm/exynos/exynos_drm_dpi.c

index 3cebb19ec1c47cfdf80ff059f2ac6d6b1651006f..5479ff71cbc6a4530e8c072936965c6965e9c194 100644 (file)
@@ -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;
 }