linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/exynos: rotator: Add support for s5pv210
@ 2018-12-19 15:57 Paweł Chmiel
  2018-12-19 15:57 ` [PATCH 1/3] " Paweł Chmiel
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Paweł Chmiel @ 2018-12-19 15:57 UTC (permalink / raw)
  To: inki.dae, krzk, airlied
  Cc: jy0922.shim, sw0312.kim, kyungmin.park, kgene, dri-devel,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, robh+dt,
	mark.rutland, devicetree, Paweł Chmiel

This patchset adds support for s5pv210 soc, into 
Samsung DRM Rotator driver. Currently only NV12 and XRGB8888 formats
 are supported.

It was tested by using simple tool from 
https://www.spinics.net/lists/linux-samsung-soc/msg60498.html

Paweł Chmiel (3):
  drm/exynos: rotator: Add support for s5pv210
  dt-bindings: gpu: samsung-rotator: Document s5pv210 support
  ARM: dts: s5pv210: Add node for exynos-rotator

 .../bindings/gpu/samsung-rotator.txt          |  1 +
 arch/arm/boot/dts/s5pv210.dtsi                |  9 ++++++++
 drivers/gpu/drm/exynos/exynos_drm_rotator.c   | 23 +++++++++++++++++++
 3 files changed, 33 insertions(+)

-- 
2.17.1


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

* [PATCH 1/3] drm/exynos: rotator: Add support for s5pv210
  2018-12-19 15:57 [PATCH 0/3] drm/exynos: rotator: Add support for s5pv210 Paweł Chmiel
@ 2018-12-19 15:57 ` Paweł Chmiel
  2019-01-09  3:59   ` Inki Dae
  2018-12-19 15:57 ` [PATCH 2/3] dt-bindings: gpu: samsung-rotator: Document s5pv210 support Paweł Chmiel
  2018-12-19 15:57 ` [PATCH 3/3] ARM: dts: s5pv210: Add node for exynos-rotator Paweł Chmiel
  2 siblings, 1 reply; 8+ messages in thread
From: Paweł Chmiel @ 2018-12-19 15:57 UTC (permalink / raw)
  To: inki.dae, krzk, airlied
  Cc: jy0922.shim, sw0312.kim, kyungmin.park, kgene, dri-devel,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, robh+dt,
	mark.rutland, devicetree, Paweł Chmiel

This commit adds support for s5pv210.
Currently only NV12 and XRGB8888 formats are supported.
It was tested by using tool from
https://www.spinics.net/lists/linux-samsung-soc/msg60498.html

Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
---
 drivers/gpu/drm/exynos/exynos_drm_rotator.c | 23 +++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index a820a68429b9..a822d340ccf6 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -357,6 +357,11 @@ static int rotator_runtime_resume(struct device *dev)
 }
 #endif
 
+static const struct drm_exynos_ipp_limit rotator_s5pv210_rbg888_limits[] = {
+	{ IPP_SIZE_LIMIT(BUFFER, .h = { 8, SZ_16K }, .v = { 8, SZ_16K }) },
+	{ IPP_SIZE_LIMIT(AREA, .h.align = 2, .v.align = 2) },
+};
+
 static const struct drm_exynos_ipp_limit rotator_4210_rbg888_limits[] = {
 	{ IPP_SIZE_LIMIT(BUFFER, .h = { 8, SZ_16K }, .v = { 8, SZ_16K }) },
 	{ IPP_SIZE_LIMIT(AREA, .h.align = 4, .v.align = 4) },
@@ -372,6 +377,11 @@ static const struct drm_exynos_ipp_limit rotator_5250_rbg888_limits[] = {
 	{ IPP_SIZE_LIMIT(AREA, .h.align = 2, .v.align = 2) },
 };
 
+static const struct drm_exynos_ipp_limit rotator_s5pv210_yuv_limits[] = {
+	{ IPP_SIZE_LIMIT(BUFFER, .h = { 32, SZ_64K }, .v = { 32, SZ_64K }) },
+	{ IPP_SIZE_LIMIT(AREA, .h.align = 8, .v.align = 8) },
+};
+
 static const struct drm_exynos_ipp_limit rotator_4210_yuv_limits[] = {
 	{ IPP_SIZE_LIMIT(BUFFER, .h = { 32, SZ_64K }, .v = { 32, SZ_64K }) },
 	{ IPP_SIZE_LIMIT(AREA, .h.align = 8, .v.align = 8) },
@@ -382,6 +392,11 @@ static const struct drm_exynos_ipp_limit rotator_4412_yuv_limits[] = {
 	{ IPP_SIZE_LIMIT(AREA, .h.align = 8, .v.align = 8) },
 };
 
+static const struct exynos_drm_ipp_formats rotator_s5pv210_formats[] = {
+	{ IPP_SRCDST_FORMAT(XRGB8888, rotator_s5pv210_rbg888_limits) },
+	{ IPP_SRCDST_FORMAT(NV12, rotator_s5pv210_yuv_limits) },
+};
+
 static const struct exynos_drm_ipp_formats rotator_4210_formats[] = {
 	{ IPP_SRCDST_FORMAT(XRGB8888, rotator_4210_rbg888_limits) },
 	{ IPP_SRCDST_FORMAT(NV12, rotator_4210_yuv_limits) },
@@ -397,6 +412,11 @@ static const struct exynos_drm_ipp_formats rotator_5250_formats[] = {
 	{ IPP_SRCDST_FORMAT(NV12, rotator_4412_yuv_limits) },
 };
 
+static const struct rot_variant rotator_s5pv210_data = {
+	.formats = rotator_s5pv210_formats,
+	.num_formats = ARRAY_SIZE(rotator_s5pv210_formats),
+};
+
 static const struct rot_variant rotator_4210_data = {
 	.formats = rotator_4210_formats,
 	.num_formats = ARRAY_SIZE(rotator_4210_formats),
@@ -414,6 +434,9 @@ static const struct rot_variant rotator_5250_data = {
 
 static const struct of_device_id exynos_rotator_match[] = {
 	{
+		.compatible = "samsung,s5pv210-rotator",
+		.data = &rotator_s5pv210_data,
+	}, {
 		.compatible = "samsung,exynos4210-rotator",
 		.data = &rotator_4210_data,
 	}, {
-- 
2.17.1


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

* [PATCH 2/3] dt-bindings: gpu: samsung-rotator: Document s5pv210 support
  2018-12-19 15:57 [PATCH 0/3] drm/exynos: rotator: Add support for s5pv210 Paweł Chmiel
  2018-12-19 15:57 ` [PATCH 1/3] " Paweł Chmiel
