All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] [media] s5p-g2d: Add DT based discovery support
@ 2013-02-06  5:29 Sachin Kamat
  2013-02-06  5:29 ` [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D Sachin Kamat
       [not found] ` <1360128584-23167-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
  0 siblings, 2 replies; 17+ messages in thread
From: Sachin Kamat @ 2013-02-06  5:29 UTC (permalink / raw)
  To: linux-media, dri-devel, devicetree-discuss
  Cc: k.debski, sachin.kamat, inki.dae, s.nawrocki, kgene.kim, patches

This patch adds device tree based discovery support to G2D driver

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
Based on for_v3.9 branch of below tree:
git://linuxtv.org/snawrocki/samsung.git

Changes since v1:
* Addressed review comments from Sylwester <s.nawrocki@samsung.com>.
* Modified the compatible string as per the discussions at [1].
[1] https://patchwork1.kernel.org/patch/2045821/
---
 drivers/media/platform/s5p-g2d/g2d.c |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
index 7e41529..6923be2 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -18,6 +18,7 @@
 #include <linux/slab.h>
 #include <linux/clk.h>
 #include <linux/interrupt.h>
+#include <linux/of.h>
 
 #include <linux/platform_device.h>
 #include <media/v4l2-mem2mem.h>
@@ -695,11 +696,14 @@ static struct v4l2_m2m_ops g2d_m2m_ops = {
 	.unlock		= g2d_unlock,
 };
 
+static const struct of_device_id exynos_g2d_match[];
+
 static int g2d_probe(struct platform_device *pdev)
 {
 	struct g2d_dev *dev;
 	struct video_device *vfd;
 	struct resource *res;
+	const struct of_device_id *of_id;
 	int ret = 0;
 
 	dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
@@ -796,7 +800,17 @@ static int g2d_probe(struct platform_device *pdev)
 	}
 
 	def_frame.stride = (def_frame.width * def_frame.fmt->depth) >> 3;
-	dev->variant = g2d_get_drv_data(pdev);
+
+	if (!pdev->dev.of_node) {
+		dev->variant = g2d_get_drv_data(pdev);
+	} else {
+		of_id = of_match_node(exynos_g2d_match, pdev->dev.of_node);
+		if (!of_id) {
+			ret = -ENODEV;
+			goto unreg_video_dev;
+		}
+		dev->variant = (struct g2d_variant *)of_id->data;
+	}
 
 	return 0;
 
@@ -837,13 +851,25 @@ static int g2d_remove(struct platform_device *pdev)
 }
 
 static struct g2d_variant g2d_drvdata_v3x = {
-	.hw_rev = TYPE_G2D_3X,
+	.hw_rev = TYPE_G2D_3X, /* Revision 3.0 for S5PV210 and Exynos4210 */
 };
 
 static struct g2d_variant g2d_drvdata_v4x = {
 	.hw_rev = TYPE_G2D_4X, /* Revision 4.1 for Exynos4X12 and Exynos5 */
 };
 
+static const struct of_device_id exynos_g2d_match[] = {
+	{
+		.compatible = "samsung,s5pv210-g2d",
+		.data = &g2d_drvdata_v3x,
+	}, {
+		.compatible = "samsung,exynos4212-g2d",
+		.data = &g2d_drvdata_v4x,
+	},
+	{},
+};
+MODULE_DEVICE_TABLE(of, exynos_g2d_match);
+
 static struct platform_device_id g2d_driver_ids[] = {
 	{
 		.name = "s5p-g2d",
@@ -863,6 +889,7 @@ static struct platform_driver g2d_pdrv = {
 	.driver		= {
 		.name = G2D_NAME,
 		.owner = THIS_MODULE,
+		.of_match_table = exynos_g2d_match,
 	},
 };
 
-- 
1.7.4.1

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

* [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D
  2013-02-06  5:29 [PATCH v2 1/2] [media] s5p-g2d: Add DT based discovery support Sachin Kamat
@ 2013-02-06  5:29 ` Sachin Kamat
  2013-02-06  7:32   ` Inki Dae
  2013-02-12 13:17   ` Inki Dae
       [not found] ` <1360128584-23167-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
  1 sibling, 2 replies; 17+ messages in thread
From: Sachin Kamat @ 2013-02-06  5:29 UTC (permalink / raw)
  To: linux-media, dri-devel, devicetree-discuss
  Cc: k.debski, sachin.kamat, inki.dae, s.nawrocki, kgene.kim, patches,
	Ajay Kumar

From: Ajay Kumar <ajaykumar.rs@samsung.com>

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

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@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

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

* RE: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D
  2013-02-06  5:29 ` [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D Sachin Kamat
@ 2013-02-06  7:32   ` Inki Dae
  2013-02-06  8:02     ` Sachin Kamat
  2013-02-12 13:17   ` Inki Dae
  1 sibling, 1 reply; 17+ messages in thread
From: Inki Dae @ 2013-02-06  7:32 UTC (permalink / raw)
  To: 'Sachin Kamat', linux-media, dri-devel, devicetree-discuss
  Cc: k.debski, s.nawrocki, kgene.kim, patches, 'Ajay Kumar'

> -----Original Message-----
> From: Sachin Kamat [mailto:sachin.kamat@linaro.org]
> Sent: Wednesday, February 06, 2013 2:30 PM
> To: linux-media@vger.kernel.org; dri-devel@lists.freedesktop.org;
> devicetree-discuss@lists.ozlabs.org
> Cc: k.debski@samsung.com; sachin.kamat@linaro.org; inki.dae@samsung.com;
> s.nawrocki@samsung.com; kgene.kim@samsung.com; patches@linaro.org; Ajay
> Kumar
> Subject: [PATCH v2 2/2] drm/exynos: Add device tree based discovery
> support for G2D
> 
> From: Ajay Kumar <ajaykumar.rs@samsung.com>
> 
> This patch adds device tree match table for Exynos G2D controller.
> 
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> Signed-off-by: Sachin Kamat <sachin.kamat@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

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

* Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D
  2013-02-06  7:32   ` Inki Dae
@ 2013-02-06  8:02     ` Sachin Kamat
  2013-02-06  8:51       ` Inki Dae
  0 siblings, 1 reply; 17+ messages in thread
From: Sachin Kamat @ 2013-02-06  8:02 UTC (permalink / raw)
  To: Inki Dae
  Cc: linux-media, dri-devel, devicetree-discuss, k.debski, s.nawrocki,
	kgene.kim, patches, Ajay Kumar

On 6 February 2013 13:02, Inki Dae <inki.dae@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

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

* RE: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D
  2013-02-06  8:02     ` Sachin Kamat
@ 2013-02-06  8:51       ` Inki Dae
  2013-02-06 11:21         ` 김승우
  2013-02-06 11:23         ` Sylwester Nawrocki
  0 siblings, 2 replies; 17+ messages in thread
From: Inki Dae @ 2013-02-06  8:51 UTC (permalink / raw)
  To: 'Sachin Kamat'
  Cc: linux-media, dri-devel, devicetree-discuss, k.debski, s.nawrocki,
	kgene.kim, patches, 'Ajay Kumar',
	kyungmin.park, sw0312.kim, jy0922.shim



> -----Original Message-----
> From: Sachin Kamat [mailto:sachin.kamat@linaro.org]
> Sent: Wednesday, February 06, 2013 5:03 PM
> To: Inki Dae
> Cc: linux-media@vger.kernel.org; dri-devel@lists.freedesktop.org;
> devicetree-discuss@lists.ozlabs.org; k.debski@samsung.com;
> s.nawrocki@samsung.com; kgene.kim@samsung.com; patches@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.dae@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

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

* Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D
  2013-02-06  8:51       ` Inki Dae
@ 2013-02-06 11:21         ` 김승우
  2013-02-06 11:23         ` Sylwester Nawrocki
  1 sibling, 0 replies; 17+ messages in thread
From: 김승우 @ 2013-02-06 11:21 UTC (permalink / raw)
  To: Inki Dae
  Cc: 'Sachin Kamat',
	kgene.kim, patches, devicetree-discuss, dri-devel, kyungmin.park,
	s.nawrocki, Linux Media Mailing List, sw0312.kim,
	'심준영'



On 2013년 02월 06일 17:51, Inki Dae wrote:
> 
> 
>> -----Original Message-----
>> From: Sachin Kamat [mailto:sachin.kamat@linaro.org]
>> Sent: Wednesday, February 06, 2013 5:03 PM
>> To: Inki Dae
>> Cc: linux-media@vger.kernel.org; dri-devel@lists.freedesktop.org;
>> devicetree-discuss@lists.ozlabs.org; k.debski@samsung.com;
>> s.nawrocki@samsung.com; kgene.kim@samsung.com; patches@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.dae@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
> 

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

* Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D
  2013-02-06  8:51       ` Inki Dae
  2013-02-06 11:21         ` 김승우
@ 2013-02-06 11:23         ` Sylwester Nawrocki
  2013-02-06 11:41           ` Sachin Kamat
  2013-02-06 11:47           ` Inki Dae
  1 sibling, 2 replies; 17+ messages in thread
From: Sylwester Nawrocki @ 2013-02-06 11:23 UTC (permalink / raw)
  To: Inki Dae
  Cc: 'Sachin Kamat',
	linux-media, dri-devel, devicetree-discuss, k.debski, kgene.kim,
	patches, 'Ajay Kumar',
	kyungmin.park, sw0312.kim, jy0922.shim

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

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

* Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D
  2013-02-06 11:23         ` Sylwester Nawrocki
@ 2013-02-06 11:41           ` Sachin Kamat
  2013-02-06 11:47           ` Inki Dae
  1 sibling, 0 replies; 17+ messages in thread
From: Sachin Kamat @ 2013-02-06 11:41 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Inki Dae, linux-media, dri-devel, devicetree-discuss, k.debski,
	kgene.kim, patches, Ajay Kumar, kyungmin.park, sw0312.kim,
	jy0922.shim

On 6 February 2013 16:53, Sylwester Nawrocki <s.nawrocki@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

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

* RE: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D
  2013-02-06 11:23         ` Sylwester Nawrocki
  2013-02-06 11:41           ` Sachin Kamat
@ 2013-02-06 11:47           ` Inki Dae
  1 sibling, 0 replies; 17+ messages in thread
From: Inki Dae @ 2013-02-06 11:47 UTC (permalink / raw)
  To: 'Sylwester Nawrocki'
  Cc: 'Sachin Kamat',
	linux-media, dri-devel, devicetree-discuss, k.debski, kgene.kim,
	patches, 'Ajay Kumar',
	kyungmin.park, sw0312.kim, jy0922.shim, 'Rahul Sharma'



> -----Original Message-----
> From: linux-media-owner@vger.kernel.org [mailto:linux-media-
> owner@vger.kernel.org] On Behalf Of Sylwester Nawrocki
> Sent: Wednesday, February 06, 2013 8:24 PM
> To: Inki Dae
> Cc: 'Sachin Kamat'; linux-media@vger.kernel.org; dri-
> devel@lists.freedesktop.org; devicetree-discuss@lists.ozlabs.org;
> k.debski@samsung.com; kgene.kim@samsung.com; patches@linaro.org; 'Ajay
> Kumar'; kyungmin.park@samsung.com; sw0312.kim@samsung.com;
> jy0922.shim@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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D
  2013-02-06  5:29 ` [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D Sachin Kamat
  2013-02-06  7:32   ` Inki Dae
@ 2013-02-12 13:17   ` Inki Dae
  2013-02-12 13:31     ` Sylwester Nawrocki
       [not found]     ` <CAAQKjZNmUVZnDcy3fbWkairnneOK7dooJT2gn=9++tzS=uhhzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 2 replies; 17+ messages in thread
From: Inki Dae @ 2013-02-12 13:17 UTC (permalink / raw)
  To: Sachin Kamat
  Cc: linux-media, dri-devel, devicetree-discuss, kgene.kim, patches,
	s.nawrocki

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.kamat@linaro.org>:
> From: Ajay Kumar <ajaykumar.rs@samsung.com>
>
> This patch adds device tree match table for Exynos G2D controller.
>
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> Signed-off-by: Sachin Kamat <sachin.kamat@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

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

* Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D
  2013-02-12 13:17   ` Inki Dae
@ 2013-02-12 13:31     ` Sylwester Nawrocki
       [not found]       ` <511A4442.6000402-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
       [not found]     ` <CAAQKjZNmUVZnDcy3fbWkairnneOK7dooJT2gn=9++tzS=uhhzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 17+ messages in thread
From: Sylwester Nawrocki @ 2013-02-12 13:31 UTC (permalink / raw)
  To: Sachin Kamat
  Cc: Inki Dae, linux-media, dri-devel, devicetree-discuss, kgene.kim,
	patches, Grant Likely

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

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

* Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D
  2013-02-12 13:31     ` Sylwester Nawrocki
@ 2013-02-12 13:57           ` Inki Dae
  0 siblings, 0 replies; 17+ messages in thread
From: Inki Dae @ 2013-02-12 13:57 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: kgene.kim-Sze3O3UU22JBDgjK7y7TUQ, patches-QSEj5FYQhm4dnm+yROfE0A,
	Sachin Kamat, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-media-u79uwXL29TY76Z2rM5mHXA

2013/2/12 Sylwester Nawrocki <s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>:
> 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-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D
@ 2013-02-12 13:57           ` Inki Dae
  0 siblings, 0 replies; 17+ messages in thread
From: Inki Dae @ 2013-02-12 13:57 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Sachin Kamat, Grant Likely, kgene.kim, patches,
	devicetree-discuss, dri-devel, linux-media

2013/2/12 Sylwester Nawrocki <s.nawrocki@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

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

* Re: [PATCH 2/2] drm/exynos: Add device tree based discovery support for G2D
       [not found]     ` <CAAQKjZNmUVZnDcy3fbWkairnneOK7dooJT2gn=9++tzS=uhhzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-02-12 17:22       ` Sachin Kamat
  0 siblings, 0 replies; 17+ messages in thread
From: Sachin Kamat @ 2013-02-12 17:22 UTC (permalink / raw)
  To: Inki Dae
  Cc: kgene.kim-Sze3O3UU22JBDgjK7y7TUQ, patches-QSEj5FYQhm4dnm+yROfE0A,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ,
	linux-media-u79uwXL29TY76Z2rM5mHXA


[-- Attachment #1.1: Type: text/plain, Size: 318 bytes --]

On Tuesday, 12 February 2013, Inki Dae <inki.dae-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> Applied and will go to -next.

Thanks.

> And please post the document(in
> Documentation/devicetree/bindings/gpu/) for it later

Already posted (1).

(1) http://patches.linaro.org/14640/

-- 
With warm regards,
Sachin

[-- Attachment #1.2: Type: text/html, Size: 525 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

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

* Re: [PATCH v2 1/2] [media] s5p-g2d: Add DT based discovery support
       [not found] ` <1360128584-23167-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
@ 2013-02-12 17:30   ` Sachin Kamat
  2013-02-13 23:34     ` Sylwester Nawrocki
  0 siblings, 1 reply; 17+ messages in thread
From: Sachin Kamat @ 2013-02-12 17:30 UTC (permalink / raw)
  To: linux-media-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
  Cc: k.debski-Sze3O3UU22JBDgjK7y7TUQ,
	kgene.kim-Sze3O3UU22JBDgjK7y7TUQ, patches-QSEj5FYQhm4dnm+yROfE0A,
	sachin.kamat-QSEj5FYQhm4dnm+yROfE0A,
	inki.dae-Sze3O3UU22JBDgjK7y7TUQ,
	s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ


[-- Attachment #1.1: Type: text/plain, Size: 666 bytes --]

Hi Sylwester,

On Wednesday, 6 February 2013, Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> This patch adds device tree based discovery support to G2D driver
>
> Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
> Based on for_v3.9 branch of below tree:
> git://linuxtv.org/snawrocki/samsung.git
>
> Changes since v1:
> * Addressed review comments from Sylwester <s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>.
> * Modified the compatible string as per the discussions at [1].
> [1] https://patchwork1.kernel.org/patch/2045821/
>

Does this patch look good?


-- 
With warm regards,
Sachin

[-- Attachment #1.2: Type: text/html, Size: 1125 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

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

* Re: [PATCH v2 1/2] [media] s5p-g2d: Add DT based discovery support
  2013-02-12 17:30   ` [PATCH v2 1/2] [media] s5p-g2d: Add DT based discovery support Sachin Kamat
@ 2013-02-13 23:34     ` Sylwester Nawrocki
       [not found]       ` <511C230B.5060302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 17+ messages in thread
From: Sylwester Nawrocki @ 2013-02-13 23:34 UTC (permalink / raw)
  To: Sachin Kamat
  Cc: linux-media, dri-devel, devicetree-discuss, k.debski, kgene.kim,
	patches, inki.dae, s.nawrocki

On 02/12/2013 06:30 PM, Sachin Kamat wrote:
>
> Hi Sylwester,
>
> On Wednesday, 6 February 2013, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>>  This patch adds device tree based discovery support to G2D driver
>>
>>  Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>>  ---
>>  Based on for_v3.9 branch of below tree:
>>  git://linuxtv.org/snawrocki/samsung.git
>>
>>  Changes since v1:
>>  * Addressed review comments from Sylwester <s.nawrocki@samsung.com>.
>>  * Modified the compatible string as per the discussions at [1].
>>  [1] https://patchwork1.kernel.org/patch/2045821/
>>
>
> Does this patch look good?

It looks OK to me. I've sent a pull request including it, but it may
happen it ends up only in 3.10.

I tried to test this patch today and I had to correct some clock
definitions in the common clock API driver [1]. And we already have
quite a few fixes to that patch series.

Shouldn't you also provide a patch adding related OF_DEV_AUXDATA entry ?
How did you test this one ?

When the new clocks driver gets merged (I guess it happens only in 3.10)
I'd like to have the media devices' clock names cleaned up, instead of
names like: {"sclk_fimg2d", "fimg2d"}, {"sclk_fimc", "fimc"},
{"sclk_fimd"/"fimd"}, in clock-names property we could have common names,
e.g. { "sclk", "gate" }. This could simplify a bit subsystems like devfreq.

Also I noticed there are some issues caused by splitting mux + div + gate
clocks into 3 different clocks. One solution to this might be to use the
new composite clock type.

[1] http://www.spinics.net/lists/arm-kernel/msg214149.html

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

* Re: [PATCH v2 1/2] [media] s5p-g2d: Add DT based discovery support
       [not found]       ` <511C230B.5060302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-02-14 15:06         ` Sachin Kamat
  0 siblings, 0 replies; 17+ messages in thread
From: Sachin Kamat @ 2013-02-14 15:06 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: k.debski-Sze3O3UU22JBDgjK7y7TUQ,
	kgene.kim-Sze3O3UU22JBDgjK7y7TUQ, patches-QSEj5FYQhm4dnm+yROfE0A,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	inki.dae-Sze3O3UU22JBDgjK7y7TUQ,
	s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ,
	linux-media-u79uwXL29TY76Z2rM5mHXA


[-- Attachment #1.1: Type: text/plain, Size: 2081 bytes --]

On Thursday, 14 February 2013, Sylwester Nawrocki <
sylvester.nawrocki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On 02/12/2013 06:30 PM, Sachin Kamat wrote:
>>
>> Hi Sylwester,
>>
>> On Wednesday, 6 February 2013, Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
wrote:
>>>
>>>  This patch adds device tree based discovery support to G2D driver
>>>
>>>  Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>>  ---
>>>  Based on for_v3.9 branch of below tree:
>>>  git://linuxtv.org/snawrocki/samsung.git
>>>
>>>  Changes since v1:
>>>  * Addressed review comments from Sylwester <s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>.
>>>  * Modified the compatible string as per the discussions at [1].
>>>  [1] https://patchwork1.kernel.org/patch/2045821/
>>>
>>
>> Does this patch look good?
>
> It looks OK to me. I've sent a pull request including it, but it may
> happen it ends up only in 3.10.

Thanks. Hope it gets picked for 3.9 itself.

>
> I tried to test this patch today and I had to correct some clock
> definitions in the common clock API driver [1]. And we already have
> quite a few fixes to that patch series.
>
> Shouldn't you also provide a patch adding related OF_DEV_AUXDATA entry ?
> How did you test this one ?

I tested this without the common clock patches, with the mainline tree. It
did not require any auxdata  entry.
>
> When the new clocks driver gets merged (I guess it happens only in 3.10)
> I'd like to have the media devices' clock names cleaned up, instead of
> names like: {"sclk_fimg2d", "fimg2d"}, {"sclk_fimc", "fimc"},
> {"sclk_fimd"/"fimd"}, in clock-names property we could have common names,
> e.g. { "sclk", "gate" }. This could simplify a bit subsystems like
devfreq.

Yes. That makes sense.

>
> Also I noticed there are some issues caused by splitting mux + div + gate
> clocks into 3 different clocks. One solution to this might be to use the
> new composite clock type.

Ok.

>
> [1] http://www.spinics.net/lists/arm-kernel/msg214149.html
>

-- 
With warm regards,
Sachin

[-- Attachment #1.2: Type: text/html, Size: 3107 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

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

end of thread, other threads:[~2013-02-14 15:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06  5:29 [PATCH v2 1/2] [media] s5p-g2d: Add DT based discovery support Sachin Kamat
2013-02-06  5:29 ` [PATCH v2 2/2] drm/exynos: Add device tree based discovery support for G2D Sachin Kamat
2013-02-06  7:32   ` Inki Dae
2013-02-06  8:02     ` Sachin Kamat
2013-02-06  8:51       ` Inki Dae
2013-02-06 11:21         ` 김승우
2013-02-06 11:23         ` Sylwester Nawrocki
2013-02-06 11:41           ` Sachin Kamat
2013-02-06 11:47           ` Inki Dae
2013-02-12 13:17   ` Inki Dae
2013-02-12 13:31     ` Sylwester Nawrocki
     [not found]       ` <511A4442.6000402-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-02-12 13:57         ` Inki Dae
2013-02-12 13:57           ` Inki Dae
     [not found]     ` <CAAQKjZNmUVZnDcy3fbWkairnneOK7dooJT2gn=9++tzS=uhhzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-12 17:22       ` [PATCH " Sachin Kamat
     [not found] ` <1360128584-23167-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-02-12 17:30   ` [PATCH v2 1/2] [media] s5p-g2d: Add DT based discovery support Sachin Kamat
2013-02-13 23:34     ` Sylwester Nawrocki
     [not found]       ` <511C230B.5060302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-02-14 15:06         ` Sachin Kamat

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.