[PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-12 Thread Inki Dae
2013/2/12 Sylwester Nawrocki :
> On 02/12/2013 02:17 PM, Inki Dae wrote:
>> Applied and will go to -next.
>> And please post the document(in
>> Documentation/devicetree/bindings/gpu/) for it later.
>
> There is already some old patch applied in the devicetree/next tree:
>
> http://git.secretlab.ca/?p=linux.git;a=commitdiff;h=09495dda6a62c74b13412a63528093910ef80edd
>
> I guess there is now an incremental patch needed for this.
>

I think that this patch should be reverted because the compatible
string of this document isn't generic and also the document file
should be moved into proper place(.../bindings/gpu/).

So Mr. Grant, could you please revert the below patch?
"of/exynos_g2d: Add Bindings for exynos G2D driver"
commit: 09495dda6a62c74b13412a63528093910ef80edd

This document should be modifed correctly and re-posted. For this, we
have already reached an arrangement with other Exynos maintainters.

Thanks,
Inki Dae

>
> Regards,
> Sylwester
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-12 Thread Inki Dae
Applied and will go to -next.
And please post the document(in
Documentation/devicetree/bindings/gpu/) for it later.

Thanks,
Inki Dae

2013/2/6 Sachin Kamat :
> From: Ajay Kumar 
>
> This patch adds device tree match table for Exynos G2D controller.
>
> Signed-off-by: Ajay Kumar 
> Signed-off-by: Sachin Kamat 
> ---
> Patch based on exynos-drm-fixes branch of Inki Dae's tree:
> git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git
>
> Changes since v1:
> Modified the compatible string as per the discussions at [1].
> [1] https://patchwork1.kernel.org/patch/2045821/
> ---
>  drivers/gpu/drm/exynos/exynos_drm_g2d.c |   10 ++
>  1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c 
> b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> index ddcfb5d..0fcfbe4 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> @@ -19,6 +19,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include 
>  #include 
> @@ -1240,6 +1241,14 @@ static int g2d_resume(struct device *dev)
>
>  static SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume);
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id exynos_g2d_match[] = {
> +   { .compatible = "samsung,exynos5250-g2d" },
> +   {},
> +};
> +MODULE_DEVICE_TABLE(of, exynos_g2d_match);
> +#endif
> +
>  struct platform_driver g2d_driver = {
> .probe  = g2d_probe,
> .remove = g2d_remove,
> @@ -1247,5 +1256,6 @@ struct platform_driver g2d_driver = {
> .name   = "s5p-g2d",
> .owner  = THIS_MODULE,
> .pm = _pm_ops,
> +   .of_match_table = of_match_ptr(exynos_g2d_match),
> },
>  };
> --
> 1.7.4.1
>
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-12 Thread Sylwester Nawrocki
On 02/12/2013 02:17 PM, Inki Dae wrote:
> Applied and will go to -next.
> And please post the document(in
> Documentation/devicetree/bindings/gpu/) for it later.

There is already some old patch applied in the devicetree/next tree:

http://git.secretlab.ca/?p=linux.git;a=commitdiff;h=09495dda6a62c74b13412a63528093910ef80edd

I guess there is now an incremental patch needed for this.


Regards,
Sylwester



























Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-12 Thread Inki Dae
Applied and will go to -next.
And please post the document(in
Documentation/devicetree/bindings/gpu/) for it later.

Thanks,
Inki Dae

2013/2/6 Sachin Kamat sachin.ka...@linaro.org:
 From: Ajay Kumar ajaykumar...@samsung.com

 This patch adds device tree match table for Exynos G2D controller.

 Signed-off-by: Ajay Kumar ajaykumar...@samsung.com
 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
 Patch based on exynos-drm-fixes branch of Inki Dae's tree:
 git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git

 Changes since v1:
 Modified the compatible string as per the discussions at [1].
 [1] https://patchwork1.kernel.org/patch/2045821/
 ---
  drivers/gpu/drm/exynos/exynos_drm_g2d.c |   10 ++
  1 files changed, 10 insertions(+), 0 deletions(-)

 diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c 
 b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
 index ddcfb5d..0fcfbe4 100644
 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
 +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
 @@ -19,6 +19,7 @@
  #include linux/workqueue.h
  #include linux/dma-mapping.h
  #include linux/dma-attrs.h
 +#include linux/of.h

  #include drm/drmP.h
  #include drm/exynos_drm.h
 @@ -1240,6 +1241,14 @@ static int g2d_resume(struct device *dev)

  static SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume);

 +#ifdef CONFIG_OF
 +static const struct of_device_id exynos_g2d_match[] = {
 +   { .compatible = samsung,exynos5250-g2d },
 +   {},
 +};
 +MODULE_DEVICE_TABLE(of, exynos_g2d_match);
 +#endif
 +
  struct platform_driver g2d_driver = {
 .probe  = g2d_probe,
 .remove = g2d_remove,
 @@ -1247,5 +1256,6 @@ struct platform_driver g2d_driver = {
 .name   = s5p-g2d,
 .owner  = THIS_MODULE,
 .pm = g2d_pm_ops,
 +   .of_match_table = of_match_ptr(exynos_g2d_match),
 },
  };
 --
 1.7.4.1

 ___
 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


Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-12 Thread Sylwester Nawrocki
On 02/12/2013 02:17 PM, Inki Dae wrote:
 Applied and will go to -next.
 And please post the document(in
 Documentation/devicetree/bindings/gpu/) for it later.