@ 2018-12-19 15:57 ` Paweł Chmiel
  2018-12-19 16:22   ` Krzysztof Kozlowski
  2018-12-19 15:57 ` [PATCH 3/3] ARM: dts: s5pv210: Add node for exynos-rotator Paweł Chmiel
  2 siblings, 1 reply; 8+ messages in thread
From: Paweł Chmiel @ 2018-12-19 15:57 UTC (permalink / raw)
  To: inki.dae, krzk, airlied
  Cc: jy0922.shim, sw0312.kim, kyungmin.park, kgene, dri-devel,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, robh+dt,
	mark.rutland, devicetree, Paweł Chmiel

This commit documents new compatible for s5pv210 soc,
which will be also supported by this driver.

Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
---
 Documentation/devicetree/bindings/gpu/samsung-rotator.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/gpu/samsung-rotator.txt b/Documentation/devicetree/bindings/gpu/samsung-rotator.txt
index 82cd1ed0be93..78658dec6941 100644
--- a/Documentation/devicetree/bindings/gpu/samsung-rotator.txt
+++ b/Documentation/devicetree/bindings/gpu/samsung-rotator.txt
@@ -5,6 +5,7 @@ Required properties:
 	(a) "samsung,exynos4210-rotator" for Rotator IP in Exynos4210
 	(b) "samsung,exynos4212-rotator" for Rotator IP in Exynos4212/4412
 	(c) "samsung,exynos5250-rotator" for Rotator IP in Exynos5250
+	(d) "samsung,s5pv210-rotator" for Rotator IP in S5PV210
 
   - reg : Physical base address of the IP registers and length of memory
 	  mapped region.
-- 
2.17.1


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

* [PATCH 3/3] ARM: dts: s5pv210: Add node for exynos-rotator
  2018-12-19 15:57 [PATCH 0/3] drm/exynos: rotator: Add support for s5pv210 Paweł Chmiel
  2018-12-19 15:57 ` [PATCH 1/3] " Paweł Chmiel
  2018-12-19 15:57 ` [PATCH 2/3] dt-bindings: gpu: samsung-rotator: Document s5pv210 support Paweł Chmiel
@ 2018-12-19 15:57 ` Paweł Chmiel
  2018-12-19 16:24   ` Krzysztof Kozlowski
  2 siblings, 1 reply; 8+ messages in thread
From: Paweł Chmiel @ 2018-12-19 15:57 UTC (permalink / raw)
  To: inki.dae, krzk, airlied
  Cc: jy0922.shim, sw0312.kim, kyungmin.park, kgene, dri-devel,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, robh+dt,
	mark.rutland, devicetree, Paweł Chmiel

This commit adds node for Exynos Rorator device,
so it can be used on all s5pv210 based devices.

Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
---
 arch/arm/boot/dts/s5pv210.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 75f454a210d6..a5463003c7f6 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -542,6 +542,15 @@
 			#dma-requests = <1>;
 		};
 
+		rotator: rotator@fa300000 {
+			compatible = "samsung,s5pv210-rotator";
+			reg = <0xfa300000 0x1000>;
+			interrupt-parent = <&vic2>;
+			interrupts = <4>;
+			clocks = <&clocks CLK_ROTATOR>;
+			clock-names = "rotator";
+		};
+
 		i2c1: i2c@fab00000 {
 			compatible = "samsung,s3c2440-i2c";
 			reg = <0xfab00000 0x1000>;
-- 
2.17.1


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

* Re: [PATCH 2/3] dt-bindings: gpu: samsung-rotator: Document s5pv210 support
  2018-12-19 15:57 ` [PATCH 2/3] dt-bindings: gpu: samsung-rotator: Document s5pv210 support Paweł Chmiel
@ 2018-12-19 16:22   ` Krzysztof Kozlowski
  2018-12-27 11:57     ` Paweł Chmiel
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2018-12-19 16:22 UTC (permalink / raw)
  To: Paweł Chmiel
  Cc: Inki Dae, airlied, jy0922.shim, Seung Woo Kim, kyungmin.park,
	kgene, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, robh+dt, mark.rutland, devicetree

On Wed, 19 Dec 2018 at 17:04, Paweł Chmiel
<pawel.mikolaj.chmiel@gmail.com> wrote:
>
> This commit documents new compatible for s5pv210 soc,
> which will be also supported by this driver.
>
> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> ---
>  Documentation/devicetree/bindings/gpu/samsung-rotator.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/gpu/samsung-rotator.txt b/Documentation/devicetree/bindings/gpu/samsung-rotator.txt
> index 82cd1ed0be93..78658dec6941 100644
> --- a/Documentation/devicetree/bindings/gpu/samsung-rotator.txt
> +++ b/Documentation/devicetree/bindings/gpu/samsung-rotator.txt
> @@ -5,6 +5,7 @@ Required properties:
>         (a) "samsung,exynos4210-rotator" for Rotator IP in Exynos4210
>         (b) "samsung,exynos4212-rotator" for Rotator IP in Exynos4212/4412
>         (c) "samsung,exynos5250-rotator" for Rotator IP in Exynos5250
> +       (d) "samsung,s5pv210-rotator" for Rotator IP in S5PV210

How about putting it at beginning as the oldest chipset? This would
require reordering the list so maybe let's remove the a/b/c list
enumerations? They are kind of useless.

Best regards,
Krzysztof

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

