Skip to contentSkip to conversation

Samsung S5P platform modification required for G2D driver

PATCH In review Kamil Debski 3 participants 6 messages Dec 27, 2011 – Dec 29, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Samsung S5P platform modification required for G2D driver

Hi,

This series of patches contains necessary platform modification required by the G2D driver. G2D is a 2D-graphics acceleration engine present in the S5PC110 and Exynos4 Samsung SoCs.

I have fixed the errors pointed out by Kukjin Kim an Sachin Kamat. (Thanks!) Also the patches have been rebased to the newest kgene/for-next branch.

Best wishes,
Kamil Debski

Kamil Debski (3):
s5p-g2d: add G2D to plat-s5p and mach-exynos4
s5p-g2d: add G2D to mach-nuri
s5p-g2d: add G2D to mach-universal

 arch/arm/mach-exynos/Kconfig               |    2 ++
 arch/arm/mach-exynos/include/mach/map.h    |    3 +++
 arch/arm/mach-exynos/mach-nuri.c           |    1 +
 arch/arm/mach-exynos/mach-universal_c210.c |    1 +
 arch/arm/plat-s5p/Kconfig                  |    5 +++++
 arch/arm/plat-samsung/devs.c               |   28 ++++++++++++++++++++++++++++
 arch/arm/plat-samsung/include/plat/devs.h  |    1 +
 7 files changed, 41 insertions(+), 0 deletions(-)
#1 lore raw

PATCH 1/3 s5p-g2d: add G2D to plat-s5p and mach-exynos4

G2D is a 2D graphics accelerator engine present in the s5p family of Samsung SoCs. It is capable of bitblt and raster operations on images having dimensions of up to 8000x8000.

---
 arch/arm/mach-exynos/include/mach/map.h   |    3 +++
 arch/arm/plat-s5p/Kconfig                 |    5 +++++
 arch/arm/plat-samsung/devs.c              |   28 ++++++++++++++++++++++++++++
 arch/arm/plat-samsung/include/plat/devs.h |    1 +
 4 files changed, 37 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/include/mach/map.h +3 -0
index af30b95..9b7e0a1 100644
@@ -31,6 +31,8 @@
 #define EXYNOS4_PA_FIMC2		0x11820000
 #define EXYNOS4_PA_FIMC3		0x11830000
 
+#define EXYNOS4_PA_G2D			0x12800000
+
 #define EXYNOS4_PA_I2S0			0x03830000
 #define EXYNOS4_PA_I2S1			0xE3100000
 #define EXYNOS4_PA_I2S2			0xE2A00000
@@ -165,6 +167,7 @@
 #define S5P_PA_FIMC1			EXYNOS4_PA_FIMC1
 #define S5P_PA_FIMC2			EXYNOS4_PA_FIMC2
 #define S5P_PA_FIMC3			EXYNOS4_PA_FIMC3
+#define S5P_PA_G2D			EXYNOS4_PA_G2D
 #define S5P_PA_FIMD0			EXYNOS4_PA_FIMD0
 #define S5P_PA_HDMI			EXYNOS4_PA_HDMI
 #define S5P_PA_IIC_HDMIPHY		EXYNOS4_PA_IIC_HDMIPHY
arch/arm/plat-s5p/Kconfig +5 -0
index 9b9968f..6cafb23 100644
@@ -79,6 +79,11 @@ config S5P_DEV_FIMC3
 	help
 	  Compile in platform device definitions for FIMC controller 3
 
+config S5P_DEV_G2D
+	bool
+	help
+	  Compile in platform device definitions for G2D device
+
 config S5P_DEV_FIMD0
 	bool
 	help
arch/arm/plat-samsung/devs.c +28 -0
index de0d88d..79db367 100644
@@ -266,6 +266,34 @@ struct platform_device s5p_device_fimc3 = {
 };
 #endif /* CONFIG_S5P_DEV_FIMC3 */
 