There is already some old patch applied in the devicetree/next tree:

http://git.secretlab.ca/?p=linux.git;a=commitdiff;h=09495dda6a62c74b13412a63528093910ef80edd

I guess there is now an incremental patch needed for this.


Regards,
Sylwester

























___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-12 Thread Inki Dae
2013/2/12 Sylwester Nawrocki s.nawro...@samsung.com:
 On 02/12/2013 02:17 PM, Inki Dae wrote:
 Applied and will go to -next.
 And please post the document(in
 Documentation/devicetree/bindings/gpu/) for it later.

 There is already some old patch applied in the devicetree/next tree:

 http://git.secretlab.ca/?p=linux.git;a=commitdiff;h=09495dda6a62c74b13412a63528093910ef80edd

 I guess there is now an incremental patch needed for this.


I think that this patch should be reverted because the compatible
string of this document isn't generic and also the document file
should be moved into proper place(.../bindings/gpu/).

So Mr. Grant, could you please revert the below patch?
of/exynos_g2d: Add Bindings for exynos G2D driver
commit: 09495dda6a62c74b13412a63528093910ef80edd

This document should be modifed correctly and re-posted. For this, we
have already reached an arrangement with other Exynos maintainters.

Thanks,
Inki Dae


 Regards,
 Sylwester

























 ___
 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


[PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread Inki Dae


> -Original Message-
> From: linux-media-owner at vger.kernel.org [mailto:linux-media-
> owner at vger.kernel.org] On Behalf Of Sylwester Nawrocki
> Sent: Wednesday, February 06, 2013 8:24 PM
> To: Inki Dae
> Cc: 'Sachin Kamat'; linux-media at vger.kernel.org; dri-
> devel at lists.freedesktop.org; devicetree-discuss at lists.ozlabs.org;
> k.debski at samsung.com; kgene.kim at samsung.com; patches at linaro.org; 
> 'Ajay
> Kumar'; kyungmin.park at samsung.com; sw0312.kim at samsung.com;
> jy0922.shim at samsung.com
> Subject: Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery
> support for G2D
> 
> On 02/06/2013 09:51 AM, Inki Dae wrote:
> [...]
> > I think that it's better to go to gpu than media and we can divide
> Exynos
> > IPs into the bellow categories,
> >
> > Media : mfc
> > GPU : g2d, g3d, fimc, gsc
> 
> Heh, nice try! :) GPU and FIMC ? FIMC is a camera subsystem (hence 'C'
> in the acronym), so what it has really to do with GPU ? All right, this IP
> has really two functions: camera capture and video post-processing
> (colorspace conversion, scaling), but the main feature is camera capture
> (fimc-lite is a camera capture interface IP only).
> 
> Also, Exynos5 GScaler is used as a DMA engine for camera capture data
> pipelines, so it will be used by a camera capture driver as well. It
> really belongs to "Media" and "GPU", as this is a multifunctional
> device (similarly to FIMC).
> 
> So I propose following classification, which seems less inaccurate:
> 
> GPU:   g2d, g3d
> Media: mfc, fimc, fimc-lite, fimc-is, mipi-csis, gsc
> Video: fimd, hdmi, eDP, mipi-dsim
> 

Ok, it seems that your propose is better. :)

To Sachin,
Please add g2d document to .../bindings/gpu