* Re: [PATCH 3/3] ARM: dts: s5pv210: Add node for exynos-rotator
  2018-12-19 15:57 ` [PATCH 3/3] ARM: dts: s5pv210: Add node for exynos-rotator Paweł Chmiel
@ 2018-12-19 16:24   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2018-12-19 16:24 UTC (permalink / raw)
  To: Paweł Chmiel
  Cc: Inki Dae, airlied, jy0922.shim, Seung Woo Kim, kyungmin.park,
	kgene, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, robh+dt, mark.rutland, devicetree

On Wed, 19 Dec 2018 at 17:04, Paweł Chmiel
<pawel.mikolaj.chmiel@gmail.com> wrote:
>
> This commit adds node for Exynos Rorator device,
> so it can be used on all s5pv210 based devices.
>
> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> ---
>  arch/arm/boot/dts/s5pv210.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)

Patch looks good but it is too close to merge window so I won't be
able to send it further. I'll pick it up for next cycle, after this
merge window.

Best regards,
Krzysztof

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

* Re: [PATCH 2/3] dt-bindings: gpu: samsung-rotator: Document s5pv210 support
  2018-12-19 16:22   ` Krzysztof Kozlowski
@ 2018-12-27 11:57     ` Paweł Chmiel
  0 siblings, 0 replies; 8+ messages in thread
From: Paweł Chmiel @ 2018-12-27 11:57 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Inki Dae, airlied, jy0922.shim, Seung Woo Kim, kyungmin.park,
	kgene, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, robh+dt, mark.rutland, devicetree

Dnia środa, 19 grudnia 2018 17:22:51 CET Krzysztof Kozlowski pisze:
> On Wed, 19 Dec 2018 at 17:04, Paweł Chmiel
> <pawel.mikolaj.chmiel@gmail.com> wrote:
> >
> > This commit documents new compatible for s5pv210 soc,
> > which will be also supported by this driver.
> >
> > Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> > ---
> >  Documentation/devicetree/bindings/gpu/samsung-rotator.txt | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/gpu/samsung-rotator.txt b/Documentation/devicetree/bindings/gpu/samsung-rotator.txt
> > index 82cd1ed0be93..78658dec6941 100644
> > --- a/Documentation/devicetree/bindings/gpu/samsung-rotator.txt
> > +++ b/Documentation/devicetree/bindings/gpu/samsung-rotator.txt
> > @@ -5,6 +5,7 @@ Required properties:
> >         (a) "samsung,exynos4210-rotator" for Rotator IP in Exynos4210
> >         (b) "samsung,exynos4212-rotator" for Rotator IP in Exynos4212/4412
> >         (c) "samsung,exynos5250-rotator" for Rotator IP in Exynos5250
> > +       (d) "samsung,s5pv210-rotator" for Rotator IP in S5PV210
> 
> How about putting it at beginning as the oldest chipset? This would
> require reordering the list so maybe let's remove the a/b/c list
> enumerations? They are kind of useless.
Ok, i'll send v2 of patchset with this change.
> 
> Best regards,
> Krzysztof





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

* Re: [PATCH 1/3] drm/exynos: rotator: Add support for s5pv210
  2018-12-19 15:57 ` [PATCH 1/3] " Paweł Chmiel
