[PATCH v3 27/32] drm/exynos: Add create_connector callback
Inki Dae
inki.dae at samsung.com
Mon Dec 2 21:01:04 PST 2013
2013/10/30 Sean Paul <seanpaul at chromium.org>:
> This creates a new display hook called create_connector. The purpose is
> to allow the display driver to create its own drm_connector instead of
> using the exynos_drm_connector. This moves things closer to completely
> removing the exynos_drm_connector abstraction.
>
> Signed-off-by: Sean Paul <seanpaul at chromium.org>
> ---
>
> Changes in v2: None
> Changes in v3:
> - Added to the patchset
>
> drivers/gpu/drm/exynos/exynos_drm_core.c | 3 +++
> drivers/gpu/drm/exynos/exynos_drm_drv.h | 2 ++
> 2 files changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_core.c b/drivers/gpu/drm/exynos/exynos_drm_core.c
> index e76098d..1a60f5a 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_core.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_core.c
> @@ -87,6 +87,9 @@ static int exynos_drm_create_enc_conn(struct drm_device *dev,
> return 0;
> }
>
> + if (display->ops->create_connector)
> + return display->ops->create_connector(display, encoder);
There would be display->connector = connector below. But
create_connector callback of connector drivers doesn't set a new
connector to display->connector. So if you return here, this code has
no consistency. I think we can remove below codes for creating a new
connector. If connector drivers have create_connector callback, the
below codes wouldn't be needed anymore.
> +
> /*
> * create and initialize a connector for this sub driver and
> * attach the encoder created above to the connector.
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
> index f3e18d1..db6a3b2 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
> @@ -139,6 +139,8 @@ struct exynos_drm_display;
> struct exynos_drm_display_ops {
> int (*initialize)(struct exynos_drm_display *display,
> struct drm_device *drm_dev);
> + int (*create_connector)(struct exynos_drm_display *display,
> + struct drm_encoder *encoder);
> void (*remove)(struct exynos_drm_display *display);
> bool (*is_connected)(struct exynos_drm_display *display);
> void (*get_max_resol)(struct exynos_drm_display *display,
> --
> 1.8.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
More information about the dri-devel
mailing list