To Rahul,
Could you please move .../drm/exynos/* to .../bindings/video? Probably you
need to rename the files there to exynos*.txt

If there are no other opinions, let's start  :)

Thanks,
Inki Dae

> I have already a DT bindings description prepared for fimc [1].
> (probably it needs to be rephrased a bit not to refer to the linux
> device model). I put it in Documentation/devicetree/bindings/media/soc,
> but likely there is no need for the 'soc' subdirectory...
> 
> > Video : fimd, hdmi, eDP, MIPI-DSI
> >
> > And I think that the device-tree describes hardware so possibly, all
> > documents in .../bindings/drm/exynos/* should be moved to proper place
> also.
> > Please give  me any opinions.
> 
> Yes, I agree. If possible, it would be nice to have some Linux API
> agnostic locations.
> 
> [1] goo.gl/eTGOl
> 
> --
> 
> Thanks,
> Sylwester
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



[PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread 김승우


On 2013? 02? 06? 17:51, Inki Dae wrote:
> 
> 
>> -Original Message-
>> From: Sachin Kamat [mailto:sachin.kamat at linaro.org]
>> Sent: Wednesday, February 06, 2013 5:03 PM
>> To: Inki Dae
>> Cc: linux-media at vger.kernel.org; dri-devel at lists.freedesktop.org;
>> devicetree-discuss at lists.ozlabs.org; k.debski at samsung.com;
>> s.nawrocki at samsung.com; kgene.kim at samsung.com; patches at linaro.org; 
>> Ajay
>> Kumar
>> Subject: Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery
>> support for G2D
>>
>> On 6 February 2013 13:02, Inki Dae  wrote:
>>>
>>> Looks good to me but please add document for it.
>>
>> Yes. I will. I was planning to send the bindings document patch along
>> with the dt patches (adding node entries to dts files).
>> Sylwester had suggested adding this to
>> Documentation/devicetree/bindings/media/ which contains other media
>> IPs.
> 
> I think that it's better to go to gpu than media and we can divide Exynos
> IPs into the bellow categories,
> 
> Media : mfc
> GPU : g2d, g3d, fimc, gsc
> Video : fimd, hdmi, eDP, MIPI-DSI

Hm, here is another considering point. Some device can be used as one of
two sub-system. For example g2d can be used as V4L2 driver or DRM
driver. And more specific case, multiple fimc/gsc deivces can be
separately used as both drivers: two fimc devices are used as V4L2
driver and other devices are used as DRM driver.
Current discussion, without change of build configuration, device can be
only used as one driver.

So I want to discuss about how we can bind device and driver just with
dts configuration.

IMO, there are two options.

First, driver usage is set on configurable node.
g2d: g2d {
compatible = "samsung,exynos4212-g2d";
...
*subsystem = "v4l2"* or *subsystem = "drm"*
};
Node name and type is just an example to describe.
With this option, driver which is not matched with subsystem node should
return with fail during its probing.

Second, using dual compatible strings.
g2d: g2d {
*compatible = "samsung,exynos4212-v4l2-g2d"; or
compatible = "samsung,exynos4212-v4l2-g2d";*
...
};
String is just an example so don't mind if it is ugly. Actually, with
this option, compatible string has non HW information. But this option
does not need fail in probing.

I'm not sure these options are fit to DT concept. Please let me know if
anyone has idea.

Best Regards,
- Seung-Woo Kim

> 
> And I think that the device-tree describes hardware so possibly, all
> documents in .../bindings/drm/exynos/* should be moved to proper place also.
> Please give  me any opinions.
> 
> Thanks,
> Inki Dae
> 
>>
>>>
>>> To other guys,
>>> And is there anyone who know where this document should be added to?
>>> I'm not sure that the g2d document should be placed in
>>> Documentation/devicetree/bindings/gpu, media, drm/exynos or arm/exynos.
>> At
>>> least, this document should be shared with the g2d hw relevant drivers
>> such
>>> as v4l2 and drm. So is ".../bindings/gpu" proper place?
>>>
>>
>>
>> --
>> With warm regards,
>> Sachin
> 
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> 


[PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread Inki Dae


> -Original Message-
> From: Sachin Kamat [mailto:sachin.kamat at linaro.org]
> Sent: Wednesday, February 06, 2013 5:03 PM
> To: Inki Dae
> Cc: linux-media at vger.kernel.org; dri-devel at lists.freedesktop.org;
> devicetree-discuss at lists.ozlabs.org; k.debski at samsung.com;
> s.nawrocki at samsung.com; kgene.kim at samsung.com; patches at linaro.org; 
> Ajay
> Kumar
> Subject: Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery
> support for G2D
> 
> On 6 February 2013 13:02, Inki Dae  wrote:
> >
> > Looks good to me but please add document for it.
> 
> Yes. I will. I was planning to send the bindings document patch along
> with the dt patches (adding node entries to dts files).
> Sylwester had suggested adding this to
> Documentation/devicetree/bindings/media/ which contains other media
> IPs.

I think that it's better to go to gpu than media and we can divide Exynos
IPs into the bellow categories,

Media : mfc
GPU : g2d, g3d, fimc, gsc
Video : fimd, hdmi, eDP, MIPI-DSI

And I think that the device-tree describes hardware so possibly, all
documents in .../bindings/drm/exynos/* should be moved to proper place also.
Please give  me any opinions.

Thanks,
Inki Dae

> 
> >
> > To other guys,
> > And is there anyone who know where this document should be added to?
> > I'm not sure that the g2d document should be placed in
> > Documentation/devicetree/bindings/gpu, media, drm/exynos or arm/exynos.
> At
> > least, this document should be shared with the g2d hw relevant drivers
> such
> > as v4l2 and drm. So is ".../bindings/gpu" proper place?
> >
> 
> 
> --
> With warm regards,
> Sachin



[PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread Sachin Kamat
On 6 February 2013 16:53, Sylwester Nawrocki  wrote:
> On 02/06/2013 09:51 AM, Inki Dae wrote:
> [...]

> So I propose following classification, which seems less inaccurate:
>
> GPU:   g2d, g3d
> Media: mfc, fimc, fimc-lite, fimc-is, mipi-csis, gsc
> Video: fimd, hdmi, eDP, mipi-dsim

Thanks Inki and Sylwester for your inputs.
We need to figure out some sensible location for these drivers'
documentation though I liked what you have proposed for now.
I will add g2d document to gpu directory as both of you suggest the same.
If there are better opinions will move it later.

-- 
With warm regards,
Sachin


[PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread Inki Dae
> -Original Message-
> From: Sachin Kamat [mailto:sachin.kamat at linaro.org]
> Sent: Wednesday, February 06, 2013 2:30 PM
> To: linux-media at vger.kernel.org; dri-devel at lists.freedesktop.org;
> devicetree-discuss at lists.ozlabs.org
> Cc: k.debski at samsung.com; sachin.kamat at linaro.org; inki.dae at 
> samsung.com;
> s.nawrocki at samsung.com; kgene.kim at samsung.com; patches at linaro.org; 
> Ajay
> Kumar
> Subject: [PATCH v2 2/2] drm/exynos: Add device tree based discovery
> support for G2D
> 
> From: Ajay Kumar 
> 
> This patch adds device tree match table for Exynos G2D controller.
> 
> Signed-off-by: Ajay Kumar 
> Signed-off-by: Sachin Kamat 
> ---
> Patch based on exynos-drm-fixes branch of Inki Dae's tree:
> git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git
> 
> Changes since v1:
> Modified the compatible string as per the discussions at [1].
> [1] https://patchwork1.kernel.org/patch/2045821/
> ---
>  drivers/gpu/drm/exynos/exynos_drm_g2d.c |   10 ++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> index ddcfb5d..0fcfbe4 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> @@ -19,6 +19,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
> 
>  #include 
>  #include 
> @@ -1240,6 +1241,14 @@ static int g2d_resume(struct device *dev)
> 
>  static SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume);
> 
> +#ifdef CONFIG_OF
> +static const struct of_device_id exynos_g2d_match[] = {
> + { .compatible = "samsung,exynos5250-g2d" },

Looks good to me but please add document for it.

To other guys,
And is there anyone who know where this document should be added to?
I'm not sure that the g2d document should be placed in
Documentation/devicetree/bindings/gpu, media, drm/exynos or arm/exynos. At
least, this document should be shared with the g2d hw relevant drivers such
as v4l2 and drm. So is ".../bindings/gpu" proper place?

Thanks,
Inki Dae

> + {},
> +};
> +MODULE_DEVICE_TABLE(of, exynos_g2d_match);
> +#endif
> +
>  struct platform_driver g2d_driver = {
>   .probe  = g2d_probe,
>   .remove = g2d_remove,
> @@ -1247,5 +1256,6 @@ struct platform_driver g2d_driver = {
>   .name   = "s5p-g2d",
>   .owner  = THIS_MODULE,
>   .pm = _pm_ops,
> + .of_match_table = of_match_ptr(exynos_g2d_match),
>   },
>  };
> --
> 1.7.4.1



[PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread Sachin Kamat
On 6 February 2013 13:02, Inki Dae  wrote:
>
> Looks good to me but please add document for it.

Yes. I will. I was planning to send the bindings document patch along
with the dt patches (adding node entries to dts files).
Sylwester had suggested adding this to
Documentation/devicetree/bindings/media/ which contains other media
IPs.

>
> To other guys,
> And is there anyone who know where this document should be added to?
> I'm not sure that the g2d document should be placed in
> Documentation/devicetree/bindings/gpu, media, drm/exynos or arm/exynos. At
> least, this document should be shared with the g2d hw relevant drivers such
> as v4l2 and drm. So is ".../bindings/gpu" proper place?
>


-- 
With warm regards,
Sachin


[PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread Sylwester Nawrocki
On 02/06/2013 09:51 AM, Inki Dae wrote:
[...]
> I think that it's better to go to gpu than media and we can divide Exynos
> IPs into the bellow categories,
> 
> Media : mfc
> GPU : g2d, g3d, fimc, gsc

Heh, nice try! :) GPU and FIMC ? FIMC is a camera subsystem (hence 'C' 
in the acronym), so what it has really to do with GPU ? All right, this IP 
has really two functions: camera capture and video post-processing 
(colorspace conversion, scaling), but the main feature is camera capture 
(fimc-lite is a camera capture interface IP only).

Also, Exynos5 GScaler is used as a DMA engine for camera capture data
pipelines, so it will be used by a camera capture driver as well. It
really belongs to "Media" and "GPU", as this is a multifunctional 
device (similarly to FIMC).

So I propose following classification, which seems less inaccurate:

GPU:   g2d, g3d
Media: mfc, fimc, fimc-lite, fimc-is, mipi-csis, gsc
Video: fimd, hdmi, eDP, mipi-dsim

I have already a DT bindings description prepared for fimc [1].
(probably it needs to be rephrased a bit not to refer to the linux
device model). I put it in Documentation/devicetree/bindings/media/soc, 
but likely there is no need for the 'soc' subdirectory...

> Video : fimd, hdmi, eDP, MIPI-DSI
> 
> And I think that the device-tree describes hardware so possibly, all
> documents in .../bindings/drm/exynos/* should be moved to proper place also.
> Please give  me any opinions.

Yes, I agree. If possible, it would be nice to have some Linux API
agnostic locations.

[1] goo.gl/eTGOl

--

Thanks,
Sylwester


[PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread Sachin Kamat
From: Ajay Kumar 

This patch adds device tree match table for Exynos G2D controller.

Signed-off-by: Ajay Kumar 
Signed-off-by: Sachin Kamat 
---
Patch based on exynos-drm-fixes branch of Inki Dae's tree:
git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git

Changes since v1:
Modified the compatible string as per the discussions at [1].
[1] https://patchwork1.kernel.org/patch/2045821/
---
 drivers/gpu/drm/exynos/exynos_drm_g2d.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c 
b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index ddcfb5d..0fcfbe4 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 
 #include 
@@ -1240,6 +1241,14 @@ static int g2d_resume(struct device *dev)

 static SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume);

+#ifdef CONFIG_OF
+static const struct of_device_id exynos_g2d_match[] = {
+   { .compatible = "samsung,exynos5250-g2d" },
+   {},
+};
+MODULE_DEVICE_TABLE(of, exynos_g2d_match);
+#endif
+
 struct platform_driver g2d_driver = {
.probe  = g2d_probe,
.remove = g2d_remove,
@@ -1247,5 +1256,6 @@ struct platform_driver g2d_driver = {
.name   = "s5p-g2d",
.owner  = THIS_MODULE,
.pm = _pm_ops,
+   .of_match_table = of_match_ptr(exynos_g2d_match),
},
 };
-- 
1.7.4.1



RE: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread Inki Dae


 -Original Message-
 From: Sachin Kamat [mailto:sachin.ka...@linaro.org]
 Sent: Wednesday, February 06, 2013 5:03 PM
 To: Inki Dae
 Cc: linux-me...@vger.kernel.org; dri-devel@lists.freedesktop.org;
 devicetree-disc...@lists.ozlabs.org; k.deb...@samsung.com;
 s.nawro...@samsung.com; kgene@samsung.com; patc...@linaro.org; Ajay
 Kumar
 Subject: Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery
 support for G2D
 
 On 6 February 2013 13:02, Inki Dae inki@samsung.com wrote:
 
  Looks good to me but please add document for it.
 
 Yes. I will. I was planning to send the bindings document patch along
 with the dt patches (adding node entries to dts files).
 Sylwester had suggested adding this to
 Documentation/devicetree/bindings/media/ which contains other media
 IPs.

I think that it's better to go to gpu than media and we can divide Exynos
IPs into the bellow categories,

Media : mfc
GPU : g2d, g3d, fimc, gsc
Video : fimd, hdmi, eDP, MIPI-DSI

And I think that the device-tree describes hardware so possibly, all
documents in .../bindings/drm/exynos/* should be moved to proper place also.
Please give  me any opinions.

Thanks,
Inki Dae

 
 
  To other guys,
  And is there anyone who know where this document should be added to?
  I'm not sure that the g2d document should be placed in
  Documentation/devicetree/bindings/gpu, media, drm/exynos or arm/exynos.
 At
  least, this document should be shared with the g2d hw relevant drivers
 such
  as v4l2 and drm. So is .../bindings/gpu proper place?
 
 
 
 --
 With warm regards,
 Sachin

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread 김승우


On 2013년 02월 06일 17:51, Inki Dae wrote:
 
 
 -Original Message-
 From: Sachin Kamat [mailto:sachin.ka...@linaro.org]
 Sent: Wednesday, February 06, 2013 5:03 PM
 To: Inki Dae
 Cc: linux-me...@vger.kernel.org; dri-devel@lists.freedesktop.org;
 devicetree-disc...@lists.ozlabs.org; k.deb...@samsung.com;
 s.nawro...@samsung.com; kgene@samsung.com; patc...@linaro.org; Ajay
 Kumar
 Subject: Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery
 support for G2D

 On 6 February 2013 13:02, Inki Dae inki@samsung.com wrote:

 Looks good to me but please add document for it.

 Yes. I will. I was planning to send the bindings document patch along
 with the dt patches (adding node entries to dts files).
 Sylwester had suggested adding this to
 Documentation/devicetree/bindings/media/ which contains other media
 IPs.
 
 I think that it's better to go to gpu than media and we can divide Exynos
 IPs into the bellow categories,
 
 Media : mfc
 GPU : g2d, g3d, fimc, gsc
 Video : fimd, hdmi, eDP, MIPI-DSI

Hm, here is another considering point. Some device can be used as one of
two sub-system. For example g2d can be used as V4L2 driver or DRM
driver. And more specific case, multiple fimc/gsc deivces can be
separately used as both drivers: two fimc devices are used as V4L2
driver and other devices are used as DRM driver.
Current discussion, without change of build configuration, device can be
only used as one driver.

So I want to discuss about how we can bind device and driver just with
dts configuration.

IMO, there are two options.

First, driver usage is set on configurable node.
g2d: g2d {
compatible = samsung,exynos4212-g2d;
...
*subsystem = v4l2* or *subsystem = drm*
};
Node name and type is just an example to describe.
With this option, driver which is not matched with subsystem node should
return with fail during its probing.

Second, using dual compatible strings.
g2d: g2d {
*compatible = samsung,exynos4212-v4l2-g2d; or
compatible = samsung,exynos4212-v4l2-g2d;*
...
};
String is just an example so don't mind if it is ugly. Actually, with
this option, compatible string has non HW information. But this option
does not need fail in probing.

I'm not sure these options are fit to DT concept. Please let me know if
anyone has idea.

Best Regards,
- Seung-Woo Kim

 
 And I think that the device-tree describes hardware so possibly, all
 documents in .../bindings/drm/exynos/* should be moved to proper place also.
 Please give  me any opinions.
 
 Thanks,
 Inki Dae
 


 To other guys,
 And is there anyone who know where this document should be added to?
 I'm not sure that the g2d document should be placed in
 Documentation/devicetree/bindings/gpu, media, drm/exynos or arm/exynos.
 At
 least, this document should be shared with the g2d hw relevant drivers
 such
 as v4l2 and drm. So is .../bindings/gpu proper place?



 --
 With warm regards,
 Sachin
 
 ___
 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


Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread Sylwester Nawrocki
On 02/06/2013 09:51 AM, Inki Dae wrote:
[...]
 I think that it's better to go to gpu than media and we can divide Exynos
 IPs into the bellow categories,
 
 Media : mfc
 GPU : g2d, g3d, fimc, gsc

Heh, nice try! :) GPU and FIMC ? FIMC is a camera subsystem (hence 'C' 
in the acronym), so what it has really to do with GPU ? All right, this IP 
has really two functions: camera capture and video post-processing 
(colorspace conversion, scaling), but the main feature is camera capture 
(fimc-lite is a camera capture interface IP only).

Also, Exynos5 GScaler is used as a DMA engine for camera capture data
pipelines, so it will be used by a camera capture driver as well. It
really belongs to Media and GPU, as this is a multifunctional 
device (similarly to FIMC).

So I propose following classification, which seems less inaccurate:

GPU:   g2d, g3d
Media: mfc, fimc, fimc-lite, fimc-is, mipi-csis, gsc
Video: fimd, hdmi, eDP, mipi-dsim

I have already a DT bindings description prepared for fimc [1].
(probably it needs to be rephrased a bit not to refer to the linux
device model). I put it in Documentation/devicetree/bindings/media/soc, 
but likely there is no need for the 'soc' subdirectory...

 Video : fimd, hdmi, eDP, MIPI-DSI
 
 And I think that the device-tree describes hardware so possibly, all
 documents in .../bindings/drm/exynos/* should be moved to proper place also.
 Please give  me any opinions.

Yes, I agree. If possible, it would be nice to have some Linux API
agnostic locations.

[1] goo.gl/eTGOl

--

Thanks,
Sylwester
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread Sachin Kamat
On 6 February 2013 13:02, Inki Dae inki@samsung.com wrote:

 Looks good to me but please add document for it.

Yes. I will. I was planning to send the bindings document patch along
with the dt patches (adding node entries to dts files).
Sylwester had suggested adding this to
Documentation/devicetree/bindings/media/ which contains other media
IPs.


 To other guys,
 And is there anyone who know where this document should be added to?
 I'm not sure that the g2d document should be placed in
 Documentation/devicetree/bindings/gpu, media, drm/exynos or arm/exynos. At
 least, this document should be shared with the g2d hw relevant drivers such
 as v4l2 and drm. So is .../bindings/gpu proper place?



-- 
With warm regards,
Sachin
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


RE: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread Inki Dae


 -Original Message-
 From: linux-media-ow...@vger.kernel.org [mailto:linux-media-
 ow...@vger.kernel.org] On Behalf Of Sylwester Nawrocki
 Sent: Wednesday, February 06, 2013 8:24 PM
 To: Inki Dae
 Cc: 'Sachin Kamat'; linux-me...@vger.kernel.org; dri-
 de...@lists.freedesktop.org; devicetree-disc...@lists.ozlabs.org;
 k.deb...@samsung.com; kgene@samsung.com; patc...@linaro.org; 'Ajay
 Kumar'; kyungmin.p...@samsung.com; sw0312@samsung.com;
 jy0922.s...@samsung.com
 Subject: Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery
 support for G2D
 
 On 02/06/2013 09:51 AM, Inki Dae wrote:
 [...]
  I think that it's better to go to gpu than media and we can divide
 Exynos
  IPs into the bellow categories,
 
  Media : mfc
  GPU : g2d, g3d, fimc, gsc
 
 Heh, nice try! :) GPU and FIMC ? FIMC is a camera subsystem (hence 'C'
 in the acronym), so what it has really to do with GPU ? All right, this IP
 has really two functions: camera capture and video post-processing
 (colorspace conversion, scaling), but the main feature is camera capture
 (fimc-lite is a camera capture interface IP only).
 
 Also, Exynos5 GScaler is used as a DMA engine for camera capture data
 pipelines, so it will be used by a camera capture driver as well. It
 really belongs to Media and GPU, as this is a multifunctional
 device (similarly to FIMC).
 
 So I propose following classification, which seems less inaccurate:
 
 GPU:   g2d, g3d
 Media: mfc, fimc, fimc-lite, fimc-is, mipi-csis, gsc
 Video: fimd, hdmi, eDP, mipi-dsim
 

Ok, it seems that your propose is better. :)

To Sachin,
Please add g2d document to .../bindings/gpu

To Rahul,
Could you please move .../drm/exynos/* to .../bindings/video? Probably you
need to rename the files there to exynos*.txt

If there are no other opinions, let's start  :)

Thanks,
Inki Dae

 I have already a DT bindings description prepared for fimc [1].
 (probably it needs to be rephrased a bit not to refer to the linux
 device model). I put it in Documentation/devicetree/bindings/media/soc,
 but likely there is no need for the 'soc' subdirectory...
 
  Video : fimd, hdmi, eDP, MIPI-DSI
 
  And I think that the device-tree describes hardware so possibly, all
  documents in .../bindings/drm/exynos/* should be moved to proper place
 also.
  Please give  me any opinions.
 
 Yes, I agree. If possible, it would be nice to have some Linux API
 agnostic locations.
 
 [1] goo.gl/eTGOl
 
 --
 
 Thanks,
 Sylwester
 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-06 Thread Sachin Kamat
On 6 February 2013 16:53, Sylwester Nawrocki s.nawro...@samsung.com wrote:
 On 02/06/2013 09:51 AM, Inki Dae wrote:
 [...]

 So I propose following classification, which seems less inaccurate:

 GPU:   g2d, g3d
 Media: mfc, fimc, fimc-lite, fimc-is, mipi-csis, gsc
 Video: fimd, hdmi, eDP, mipi-dsim

Thanks Inki and Sylwester for your inputs.
We need to figure out some sensible location for these drivers'
documentation though I liked what you have proposed for now.
I will add g2d document to gpu directory as both of you suggest the same.
If there are better opinions will move it later.

-- 
With warm regards,
Sachin
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-05 Thread Sachin Kamat
From: Ajay Kumar ajaykumar...@samsung.com

This patch adds device tree match table for Exynos G2D controller.

Signed-off-by: Ajay Kumar ajaykumar...@samsung.com
Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
Patch based on exynos-drm-fixes branch of Inki Dae's tree:
git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git

Changes since v1:
Modified the compatible string as per the discussions at [1].
[1] https://patchwork1.kernel.org/patch/2045821/
---
 drivers/gpu/drm/exynos/exynos_drm_g2d.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c 
b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index ddcfb5d..0fcfbe4 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -19,6 +19,7 @@
 #include linux/workqueue.h
 #include linux/dma-mapping.h
 #include linux/dma-attrs.h
+#include linux/of.h
 
 #include drm/drmP.h
 #include drm/exynos_drm.h
@@ -1240,6 +1241,14 @@ static int g2d_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume);
 
+#ifdef CONFIG_OF
+static const struct of_device_id exynos_g2d_match[] = {
+   { .compatible = samsung,exynos5250-g2d },
+   {},
+};
+MODULE_DEVICE_TABLE(of, exynos_g2d_match);
+#endif
+
 struct platform_driver g2d_driver = {
.probe  = g2d_probe,
.remove = g2d_remove,
@@ -1247,5 +1256,6 @@ struct platform_driver g2d_driver = {
.name   = s5p-g2d,
.owner  = THIS_MODULE,
.pm = g2d_pm_ops,
+   .of_match_table = of_match_ptr(exynos_g2d_match),
},
 };
-- 
1.7.4.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


RE: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D

2013-02-05 Thread Inki Dae
 -Original Message-
 From: Sachin Kamat [mailto:sachin.ka...@linaro.org]
 Sent: Wednesday, February 06, 2013 2:30 PM
 To: linux-me...@vger.kernel.org; dri-devel@lists.freedesktop.org;
 devicetree-disc...@lists.ozlabs.org
 Cc: k.deb...@samsung.com; sachin.ka...@linaro.org; inki@samsung.com;
 s.nawro...@samsung.com; kgene@samsung.com; patc...@linaro.org; Ajay
 Kumar
 Subject: [PATCH v2 2/2] drm/exynos: Add device tree based discovery
 support for G2D
 
 From: Ajay Kumar ajaykumar...@samsung.com
 
 This patch adds device tree match table for Exynos G2D controller.
 
 Signed-off-by: Ajay Kumar ajaykumar...@samsung.com
 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
 Patch based on exynos-drm-fixes branch of Inki Dae's tree:
 git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git
 
 Changes since v1:
 Modified the compatible string as per the discussions at [1].
 [1] https://patchwork1.kernel.org/patch/2045821/
 ---
  drivers/gpu/drm/exynos/exynos_drm_g2d.c |   10 ++
  1 files changed, 10 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
 b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
 index ddcfb5d..0fcfbe4 100644
 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
 +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
 @@ -19,6 +19,7 @@
  #include linux/workqueue.h
  #include linux/dma-mapping.h
  #include linux/dma-attrs.h
 +#include linux/of.h
 
  #include drm/drmP.h
  #include drm/exynos_drm.h
 @@ -1240,6 +1241,14 @@ static int g2d_resume(struct device *dev)
 
  static SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume);
 
 +#ifdef CONFIG_OF
 +static const struct of_device_id exynos_g2d_match[] = {
 + { .compatible = samsung,exynos5250-g2d },

Looks good to me but please add document for it.

To other guys,
And is there anyone who know where this document should be added to?
I'm not sure that the g2d document should be placed in
Documentation/devicetree/bindings/gpu, media, drm/exynos or arm/exynos. At
least, this document should be shared with the g2d hw relevant drivers such
as v4l2 and drm. So is .../bindings/gpu proper place?

Thanks,
Inki Dae

 + {},
 +};
 +MODULE_DEVICE_TABLE(of, exynos_g2d_match);
 +#endif
 +
  struct platform_driver g2d_driver = {
   .probe  = g2d_probe,
   .remove = g2d_remove,
 @@ -1247,5 +1256,6 @@ struct platform_driver g2d_driver = {
   .name   = s5p-g2d,
   .owner  = THIS_MODULE,
   .pm = g2d_pm_ops,
 + .of_match_table = of_match_ptr(exynos_g2d_match),
   },
  };
 --
 1.7.4.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel