drm: exynos: moved exynos drm hdmi device registration to drm driver
Quoted 26 lines · Inki Dae
2012? 10? 12? ???? Rahul Sharma?? ??:
Quoted 22 lines
This patch moved the exynos-drm-hdmi platform device registration to the drm
driver. When DT is enabled, platform devices needs to be registered within the
driver code. This patch fits the requirement of both DT and Non DT based drm
drivers.Signed-off-by Rahul Sharma <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_drv.c | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-)drivers/gpu/drm/exynos/exynos_drm_drv.c +0
-0@@ -53,6 +53,9 @@/* platform device pointer for eynos drm device. */ static struct platform_device *exynos_drm_pdev;
Quoted 12 lines
drivers/gpu/drm/exynos/exynos_drm_drv.c line 57
Quoted 2 lines
drivers/gpu/drm/exynos/exynos_drm_drv.c +2
-0+/* platform device pointer for common drm hdmi device. */ +static struct platform_device *exynos_drm_hdmi_pdev;Is
exynos_drm_hdmi_pdevrelated toexynos_drm_drv? I don't really like such thing. let's comply with layer rule. so how about movingexynos_drm_hdmi_pdevintoexynos_drm_hdmilayer and just callingplatform_device_hdmi_registerinstead ofplatform_device_register_simple? for this,exynos_drm_hdmi_pdevshould be defined and declared inexynos_drm_hdmilayer. it means that we have one wrapper to common hdmi layer.
Sure Mr. Dae,
I will move exynos_drm_hdmi_pdev to exynos_drm_hdmi.c and wrap platform_device_register_simple in platform_device_hdmi_register in v1.
regards,
Rahul Sharma
Quoted 60 lines
Quoted 34 lines
drivers/gpu/drm/exynos/exynos_drm_drv.c +11
-1+static int exynos_drm_load (struct drm_device *dev,unsigned long flags) {struct exynos_drm_private *private;@@ -329,6 +332,13 @@ static int __init exynos_drm_init(void) ret =platform_driver_register (&exynos_drm_common_hdmi_driver);if (ret <0 ) goto out_common_hdmi; + + exynos_drm_hdmi_pdev =platform_device_register_simple ( +"exynos-drm-hdmi" ,-1 ,NULL ,0 ); +if (IS_ERR_OR_NULL (exynos_drm_hdmi_pdev)) { + ret =PTR_ERR (exynos_drm_hdmi_pdev); + goto out_common_hdmi_dev; + }#endif #ifdef CONFIG_DRM_EXYNOS_VIDI @@ -366,11 +376,13 @@ out_g2d:#endif #ifdef CONFIG_DRM_EXYNOS_VIDI -out_vidi:platform_driver_unregister (&vidi_driver); +out_vidi:#endif #ifdef CONFIG_DRM_EXYNOS_HDMI +platform_device_unregister (exynos_drm_hdmi_pdev); +out_common_hdmi_dev:platform_driver_unregister (&exynos_drm_common_hdmi_driver); out_common_hdmi:platform_driver_unregister (&mixer_driver);drivers/gpu/drm/exynos/exynos_drm_drv.c static void __exit exynos_drm_exit(void) · line 414
Quoted 4 lines
drivers/gpu/drm/exynos/exynos_drm_drv.c +1
-0@@ -399,6 +411,7 @@ static void __exit exynos_drm_exit(void)#endif #ifdef CONFIG_DRM_EXYNOS_HDMI +platform_device_unregister (exynos_drm_hdmi_pdev);ditto. let's call
platform_device_hdmi_unregisterinstead.Quoted 11 lines
drivers/gpu/drm/exynos/exynos_drm_drv.c +0
-1platform_driver_unregister (&exynos_drm_common_hdmi_driver);platform_driver_unregister (&mixer_driver);platform_driver_unregister (&hdmi_driver); --1.7.0.4
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel