All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Re: [PATCH 2/2] drm: exynos: moved exynos drm hdmi device registration to drm driver
@ 2012-10-12  6:06 RAHUL SHARMA
  0 siblings, 0 replies; only message in thread
From: RAHUL SHARMA @ 2012-10-12  6:06 UTC (permalink / raw)
  To: In-Ki Dae
  Cc: Tomasz Stanislawski, SHIRISH S, SUNIL JOSHI,
	dri-devel@lists.freedesktop.org, Kyungmin Park, Thomas P Abraham,
	PRASHANTH GODREHAL

On Fri, Oct 12, 2012 at 6:22 AM, Inki Dae <inki.dae@samsung.com> wrote:
>
>
> 2012? 10? 12? ???? Rahul Sharma?? ??:
>
>> 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 <rahul.sharma@samsung.com>
>> ---
>>  drivers/gpu/drm/exynos/exynos_drm_drv.c |   15 ++++++++++++++-
>>  1 files changed, 14 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> b/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> index 4200f15..643c47f 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> @@ -53,6 +53,9 @@
>>  /* platform device pointer for eynos drm device. */
>>  static struct platform_device *exynos_drm_pdev;
>>
>> +/* platform device pointer for common drm hdmi device. */
>> +static struct platform_device *exynos_drm_hdmi_pdev;
>
>
> Is exynos_drm_hdmi_pdev related to exynos_drm_drv? I don't really like such
> thing. let's comply with layer rule. so how about moving
> exynos_drm_hdmi_pdev into exynos_drm_hdmi layer and just calling
> platform_device_hdmi_register instead of platform_device_register_simple?
> for this, exynos_drm_hdmi_pdev should be defined and declared in
> exynos_drm_hdmi layer. 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

>> +
>>  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);
>> @@ -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_unregister instead.
>  
>>
>>         platform_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
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-12  6:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-12  6:06 Re: [PATCH 2/2] drm: exynos: moved exynos drm hdmi device registration to drm driver RAHUL SHARMA

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.