+/* G2D */
+
+#ifdef CONFIG_S5P_DEV_G2D
+static struct resource s5p_g2d_resource[] = {
+	[0] = {
+		.start	= S5P_PA_G2D,
+		.end	= S5P_PA_G2D + SZ_4K - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start	= IRQ_2D,
+		.end	= IRQ_2D,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+struct platform_device s5p_device_g2d = {
+	.name		= "s5p-g2d",
+	.id		= 0,
+	.num_resources	= ARRAY_SIZE(s5p_g2d_resource),
+	.resource	= s5p_g2d_resource,
+	.dev		= {
+		.dma_mask		= &samsung_device_dma_mask,
+		.coherent_dma_mask	= DMA_BIT_MASK(32),
+	},
+};
+#endif /* CONFIG_S5P_DEV_G2D */
+
 /* FIMD0 */
 
 #ifdef CONFIG_S5P_DEV_FIMD0
arch/arm/plat-samsung/include/plat/devs.h +1 -0
index 4214ea0..bb45848 100644
@@ -79,6 +79,7 @@ extern struct platform_device s5p_device_fimc1;
 extern struct platform_device s5p_device_fimc2;
 extern struct platform_device s5p_device_fimc3;
 extern struct platform_device s5p_device_fimc_md;
+extern struct platform_device s5p_device_g2d;
 extern struct platform_device s5p_device_fimd0;
 extern struct platform_device s5p_device_hdmi;
 extern struct platform_device s5p_device_i2c_hdmiphy;
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/3 s5p-g2d: add G2D to mach-nuri

In reply to Kamil Debski

G2D is a 2D graphics accelerator engine present in the s5p family of Samsung SoCs. It is capable of bitblt and raster operations on images having dimensions of up to 8000x8000.

---
 arch/arm/mach-exynos/Kconfig     |    1 +
 arch/arm/mach-exynos/mach-nuri.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/Kconfig +1 -0
index 4e36e8f..3bd0eec 100644
@@ -271,6 +271,7 @@ config MACH_NURI
 	select S5P_DEV_FIMC1
 	select S5P_DEV_FIMC2
 	select S5P_DEV_FIMC3
+	select S5P_DEV_G2D
 	select S5P_DEV_MFC
 	select S5P_DEV_USB_EHCI
 	select S5P_SETUP_MIPIPHY
arch/arm/mach-exynos/mach-nuri.c +1 -0
index 4df7d3e..3df8bf4 100644
@@ -1261,6 +1261,7 @@ static struct platform_device *nuri_devices[] __initdata = {
 	&s3c_device_i2c3,
 	&i2c9_gpio,
 	&s3c_device_adc,
+	&s5p_device_g2d,
 	&s3c_device_rtc,
 	&s5p_device_mfc,
 	&s5p_device_mfc_l,
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH 3/3 s5p-g2d: add G2D to mach-universal

In reply to Kamil Debski

G2D is a 2D graphics accelerator engine present in the s5p family of Samsung SoCs. It is capable of bitblt and raster operations on images having dimensions of up to 8000x8000.

---
 arch/arm/mach-exynos/Kconfig               |    1 +
 arch/arm/mach-exynos/mach-universal_c210.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/Kconfig +1 -0
index 3bd0eec..5261340 100644
@@ -228,6 +228,7 @@ config MACH_UNIVERSAL_C210
 	select S5P_DEV_FIMC1
 	select S5P_DEV_FIMC2
 	select S5P_DEV_FIMC3
+	select S5P_DEV_G2D
 	select S5P_DEV_CSIS0
 	select S5P_DEV_FIMD0
 	select S3C_DEV_HSMMC
arch/arm/mach-exynos/mach-universal_c210.c +1 -0
index 0a04cd6..c38e18d 100644
@@ -958,6 +958,7 @@ static struct platform_device *universal_devices[] __initdata = {
 	&s5p_device_fimc1,
 	&s5p_device_fimc2,
 	&s5p_device_fimc3,
+	&s5p_device_g2d,
 	&mmc0_fixed_voltage,
 	&s3c_device_hsmmc0,
 	&s3c_device_hsmmc2,
Signature · 1 line
1.7.0.4
#4 lore raw
In reply to Kamil Debski

Hi Kamil,

Your previous patch set has already been merged into [1]. Thus this has the G2D selected under SMDKV310 instead of NURI in the KConfig file.

[1] http://git.kernel.org/?p=linux/kernel/git/kgene/linux-samsung.git;a=shortlog;h=refs/heads/for-next

Regards
Sachin

Quoted 30 lines · Kamil Debski

Hi,

This series of patches contains necessary platform modification required by the
G2D driver. G2D is a 2D-graphics acceleration engine present in the S5PC110 and
Exynos4 Samsung SoCs.

I have fixed the errors pointed out by Kukjin Kim an Sachin Kamat. (Thanks!) Also the patches have been rebased to the newest kgene/for-next branch.

Best wishes,
Kamil Debski

Kamil Debski (3):
s5p-g2d: add G2D to plat-s5p and mach-exynos4
s5p-g2d: add G2D to mach-nuri
s5p-g2d: add G2D to mach-universal

 arch/arm/mach-exynos/Kconfig               |    2 ++
 arch/arm/mach-exynos/include/mach/map.h    |    3 +++
 arch/arm/mach-exynos/mach-nuri.c           |    1 +
 arch/arm/mach-exynos/mach-universal_c210.c |    1 +
 arch/arm/plat-s5p/Kconfig                  |    5 +++++
 arch/arm/plat-samsung/devs.c               |   28
++++++++++++++++++++++++++++
 arch/arm/plat-samsung/include/plat/devs.h  |    1 +
 7 files changed, 41 insertions(+), 0 deletions(-)
Signature · 2 lines
With warm regards,
Sachin
#5 lore raw
Quoted 11 lines · Sachin Kamat

Hi Kamil,

Your previous patch set has already been merged into [1]. Thus this has the G2D selected under SMDKV310 instead of NURI in the KConfig file.

[1] http://git.kernel.org/?p=linux/kernel/git/kgene/linux-
samsung.git;a=shortlog;h=refs/heads/for-next

Yes, I've applied Kamil's old patches just with fixing trailing spaces not fixing you pointed out.
I'm rebasing and will re-apply this series.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

Quoted 42 lines

Regards
Sachin

Quoted 3 lines · Kamil Debski

Hi,

This series of patches contains necessary platform modification required

by

Quoted 2 lines

the
G2D driver. G2D is a 2D-graphics acceleration engine present in the

S5PC110

Quoted 4 lines

and
Exynos4 Samsung SoCs.

I have fixed the errors pointed out by Kukjin Kim an Sachin Kamat.

(Thanks!)

Quoted 10 lines

Also the patches have been rebased to the newest kgene/for-next branch.

Best wishes,
Kamil Debski

Kamil Debski (3):
s5p-g2d: add G2D to plat-s5p and mach-exynos4
s5p-g2d: add G2D to mach-nuri
s5p-g2d: add G2D to mach-universal

Quoted 11 lines
 arch/arm/mach-exynos/Kconfig               |    2 ++
 arch/arm/mach-exynos/include/mach/map.h    |    3 +++
 arch/arm/mach-exynos/mach-nuri.c           |    1 +
 arch/arm/mach-exynos/mach-universal_c210.c |    1 +
 arch/arm/plat-s5p/Kconfig                  |    5 +++++
 arch/arm/plat-samsung/devs.c               |   28
++++++++++++++++++++++++++++
 arch/arm/plat-samsung/include/plat/devs.h  |    1 +
 7 files changed, 41 insertions(+), 0 deletions(-)

--
With warm regards,
Sachin