@ 2019-01-09  3:59   ` Inki Dae
  0 siblings, 0 replies; 8+ messages in thread
From: Inki Dae @ 2019-01-09  3:59 UTC (permalink / raw)
  To: Paweł Chmiel, krzk, airlied
  Cc: jy0922.shim, sw0312.kim, kyungmin.park, kgene, dri-devel,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, robh+dt,
	mark.rutland, devicetree



18. 12. 20. 오전 12:57에 Paweł Chmiel 이(가) 쓴 글:
> This commit adds support for s5pv210.
> Currently only NV12 and XRGB8888 formats are supported.
> It was tested by using tool from
> https://www.spinics.net/lists/linux-samsung-soc/msg60498.html
> 
> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Applied.

Thanks,
Inki Dae

> ---
>  drivers/gpu/drm/exynos/exynos_drm_rotator.c | 23 +++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
> index a820a68429b9..a822d340ccf6 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
> @@ -357,6 +357,11 @@ static int rotator_runtime_resume(struct device *dev)
>  }
>  #endif
>  
> +static const struct drm_exynos_ipp_limit rotator_s5pv210_rbg888_limits[] = {
> +	{ IPP_SIZE_LIMIT(BUFFER, .h = { 8, SZ_16K }, .v = { 8, SZ_16K }) },
> +	{ IPP_SIZE_LIMIT(AREA, .h.align = 2, .v.align = 2) },
> +};
> +
>  static const struct drm_exynos_ipp_limit rotator_4210_rbg888_limits[] = {
>  	{ IPP_SIZE_LIMIT(BUFFER, .h = { 8, SZ_16K }, .v = { 8, SZ_16K }) },
>  	{ IPP_SIZE_LIMIT(AREA, .h.align = 4, .v.align = 4) },
> @@ -372,6 +377,11 @@ static const struct drm_exynos_ipp_limit rotator_5250_rbg888_limits[] = {
>  	{ IPP_SIZE_LIMIT(AREA, .h.align = 2, .v.align = 2) },
>  };
>  
> +static const struct drm_exynos_ipp_limit rotator_s5pv210_yuv_limits[] = {
> +	{ IPP_SIZE_LIMIT(BUFFER, .h = { 32, SZ_64K }, .v = { 32, SZ_64K }) },
> +	{ IPP_SIZE_LIMIT(AREA, .h.align = 8, .v.align = 8) },
> +};
> +
>  static const struct drm_exynos_ipp_limit rotator_4210_yuv_limits[] = {
>  	{ IPP_SIZE_LIMIT(BUFFER, .h = { 32, SZ_64K }, .v = { 32, SZ_64K }) },
>  	{ IPP_SIZE_LIMIT(AREA, .h.align = 8, .v.align = 8) },
> @@ -382,6 +392,11 @@ static const struct drm_exynos_ipp_limit rotator_4412_yuv_limits[] = {
>  	{ IPP_SIZE_LIMIT(AREA, .h.align = 8, .v.align = 8) },
>  };
>  
> +static const struct exynos_drm_ipp_formats rotator_s5pv210_formats[] = {
> +	{ IPP_SRCDST_FORMAT(XRGB8888, rotator_s5pv210_rbg888_limits) },
> +	{ IPP_SRCDST_FORMAT(NV12, rotator_s5pv210_yuv_limits) },
> +};
> +
>  static const struct exynos_drm_ipp_formats rotator_4210_formats[] = {
>  	{ IPP_SRCDST_FORMAT(XRGB8888, rotator_4210_rbg888_limits) },
>  	{ IPP_SRCDST_FORMAT(NV12, rotator_4210_yuv_limits) },
> @@ -397,6 +412,11 @@ static const struct exynos_drm_ipp_formats rotator_5250_formats[] = {
>  	{ IPP_SRCDST_FORMAT(NV12, rotator_4412_yuv_limits) },
>  };
>  
> +static const struct rot_variant rotator_s5pv210_data = {
> +	.formats = rotator_s5pv210_formats,
> +	.num_formats = ARRAY_SIZE(rotator_s5pv210_formats),
> +};
> +
>  static const struct rot_variant rotator_4210_data = {
>  	.formats = rotator_4210_formats,
>  	.num_formats = ARRAY_SIZE(rotator_4210_formats),
> @@ -414,6 +434,9 @@ static const struct rot_variant rotator_5250_data = {
>  
>  static const struct of_device_id exynos_rotator_match[] = {
>  	{
> +		.compatible = "samsung,s5pv210-rotator",
> +		.data = &rotator_s5pv210_data,
> +	}, {
>  		.compatible = "samsung,exynos4210-rotator",
>  		.data = &rotator_4210_data,
>  	}, {
> 

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

end of thread, other threads:[~2019-01-09  3:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-19 15:57 [PATCH 0/3] drm/exynos: rotator: Add support for s5pv210 Paweł Chmiel
2018-12-19 15:57 ` [PATCH 1/3] " Paweł Chmiel
2019-01-09  3:59   ` Inki Dae
2018-12-19 15:57 ` [PATCH 2/3] dt-bindings: gpu: samsung-rotator: Document s5pv210 support Paweł Chmiel
2018-12-19 16:22   ` Krzysztof Kozlowski
2018-12-27 11:57     ` Paweł Chmiel
2018-12-19 15:57 ` [PATCH 3/3] ARM: dts: s5pv210: Add node for exynos-rotator Paweł Chmiel
2018-12-19 16:24   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).