[PATCH V2 5/9] drm/exynos: dp: modify driver to support drm_panel

Thierry Reding thierry.reding at gmail.com
Tue Apr 22 01:37:46 PDT 2014


On Tue, Apr 22, 2014 at 04:09:14AM +0530, Ajay Kumar wrote:
[...]
> diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c
[...]
> @@ -1299,6 +1308,15 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data)
>  
>  	INIT_WORK(&dp->hotplug_work, exynos_dp_hotplug);
>  
> +	panel_node = of_find_compatible_node(NULL, NULL,
> +						"samsung,exynos-dp-panel");

No, please don't do this. It will break as soon as you have two panels
of the same type in one system.

Also the compatible value of a panel should describe the specific panel
in use (e.g. "samsung,s6e8aa0"), so you shouldn't rely on "magic" like
this. Use a phandle to find the panel's struct device_node.

[...]
> diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.h b/drivers/gpu/drm/exynos/exynos_dp_core.h
> index 56fa43e..9dc7991 100644
> --- a/drivers/gpu/drm/exynos/exynos_dp_core.h
> +++ b/drivers/gpu/drm/exynos/exynos_dp_core.h
> @@ -148,6 +148,7 @@ struct exynos_dp_device {
>  	struct drm_device	*drm_dev;
>  	struct drm_connector	connector;
>  	struct drm_encoder	*encoder;
> +	struct drm_panel	*drm_panel;

I don't think you need the drm_ prefix here.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20140422/5be31729/attachment.sig>


More information about the dri-devel mailing list