All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] drm: exynos: hdmi: add exynos5 support for drm hdmi
@ 2012-09-12 12:08 Rahul Sharma
  2012-09-12 12:08 ` [PATCH 1/3] drm: exynos: hdmi: add exynos5 support to mixer driver Rahul Sharma
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Rahul Sharma @ 2012-09-12 12:08 UTC (permalink / raw)
  To: dri-devel
  Cc: l.krishna, joshi, kyungmin.park, fahad.k, rahul.sharma,
	prashanth.g, s.shirish

This patch set adds the support for Samsung's Exynos5250 in DRM-HDMI. It
includes modifcations in hdmi and mixer paltform drivers. Also, removes
the dependency on plf data for hdmi, mixer context pointers needed by
exynos-drm-hdmi. 

This patchset is based on branch exynos-drm-next at 
git://git.infradead.org/users/kmpark/linux-samsung (linux v3.6-rc4)

Rahul Sharma (3):
  drm: exynos: hdmi: add exynos5 support to mixer driver
  drm: exynos: hdmi: add exynos5 support to hdmi driver
  drm: exynos: hdmi: clean dependency on plf data for mixer, hdmi
    context

 drivers/gpu/drm/exynos/exynos_drm_hdmi.c |   47 +++---
 drivers/gpu/drm/exynos/exynos_drm_hdmi.h |    2 +
 drivers/gpu/drm/exynos/exynos_hdmi.c     |  303 +++++++++++++++++++++++++++---
 drivers/gpu/drm/exynos/exynos_mixer.c    |  156 ++++++++++++++--
 drivers/gpu/drm/exynos/regs-mixer.h      |    2 +
 5 files changed, 443 insertions(+), 67 deletions(-)

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] drm: exynos: hdmi: clean dependency on plf data for mixer, hdmi context
@ 2012-09-13  6:56 RAHUL SHARMA
  0 siblings, 0 replies; 11+ messages in thread
From: RAHUL SHARMA @ 2012-09-13  6:56 UTC (permalink / raw)
  To: Joonyoung Shim
  Cc: SHIRISH S, Leela Krishna Amudala, SUNIL JOSHI,
	dri-devel@lists.freedesktop.org, Kyungmin Park, FAHAD KUNNATHADI,
	PRASHANTH GODREHAL

>> exynos-drm-hdmi need context pointers from hdmi and mixer. These
>> pointers were expected from the plf data. Cleaned this dependency
>
>
> What does plf data mean?
>
>
>> by exporting i/f which are called by hdmi, mixer driver probes
>> for setting their context.
>
>
> It is reasonable to me. This can remove struct exynos_drm_common_hdmi_pd.
>
> Thanks.
>
I am talking about exynos_drm_common_hdmi_pd only. With above change, it
won't be required anymore.

regards,
Rahul Sharma

>
>> Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
>> ---
>>   drivers/gpu/drm/exynos/exynos_drm_hdmi.c |   47
>> +++++++++++++++--------------
>>   drivers/gpu/drm/exynos/exynos_drm_hdmi.h |    2 +
>>   drivers/gpu/drm/exynos/exynos_hdmi.c     |    3 ++
>>   drivers/gpu/drm/exynos/exynos_mixer.c    |    3 ++
>>   4 files changed, 32 insertions(+), 23 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
>> b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
>> index 0584132..4c8d933 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
>> @@ -29,6 +29,11 @@
>>   #define get_ctx_from_subdrv(subdrv)   container_of(subdrv,\
>>                                         struct drm_hdmi_context, subdrv);
>>   +/* Common hdmi subdrv needs to access the hdmi and mixer though
>> context.
>> +* These should be initialied by the repective drivers */
>> +static struct exynos_drm_hdmi_context *hdmi_ctx;
>> +static struct exynos_drm_hdmi_context *mixer_ctx;
>> +
>>   /* these callback points shoud be set by specific drivers. */
>>   static struct exynos_hdmi_ops *hdmi_ops;
>>   static struct exynos_mixer_ops *mixer_ops;
>> @@ -41,6 +46,18 @@ struct drm_hdmi_context {
>>         bool    enabled[MIXER_WIN_NR];
>>   };
>>   +void exynos_hdmi_drv_attach(struct exynos_drm_hdmi_context *ctx)
>> +{
>> +       if (ctx)
>> +               hdmi_ctx = ctx;
>> +}
>> +
>> +void exynos_mixer_drv_attach(struct exynos_drm_hdmi_context *ctx)
>> +{
>> +       if (ctx)
>> +               mixer_ctx = ctx;
>> +}
>> +
>>   void exynos_hdmi_ops_register(struct exynos_hdmi_ops *ops)
>>   {
>>         DRM_DEBUG_KMS("%s\n", __FILE__);
>> @@ -303,46 +320,30 @@ static int hdmi_subdrv_probe(struct drm_device
>> *drm_dev,
>>   {
>>         struct exynos_drm_subdrv *subdrv = to_subdrv(dev);
>>         struct drm_hdmi_context *ctx;
>> -       struct platform_device *pdev = to_platform_device(dev);
>> -       struct exynos_drm_common_hdmi_pd *pd;
>>         DRM_DEBUG_KMS("%s\n", __FILE__);
>>   -     pd = pdev->dev.platform_data;
>> -
>> -       if (!pd) {
>> -               DRM_DEBUG_KMS("platform data is null.\n");
>> -               return -EFAULT;
>> -       }
>> -
>> -       if (!pd->hdmi_dev) {
>> +       if (!hdmi_ctx) {
>>                 DRM_DEBUG_KMS("hdmi device is null.\n");
>>                 return -EFAULT;
>>         }
>>   -     if (!pd->mixer_dev) {
>> +       if (!mixer_ctx) {
>>                 DRM_DEBUG_KMS("mixer device is null.\n");
>>                 return -EFAULT;
>>         }
>>         ctx = get_ctx_from_subdrv(subdrv);
>>   -     ctx->hdmi_ctx = (struct exynos_drm_hdmi_context *)
>> -                               to_context(pd->hdmi_dev);
>> -       if (!ctx->hdmi_ctx) {
>> -               DRM_DEBUG_KMS("hdmi context is null.\n");
>> +       if (!ctx) {
>> +               DRM_DEBUG_KMS("context is null.\n");
>>                 return -EFAULT;
>>         }
>>   -     ctx->hdmi_ctx->drm_dev = drm_dev;
>> -
>> -       ctx->mixer_ctx = (struct exynos_drm_hdmi_context *)
>> -                               to_context(pd->mixer_dev);
>> -       if (!ctx->mixer_ctx) {
>> -               DRM_DEBUG_KMS("mixer context is null.\n");
>> -               return -EFAULT;
>> -       }
>> +       ctx->hdmi_ctx = hdmi_ctx;
>> +       ctx->mixer_ctx = mixer_ctx;
>>   +     ctx->hdmi_ctx->drm_dev = drm_dev;
>>         ctx->mixer_ctx->drm_dev = drm_dev;
>>         return 0;
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
>> b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
>> index d9f9e9f..2da5ffd 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
>> @@ -73,6 +73,8 @@ struct exynos_mixer_ops {
>>         void (*win_disable)(void *ctx, int zpos);
>>   };
>>   +void exynos_hdmi_drv_attach(struct exynos_drm_hdmi_context *ctx);
>> +void exynos_mixer_drv_attach(struct exynos_drm_hdmi_context *ctx);
>>   void exynos_hdmi_ops_register(struct exynos_hdmi_ops *ops);
>>   void exynos_mixer_ops_register(struct exynos_mixer_ops *ops);
>>   #endif
>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> index 5236256..82ee810 100644
>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> @@ -2599,6 +2599,9 @@ static int __devinit hdmi_probe(struct
>> platform_device *pdev)
>>         drm_hdmi_ctx = platform_get_drvdata(pdev);
>>   +     /* Attach HDMI Driver to common hdmi. */
>> +       exynos_hdmi_drv_attach(drm_hdmi_ctx);
>> +
>>         /* register specific callbacks to common hdmi. */
>>         exynos_hdmi_ops_register(&hdmi_ops);
>>   diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c
>> b/drivers/gpu/drm/exynos/exynos_mixer.c
>> index 7d04a40..f9e26f2 100644
>> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
>> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
>> @@ -1165,6 +1165,9 @@ static int __devinit mixer_probe(struct
>> platform_device *pdev)
>>         if (ret)
>>                 goto fail;
>>   +     /* attach mixer driver to common hdmi. */
>> +       exynos_mixer_drv_attach(drm_hdmi_ctx);
>> +
>>         /* register specific callback point to common hdmi. */
>>         exynos_mixer_ops_register(&mixer_ops);
>>  
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-09-13  6:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-12 12:08 [PATCH 0/3] drm: exynos: hdmi: add exynos5 support for drm hdmi Rahul Sharma
2012-09-12 12:08 ` [PATCH 1/3] drm: exynos: hdmi: add exynos5 support to mixer driver Rahul Sharma
2012-09-13  1:43   ` Joonyoung Shim
2012-09-13  2:53     ` Inki Dae
2012-09-13  3:34       ` Joonyoung Shim
2012-09-13  4:37         ` Inki Dae
2012-09-12 12:08 ` [PATCH 2/3] drm: exynos: hdmi: add exynos5 support to hdmi driver Rahul Sharma
2012-09-13  1:23   ` Joonyoung Shim
2012-09-12 12:08 ` [PATCH 3/3] drm: exynos: hdmi: clean dependency on plf data for mixer, hdmi context Rahul Sharma
2012-09-13  2:12   ` Joonyoung Shim
  -- strict thread matches above, loose matches on Subject: below --
2012-09-13  6:56 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.