Add support for exynos5420 hdmi subsystem. It adds compatible strings for exynos5420 mixer and Changes the drivers as per IP modifications.
This set doesn't have changes for hdmiphy, which will posted independently.
This set is based on drm-next branch of Inki Dae's tree at http://git.kernel.org/cgit/linux/kernel/git/daeinki/drm-exynos.git.
Rahul Sharma (4): drm/exynos: rename compatible strings for hdmi subsystem drm/exynos: add support for exynos5420 mixer drm/exynos: fix interlace resolutions for exynos5420 ARM/dts: change compatible strings for hdmi subsystem
.../devicetree/bindings/video/exynos_hdmi.txt | 6 +- .../devicetree/bindings/video/exynos_hdmiddc.txt | 4 +- .../devicetree/bindings/video/exynos_hdmiphy.txt | 6 +- .../devicetree/bindings/video/exynos_mixer.txt | 7 ++- arch/arm/boot/dts/cros5250-common.dtsi | 4 +- arch/arm/boot/dts/exynos5250-smdk5250.dts | 4 +- arch/arm/boot/dts/exynos5250.dtsi | 4 +- drivers/gpu/drm/exynos/exynos_ddc.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 16 ++--- drivers/gpu/drm/exynos/exynos_hdmiphy.c | 4 +- drivers/gpu/drm/exynos/exynos_mixer.c | 61 ++++++++++++++------ drivers/gpu/drm/exynos/regs-mixer.h | 7 +++ 12 files changed, 84 insertions(+), 41 deletions(-)
This patch renames the combatible strings for hdmi, mixer, ddc and hdmiphy. It follows the convention of using compatible string which represent the SoC in which the IP was added for the first time.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com --- Documentation/devicetree/bindings/video/exynos_hdmi.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_hdmiddc.txt | 4 ++-- Documentation/devicetree/bindings/video/exynos_hdmiphy.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_mixer.txt | 7 +++++-- drivers/gpu/drm/exynos/exynos_ddc.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmiphy.c | 4 +++- drivers/gpu/drm/exynos/exynos_mixer.c | 12 ++++++------ 8 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 589edee..2ac01ca 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt @@ -1,7 +1,9 @@ Device-Tree bindings for drm hdmi driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmi". +- compatible: value should be one among the following: + 1) "samsung,exynos4210-hdmi" + 2) "samsung,exynos4212-hdmi" - reg: physical base address of the hdmi and length of memory mapped region. - interrupts: interrupt number to the cpu. @@ -15,7 +17,7 @@ Required properties: Example:
hdmi { - compatible = "samsung,exynos5-hdmi"; + compatible = "samsung,exynos4212-hdmi"; reg = <0x14530000 0x100000>; interrupts = <0 95 0>; hpd-gpio = <&gpx3 7 0xf 1 3>; diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt index fa166d9..c1bd2ea 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt @@ -1,12 +1,12 @@ Device-Tree bindings for hdmiddc driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmiddc". +- compatible: value should be "samsung,exynos4210-hdmiddc". - reg: I2C address of the hdmiddc device.
Example:
hdmiddc { - compatible = "samsung,exynos5-hdmiddc"; + compatible = "samsung,exynos4210-hdmiddc"; reg = <0x50>; }; diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt index 858f4f9..e59d793 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt @@ -1,12 +1,14 @@ Device-Tree bindings for hdmiphy driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmiphy". +- compatible: value should be + 1) "samsung,exynos4210-hdmiphy". + 2) "samsung,exynos4212-hdmiphy". - reg: I2C address of the hdmiphy device.
Example:
hdmiphy { - compatible = "samsung,exynos5-hdmiphy"; + compatible = "samsung,exynos4210-hdmiphy"; reg = <0x38>; }; diff --git a/Documentation/devicetree/bindings/video/exynos_mixer.txt b/Documentation/devicetree/bindings/video/exynos_mixer.txt index 9b2ea03..a8b063f 100644 --- a/Documentation/devicetree/bindings/video/exynos_mixer.txt +++ b/Documentation/devicetree/bindings/video/exynos_mixer.txt @@ -1,7 +1,10 @@ Device-Tree bindings for mixer driver
Required properties: -- compatible: value should be "samsung,exynos5-mixer". +- compatible: value should be: + 1) "samsung,exynos4210-mixer" + 2) "samsung,exynos5250-mixer" + - reg: physical base address of the mixer and length of memory mapped region. - interrupts: interrupt number to the cpu. @@ -9,7 +12,7 @@ Required properties: Example:
mixer { - compatible = "samsung,exynos5-mixer"; + compatible = "samsung,exynos5250-mixer"; reg = <0x14450000 0x10000>; interrupts = <0 94 0>; }; diff --git a/drivers/gpu/drm/exynos/exynos_ddc.c b/drivers/gpu/drm/exynos/exynos_ddc.c index 4e9b5ba..1a0cca1 100644 --- a/drivers/gpu/drm/exynos/exynos_ddc.c +++ b/drivers/gpu/drm/exynos/exynos_ddc.c @@ -51,7 +51,7 @@ static struct i2c_device_id ddc_idtable[] = { #ifdef CONFIG_OF static struct of_device_id hdmiddc_match_types[] = { { - .compatible = "samsung,exynos5-hdmiddc", + .compatible = "samsung,exynos4210-hdmiddc", }, { /* end node */ } diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 743059f..8752171 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1913,7 +1913,7 @@ static struct platform_device_id hdmi_driver_types[] = { #ifdef CONFIG_OF static struct of_device_id hdmi_match_types[] = { { - .compatible = "samsung,exynos5-hdmi", + .compatible = "samsung,exynos4212-hdmi", .data = (void *)HDMI_TYPE14, }, { /* end node */ diff --git a/drivers/gpu/drm/exynos/exynos_hdmiphy.c b/drivers/gpu/drm/exynos/exynos_hdmiphy.c index ea49d13..bf1718a 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmiphy.c +++ b/drivers/gpu/drm/exynos/exynos_hdmiphy.c @@ -49,7 +49,9 @@ static const struct i2c_device_id hdmiphy_id[] = { #ifdef CONFIG_OF static struct of_device_id hdmiphy_match_types[] = { { - .compatible = "samsung,exynos5-hdmiphy", + .compatible = "samsung,exynos4210-hdmiphy", + }, { + .compatible = "samsung,exynos4212-hdmiphy", }, { /* end node */ } diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index f36f878..2fe6d33 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -1115,12 +1115,12 @@ static int vp_resources_init(struct exynos_drm_hdmi_context *ctx, return 0; }
-static struct mixer_drv_data exynos5_mxr_drv_data = { +static struct mixer_drv_data exynos5250_mxr_drv_data = { .version = MXR_VER_16_0_33_0, .is_vp_enabled = 0, };
-static struct mixer_drv_data exynos4_mxr_drv_data = { +static struct mixer_drv_data exynos4210_mxr_drv_data = { .version = MXR_VER_0_0_0_16, .is_vp_enabled = 1, }; @@ -1128,10 +1128,10 @@ static struct mixer_drv_data exynos4_mxr_drv_data = { static struct platform_device_id mixer_driver_types[] = { { .name = "s5p-mixer", - .driver_data = (unsigned long)&exynos4_mxr_drv_data, + .driver_data = (unsigned long)&exynos4210_mxr_drv_data, }, { .name = "exynos5-mixer", - .driver_data = (unsigned long)&exynos5_mxr_drv_data, + .driver_data = (unsigned long)&exynos5250_mxr_drv_data, }, { /* end node */ } @@ -1139,8 +1139,8 @@ static struct platform_device_id mixer_driver_types[] = {
static struct of_device_id mixer_match_types[] = { { - .compatible = "samsung,exynos5-mixer", - .data = &exynos5_mxr_drv_data, + .compatible = "samsung,exynos5250-mixer", + .data = &exynos5250_mxr_drv_data, }, { /* end node */ }
Hi Rahul,
It looks good, at least, to me.
Best Regards, - Seung-Woo Kim
On 2013년 06월 18일 21:49, Rahul Sharma wrote:
This patch renames the combatible strings for hdmi, mixer, ddc and hdmiphy. It follows the convention of using compatible string which represent the SoC in which the IP was added for the first time.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
Documentation/devicetree/bindings/video/exynos_hdmi.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_hdmiddc.txt | 4 ++-- Documentation/devicetree/bindings/video/exynos_hdmiphy.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_mixer.txt | 7 +++++-- drivers/gpu/drm/exynos/exynos_ddc.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmiphy.c | 4 +++- drivers/gpu/drm/exynos/exynos_mixer.c | 12 ++++++------ 8 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 589edee..2ac01ca 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt @@ -1,7 +1,9 @@ Device-Tree bindings for drm hdmi driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmi". +- compatible: value should be one among the following:
- "samsung,exynos4210-hdmi"
- "samsung,exynos4212-hdmi"
- reg: physical base address of the hdmi and length of memory mapped region.
- interrupts: interrupt number to the cpu.
@@ -15,7 +17,7 @@ Required properties: Example:
hdmi {
compatible = "samsung,exynos5-hdmi";
reg = <0x14530000 0x100000>; interrupts = <0 95 0>; hpd-gpio = <&gpx3 7 0xf 1 3>;compatible = "samsung,exynos4212-hdmi";
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt index fa166d9..c1bd2ea 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt @@ -1,12 +1,12 @@ Device-Tree bindings for hdmiddc driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmiddc". +- compatible: value should be "samsung,exynos4210-hdmiddc".
- reg: I2C address of the hdmiddc device.
Example:
hdmiddc {
compatible = "samsung,exynos5-hdmiddc";
reg = <0x50>; };compatible = "samsung,exynos4210-hdmiddc";
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt index 858f4f9..e59d793 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt @@ -1,12 +1,14 @@ Device-Tree bindings for hdmiphy driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmiphy". +- compatible: value should be
- "samsung,exynos4210-hdmiphy".
- "samsung,exynos4212-hdmiphy".
- reg: I2C address of the hdmiphy device.
Example:
hdmiphy {
compatible = "samsung,exynos5-hdmiphy";
reg = <0x38>; };compatible = "samsung,exynos4210-hdmiphy";
diff --git a/Documentation/devicetree/bindings/video/exynos_mixer.txt b/Documentation/devicetree/bindings/video/exynos_mixer.txt index 9b2ea03..a8b063f 100644 --- a/Documentation/devicetree/bindings/video/exynos_mixer.txt +++ b/Documentation/devicetree/bindings/video/exynos_mixer.txt @@ -1,7 +1,10 @@ Device-Tree bindings for mixer driver
Required properties: -- compatible: value should be "samsung,exynos5-mixer". +- compatible: value should be:
- "samsung,exynos4210-mixer"
- "samsung,exynos5250-mixer"
- reg: physical base address of the mixer and length of memory mapped region.
- interrupts: interrupt number to the cpu.
@@ -9,7 +12,7 @@ Required properties: Example:
mixer {
compatible = "samsung,exynos5-mixer";
reg = <0x14450000 0x10000>; interrupts = <0 94 0>; };compatible = "samsung,exynos5250-mixer";
diff --git a/drivers/gpu/drm/exynos/exynos_ddc.c b/drivers/gpu/drm/exynos/exynos_ddc.c index 4e9b5ba..1a0cca1 100644 --- a/drivers/gpu/drm/exynos/exynos_ddc.c +++ b/drivers/gpu/drm/exynos/exynos_ddc.c @@ -51,7 +51,7 @@ static struct i2c_device_id ddc_idtable[] = { #ifdef CONFIG_OF static struct of_device_id hdmiddc_match_types[] = { {
.compatible = "samsung,exynos5-hdmiddc",
}, { /* end node */ }.compatible = "samsung,exynos4210-hdmiddc",
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 743059f..8752171 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1913,7 +1913,7 @@ static struct platform_device_id hdmi_driver_types[] = { #ifdef CONFIG_OF static struct of_device_id hdmi_match_types[] = { {
.compatible = "samsung,exynos5-hdmi",
.data = (void *)HDMI_TYPE14, }, { /* end node */.compatible = "samsung,exynos4212-hdmi",
diff --git a/drivers/gpu/drm/exynos/exynos_hdmiphy.c b/drivers/gpu/drm/exynos/exynos_hdmiphy.c index ea49d13..bf1718a 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmiphy.c +++ b/drivers/gpu/drm/exynos/exynos_hdmiphy.c @@ -49,7 +49,9 @@ static const struct i2c_device_id hdmiphy_id[] = { #ifdef CONFIG_OF static struct of_device_id hdmiphy_match_types[] = { {
.compatible = "samsung,exynos5-hdmiphy",
.compatible = "samsung,exynos4210-hdmiphy",
- }, {
}, { /* end node */ }.compatible = "samsung,exynos4212-hdmiphy",
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index f36f878..2fe6d33 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -1115,12 +1115,12 @@ static int vp_resources_init(struct exynos_drm_hdmi_context *ctx, return 0; }
-static struct mixer_drv_data exynos5_mxr_drv_data = { +static struct mixer_drv_data exynos5250_mxr_drv_data = { .version = MXR_VER_16_0_33_0, .is_vp_enabled = 0, };
-static struct mixer_drv_data exynos4_mxr_drv_data = { +static struct mixer_drv_data exynos4210_mxr_drv_data = { .version = MXR_VER_0_0_0_16, .is_vp_enabled = 1, }; @@ -1128,10 +1128,10 @@ static struct mixer_drv_data exynos4_mxr_drv_data = { static struct platform_device_id mixer_driver_types[] = { { .name = "s5p-mixer",
.driver_data = (unsigned long)&exynos4_mxr_drv_data,
}, { .name = "exynos5-mixer",.driver_data = (unsigned long)&exynos4210_mxr_drv_data,
.driver_data = (unsigned long)&exynos5_mxr_drv_data,
}, { /* end node */ }.driver_data = (unsigned long)&exynos5250_mxr_drv_data,
@@ -1139,8 +1139,8 @@ static struct platform_device_id mixer_driver_types[] = {
static struct of_device_id mixer_match_types[] = { {
.compatible = "samsung,exynos5-mixer",
.data = &exynos5_mxr_drv_data,
.compatible = "samsung,exynos5250-mixer",
}, { /* end node */ }.data = &exynos5250_mxr_drv_data,
-----Original Message----- From: Rahul Sharma [mailto:rahul.sharma@samsung.com] Sent: Tuesday, June 18, 2013 9:50 PM To: linux-samsung-soc@vger.kernel.org;
devicetree-discuss@lists.ozlabs.org;
dri-devel@lists.freedesktop.org Cc: kgene.kim@samsung.com; sw0312.kim@samsung.com; inki.dae@samsung.com; joshi@samsung.com; r.sh.open@gmail.com; Rahul Sharma Subject: [PATCH 1/4] drm/exynos: rename compatible strings for hdmi subsystem
This patch renames the combatible strings for hdmi, mixer, ddc and hdmiphy. It follows the convention of using compatible string which represent the SoC in which the IP was added for the first time.
Hi Rahul,
Could you separate this patch into two patches, driver side and document side, and the below patch also? [PATCH v2 2/4] drm/exynos: add support for exynos5420 mixer
Thanks, Inki Dae
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
Documentation/devicetree/bindings/video/exynos_hdmi.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_hdmiddc.txt | 4 ++-- Documentation/devicetree/bindings/video/exynos_hdmiphy.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_mixer.txt | 7 +++++-- drivers/gpu/drm/exynos/exynos_ddc.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmiphy.c | 4 +++- drivers/gpu/drm/exynos/exynos_mixer.c | 12
++++++------
8 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 589edee..2ac01ca 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt @@ -1,7 +1,9 @@ Device-Tree bindings for drm hdmi driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmi". +- compatible: value should be one among the following:
- "samsung,exynos4210-hdmi"
- "samsung,exynos4212-hdmi"
- reg: physical base address of the hdmi and length of memory mapped region.
- interrupts: interrupt number to the cpu.
@@ -15,7 +17,7 @@ Required properties: Example:
hdmi {
compatible = "samsung,exynos5-hdmi";
reg = <0x14530000 0x100000>; interrupts = <0 95 0>; hpd-gpio = <&gpx3 7 0xf 1 3>;compatible = "samsung,exynos4212-hdmi";
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt index fa166d9..c1bd2ea 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt @@ -1,12 +1,12 @@ Device-Tree bindings for hdmiddc driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmiddc". +- compatible: value should be "samsung,exynos4210-hdmiddc".
- reg: I2C address of the hdmiddc device.
Example:
hdmiddc {
compatible = "samsung,exynos5-hdmiddc";
reg = <0x50>; };compatible = "samsung,exynos4210-hdmiddc";
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt index 858f4f9..e59d793 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt @@ -1,12 +1,14 @@ Device-Tree bindings for hdmiphy driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmiphy". +- compatible: value should be
- "samsung,exynos4210-hdmiphy".
- "samsung,exynos4212-hdmiphy".
- reg: I2C address of the hdmiphy device.
Example:
hdmiphy {
compatible = "samsung,exynos5-hdmiphy";
reg = <0x38>; };compatible = "samsung,exynos4210-hdmiphy";
diff --git a/Documentation/devicetree/bindings/video/exynos_mixer.txt b/Documentation/devicetree/bindings/video/exynos_mixer.txt index 9b2ea03..a8b063f 100644 --- a/Documentation/devicetree/bindings/video/exynos_mixer.txt +++ b/Documentation/devicetree/bindings/video/exynos_mixer.txt @@ -1,7 +1,10 @@ Device-Tree bindings for mixer driver
Required properties: -- compatible: value should be "samsung,exynos5-mixer". +- compatible: value should be:
- "samsung,exynos4210-mixer"
- "samsung,exynos5250-mixer"
- reg: physical base address of the mixer and length of memory mapped region.
- interrupts: interrupt number to the cpu.
@@ -9,7 +12,7 @@ Required properties: Example:
mixer {
compatible = "samsung,exynos5-mixer";
reg = <0x14450000 0x10000>; interrupts = <0 94 0>; };compatible = "samsung,exynos5250-mixer";
diff --git a/drivers/gpu/drm/exynos/exynos_ddc.c b/drivers/gpu/drm/exynos/exynos_ddc.c index 4e9b5ba..1a0cca1 100644 --- a/drivers/gpu/drm/exynos/exynos_ddc.c +++ b/drivers/gpu/drm/exynos/exynos_ddc.c @@ -51,7 +51,7 @@ static struct i2c_device_id ddc_idtable[] = { #ifdef CONFIG_OF static struct of_device_id hdmiddc_match_types[] = { {
.compatible = "samsung,exynos5-hdmiddc",
}, { /* end node */ }.compatible = "samsung,exynos4210-hdmiddc",
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 743059f..8752171 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1913,7 +1913,7 @@ static struct platform_device_id hdmi_driver_types[] = { #ifdef CONFIG_OF static struct of_device_id hdmi_match_types[] = { {
.compatible = "samsung,exynos5-hdmi",
.data = (void *)HDMI_TYPE14, }, { /* end node */.compatible = "samsung,exynos4212-hdmi",
diff --git a/drivers/gpu/drm/exynos/exynos_hdmiphy.c b/drivers/gpu/drm/exynos/exynos_hdmiphy.c index ea49d13..bf1718a 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmiphy.c +++ b/drivers/gpu/drm/exynos/exynos_hdmiphy.c @@ -49,7 +49,9 @@ static const struct i2c_device_id hdmiphy_id[] = { #ifdef CONFIG_OF static struct of_device_id hdmiphy_match_types[] = { {
.compatible = "samsung,exynos5-hdmiphy",
.compatible = "samsung,exynos4210-hdmiphy",
- }, {
}, { /* end node */ }.compatible = "samsung,exynos4212-hdmiphy",
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index f36f878..2fe6d33 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -1115,12 +1115,12 @@ static int vp_resources_init(struct exynos_drm_hdmi_context *ctx, return 0; }
-static struct mixer_drv_data exynos5_mxr_drv_data = { +static struct mixer_drv_data exynos5250_mxr_drv_data = { .version = MXR_VER_16_0_33_0, .is_vp_enabled = 0, };
-static struct mixer_drv_data exynos4_mxr_drv_data = { +static struct mixer_drv_data exynos4210_mxr_drv_data = { .version = MXR_VER_0_0_0_16, .is_vp_enabled = 1, }; @@ -1128,10 +1128,10 @@ static struct mixer_drv_data exynos4_mxr_drv_data = { static struct platform_device_id mixer_driver_types[] = { { .name = "s5p-mixer",
.driver_data = (unsigned long)&exynos4_mxr_drv_data,
}, { .name = "exynos5-mixer",.driver_data = (unsigned long)&exynos4210_mxr_drv_data,
.driver_data = (unsigned long)&exynos5_mxr_drv_data,
}, { /* end node */ }.driver_data = (unsigned long)&exynos5250_mxr_drv_data,
@@ -1139,8 +1139,8 @@ static struct platform_device_id
mixer_driver_types[]
= {
static struct of_device_id mixer_match_types[] = { {
.compatible = "samsung,exynos5-mixer",
.data = &exynos5_mxr_drv_data,
.compatible = "samsung,exynos5250-mixer",
}, { /* end node */ }.data = &exynos5250_mxr_drv_data,
-- 1.7.10.4
-----Original Message----- From: Inki Dae [mailto:inki.dae@samsung.com] Sent: Wednesday, June 19, 2013 4:06 PM To: 'Rahul Sharma'; 'linux-samsung-soc@vger.kernel.org'; 'devicetree- discuss@lists.ozlabs.org'; 'dri-devel@lists.freedesktop.org' Cc: 'kgene.kim@samsung.com'; 'sw0312.kim@samsung.com';
'joshi@samsung.com';
'r.sh.open@gmail.com' Subject: RE: [PATCH 1/4] drm/exynos: rename compatible strings for hdmi subsystem
-----Original Message----- From: Rahul Sharma [mailto:rahul.sharma@samsung.com] Sent: Tuesday, June 18, 2013 9:50 PM To: linux-samsung-soc@vger.kernel.org; devicetree-
discuss@lists.ozlabs.org;
dri-devel@lists.freedesktop.org Cc: kgene.kim@samsung.com; sw0312.kim@samsung.com; inki.dae@samsung.com; joshi@samsung.com; r.sh.open@gmail.com; Rahul Sharma Subject: [PATCH 1/4] drm/exynos: rename compatible strings for hdmi subsystem
This patch renames the combatible strings for hdmi, mixer, ddc and hdmiphy. It follows the convention of using compatible string which represent the SoC in which the IP was added for the first time.
Hi Rahul,
Could you separate this patch into two patches, driver side and document side, and the below patch also? [PATCH v2 2/4] drm/exynos: add support for exynos5420 mixer
Sorry, just will merge them.
To devicetree maintainers, please give me ACK.
Thanks, Inki Dae
Thanks, Inki Dae
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
Documentation/devicetree/bindings/video/exynos_hdmi.txt | 6
++++--
Documentation/devicetree/bindings/video/exynos_hdmiddc.txt | 4 ++-- Documentation/devicetree/bindings/video/exynos_hdmiphy.txt | 6
++++--
Documentation/devicetree/bindings/video/exynos_mixer.txt | 7
+++++--
drivers/gpu/drm/exynos/exynos_ddc.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmiphy.c | 4 +++- drivers/gpu/drm/exynos/exynos_mixer.c | 12
++++++-----
8 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 589edee..2ac01ca 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt @@ -1,7 +1,9 @@ Device-Tree bindings for drm hdmi driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmi". +- compatible: value should be one among the following:
- "samsung,exynos4210-hdmi"
- "samsung,exynos4212-hdmi"
- reg: physical base address of the hdmi and length of memory mapped region.
- interrupts: interrupt number to the cpu.
@@ -15,7 +17,7 @@ Required properties: Example:
hdmi {
compatible = "samsung,exynos5-hdmi";
reg = <0x14530000 0x100000>; interrupts = <0 95 0>; hpd-gpio = <&gpx3 7 0xf 1 3>;compatible = "samsung,exynos4212-hdmi";
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt index fa166d9..c1bd2ea 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt @@ -1,12 +1,12 @@ Device-Tree bindings for hdmiddc driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmiddc". +- compatible: value should be "samsung,exynos4210-hdmiddc".
- reg: I2C address of the hdmiddc device.
Example:
hdmiddc {
compatible = "samsung,exynos5-hdmiddc";
reg = <0x50>; };compatible = "samsung,exynos4210-hdmiddc";
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt index 858f4f9..e59d793 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt @@ -1,12 +1,14 @@ Device-Tree bindings for hdmiphy driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmiphy". +- compatible: value should be
- "samsung,exynos4210-hdmiphy".
- "samsung,exynos4212-hdmiphy".
- reg: I2C address of the hdmiphy device.
Example:
hdmiphy {
compatible = "samsung,exynos5-hdmiphy";
reg = <0x38>; };compatible = "samsung,exynos4210-hdmiphy";
diff --git a/Documentation/devicetree/bindings/video/exynos_mixer.txt b/Documentation/devicetree/bindings/video/exynos_mixer.txt index 9b2ea03..a8b063f 100644 --- a/Documentation/devicetree/bindings/video/exynos_mixer.txt +++ b/Documentation/devicetree/bindings/video/exynos_mixer.txt @@ -1,7 +1,10 @@ Device-Tree bindings for mixer driver
Required properties: -- compatible: value should be "samsung,exynos5-mixer". +- compatible: value should be:
- "samsung,exynos4210-mixer"
- "samsung,exynos5250-mixer"
- reg: physical base address of the mixer and length of memory mapped region.
- interrupts: interrupt number to the cpu.
@@ -9,7 +12,7 @@ Required properties: Example:
mixer {
compatible = "samsung,exynos5-mixer";
reg = <0x14450000 0x10000>; interrupts = <0 94 0>; };compatible = "samsung,exynos5250-mixer";
diff --git a/drivers/gpu/drm/exynos/exynos_ddc.c b/drivers/gpu/drm/exynos/exynos_ddc.c index 4e9b5ba..1a0cca1 100644 --- a/drivers/gpu/drm/exynos/exynos_ddc.c +++ b/drivers/gpu/drm/exynos/exynos_ddc.c @@ -51,7 +51,7 @@ static struct i2c_device_id ddc_idtable[] = { #ifdef CONFIG_OF static struct of_device_id hdmiddc_match_types[] = { {
.compatible = "samsung,exynos5-hdmiddc",
}, { /* end node */ }.compatible = "samsung,exynos4210-hdmiddc",
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 743059f..8752171 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1913,7 +1913,7 @@ static struct platform_device_id
hdmi_driver_types[]
= { #ifdef CONFIG_OF static struct of_device_id hdmi_match_types[] = { {
.compatible = "samsung,exynos5-hdmi",
.data = (void *)HDMI_TYPE14, }, { /* end node */.compatible = "samsung,exynos4212-hdmi",
diff --git a/drivers/gpu/drm/exynos/exynos_hdmiphy.c b/drivers/gpu/drm/exynos/exynos_hdmiphy.c index ea49d13..bf1718a 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmiphy.c +++ b/drivers/gpu/drm/exynos/exynos_hdmiphy.c @@ -49,7 +49,9 @@ static const struct i2c_device_id hdmiphy_id[] = { #ifdef CONFIG_OF static struct of_device_id hdmiphy_match_types[] = { {
.compatible = "samsung,exynos5-hdmiphy",
.compatible = "samsung,exynos4210-hdmiphy",
- }, {
}, { /* end node */ }.compatible = "samsung,exynos4212-hdmiphy",
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index f36f878..2fe6d33 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -1115,12 +1115,12 @@ static int vp_resources_init(struct exynos_drm_hdmi_context *ctx, return 0; }
-static struct mixer_drv_data exynos5_mxr_drv_data = { +static struct mixer_drv_data exynos5250_mxr_drv_data = { .version = MXR_VER_16_0_33_0, .is_vp_enabled = 0, };
-static struct mixer_drv_data exynos4_mxr_drv_data = { +static struct mixer_drv_data exynos4210_mxr_drv_data = { .version = MXR_VER_0_0_0_16, .is_vp_enabled = 1, }; @@ -1128,10 +1128,10 @@ static struct mixer_drv_data
exynos4_mxr_drv_data
= { static struct platform_device_id mixer_driver_types[] = { { .name = "s5p-mixer",
.driver_data = (unsigned long)&exynos4_mxr_drv_data,
}, { .name = "exynos5-mixer",.driver_data = (unsigned long)&exynos4210_mxr_drv_data,
.driver_data = (unsigned long)&exynos5_mxr_drv_data,
}, { /* end node */ }.driver_data = (unsigned long)&exynos5250_mxr_drv_data,
@@ -1139,8 +1139,8 @@ static struct platform_device_id
mixer_driver_types[]
= {
static struct of_device_id mixer_match_types[] = { {
.compatible = "samsung,exynos5-mixer",
.data = &exynos5_mxr_drv_data,
.compatible = "samsung,exynos5250-mixer",
}, { /* end node */ }.data = &exynos5250_mxr_drv_data,
-- 1.7.10.4
Hi Rahul,
On Tuesday 18 of June 2013 18:19:35 Rahul Sharma wrote:
This patch renames the combatible strings for hdmi, mixer, ddc and hdmiphy. It follows the convention of using compatible string which represent the SoC in which the IP was added for the first time.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
Documentation/devicetree/bindings/video/exynos_hdmi.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_hdmiddc.txt | 4 ++-- Documentation/devicetree/bindings/video/exynos_hdmiphy.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_mixer.txt | 7 +++++-- drivers/gpu/drm/exynos/exynos_ddc.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmiphy.c | 4 +++- drivers/gpu/drm/exynos/exynos_mixer.c | 12 ++++++------ 8 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 589edee..2ac01ca 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt @@ -1,7 +1,9 @@ Device-Tree bindings for drm hdmi driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmi". +- compatible: value should be one among the following:
- "samsung,exynos4210-hdmi"
- "samsung,exynos4212-hdmi"
- reg: physical base address of the hdmi and length of memory mapped region.
- interrupts: interrupt number to the cpu.
@@ -15,7 +17,7 @@ Required properties: Example:
hdmi {
compatible = "samsung,exynos5-hdmi";
compatible = "samsung,exynos4212-hdmi";
Sorry, but it's a NAK from me.
DeviceTree bindings are considered an ABI. This is to allow older dtbs to work with new kernels.
If you just change the binding this way, you break all the existing users of this compatible value.
In addition you are doing it in a way that breaks bisection: - patch 1/4 breaks existing in-tree users of current compatible values, - after patch 2 and 3 it is still broken, - and eventually all in-tree users are fixed by patch 4 (but you can't fix out-of-tree users).
Please do it without changing existing compatible values. Even if they are misleading, this is all can be described in the documentation - just list SoCs that can be used with each compatible value there.
Best regards, Tomasz
reg = <0x14530000 0x100000>; interrupts = <0 95 0>; hpd-gpio = <&gpx3 7 0xf 1 3>;
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt index fa166d9..c1bd2ea 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt @@ -1,12 +1,12 @@ Device-Tree bindings for hdmiddc driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmiddc". +- compatible: value should be "samsung,exynos4210-hdmiddc".
- reg: I2C address of the hdmiddc device.
Example:
hdmiddc {
compatible = "samsung,exynos5-hdmiddc";
reg = <0x50>; };compatible = "samsung,exynos4210-hdmiddc";
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt index 858f4f9..e59d793 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt @@ -1,12 +1,14 @@ Device-Tree bindings for hdmiphy driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmiphy". +- compatible: value should be
- "samsung,exynos4210-hdmiphy".
- "samsung,exynos4212-hdmiphy".
- reg: I2C address of the hdmiphy device.
Example:
hdmiphy {
compatible = "samsung,exynos5-hdmiphy";
reg = <0x38>; };compatible = "samsung,exynos4210-hdmiphy";
diff --git a/Documentation/devicetree/bindings/video/exynos_mixer.txt b/Documentation/devicetree/bindings/video/exynos_mixer.txt index 9b2ea03..a8b063f 100644 --- a/Documentation/devicetree/bindings/video/exynos_mixer.txt +++ b/Documentation/devicetree/bindings/video/exynos_mixer.txt @@ -1,7 +1,10 @@ Device-Tree bindings for mixer driver
Required properties: -- compatible: value should be "samsung,exynos5-mixer". +- compatible: value should be:
- "samsung,exynos4210-mixer"
- "samsung,exynos5250-mixer"
- reg: physical base address of the mixer and length of memory mapped region.
- interrupts: interrupt number to the cpu.
@@ -9,7 +12,7 @@ Required properties: Example:
mixer {
compatible = "samsung,exynos5-mixer";
reg = <0x14450000 0x10000>; interrupts = <0 94 0>; };compatible = "samsung,exynos5250-mixer";
diff --git a/drivers/gpu/drm/exynos/exynos_ddc.c b/drivers/gpu/drm/exynos/exynos_ddc.c index 4e9b5ba..1a0cca1 100644 --- a/drivers/gpu/drm/exynos/exynos_ddc.c +++ b/drivers/gpu/drm/exynos/exynos_ddc.c @@ -51,7 +51,7 @@ static struct i2c_device_id ddc_idtable[] = { #ifdef CONFIG_OF static struct of_device_id hdmiddc_match_types[] = { {
.compatible = "samsung,exynos5-hdmiddc",
}, { /* end node */ }.compatible = "samsung,exynos4210-hdmiddc",
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 743059f..8752171 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1913,7 +1913,7 @@ static struct platform_device_id hdmi_driver_types[] = { #ifdef CONFIG_OF static struct of_device_id hdmi_match_types[] = { {
.compatible = "samsung,exynos5-hdmi",
.data = (void *)HDMI_TYPE14, }, { /* end node */.compatible = "samsung,exynos4212-hdmi",
diff --git a/drivers/gpu/drm/exynos/exynos_hdmiphy.c b/drivers/gpu/drm/exynos/exynos_hdmiphy.c index ea49d13..bf1718a 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmiphy.c +++ b/drivers/gpu/drm/exynos/exynos_hdmiphy.c @@ -49,7 +49,9 @@ static const struct i2c_device_id hdmiphy_id[] = { #ifdef CONFIG_OF static struct of_device_id hdmiphy_match_types[] = { {
.compatible = "samsung,exynos5-hdmiphy",
.compatible = "samsung,exynos4210-hdmiphy",
- }, {
}, { /* end node */ }.compatible = "samsung,exynos4212-hdmiphy",
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index f36f878..2fe6d33 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -1115,12 +1115,12 @@ static int vp_resources_init(struct exynos_drm_hdmi_context *ctx, return 0; }
-static struct mixer_drv_data exynos5_mxr_drv_data = { +static struct mixer_drv_data exynos5250_mxr_drv_data = { .version = MXR_VER_16_0_33_0, .is_vp_enabled = 0, };
-static struct mixer_drv_data exynos4_mxr_drv_data = { +static struct mixer_drv_data exynos4210_mxr_drv_data = { .version = MXR_VER_0_0_0_16, .is_vp_enabled = 1, }; @@ -1128,10 +1128,10 @@ static struct mixer_drv_data exynos4_mxr_drv_data = { static struct platform_device_id mixer_driver_types[] = { { .name = "s5p-mixer",
.driver_data = (unsigned long)&exynos4_mxr_drv_data,
}, { .name = "exynos5-mixer",.driver_data = (unsigned long)&exynos4210_mxr_drv_data,
.driver_data = (unsigned long)&exynos5_mxr_drv_data,
}, { /* end node */ }.driver_data = (unsigned long)&exynos5250_mxr_drv_data,
@@ -1139,8 +1139,8 @@ static struct platform_device_id mixer_driver_types[] = {
static struct of_device_id mixer_match_types[] = { {
.compatible = "samsung,exynos5-mixer",
.data = &exynos5_mxr_drv_data,
.compatible = "samsung,exynos5250-mixer",
}, { /* end node */ }.data = &exynos5250_mxr_drv_data,
Am Mittwoch, den 19.06.2013, 09:52 +0200 schrieb Tomasz Figa:
Hi Rahul,
On Tuesday 18 of June 2013 18:19:35 Rahul Sharma wrote:
This patch renames the combatible strings for hdmi, mixer, ddc and hdmiphy. It follows the convention of using compatible string which represent the SoC in which the IP was added for the first time.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
Documentation/devicetree/bindings/video/exynos_hdmi.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_hdmiddc.txt | 4 ++-- Documentation/devicetree/bindings/video/exynos_hdmiphy.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_mixer.txt | 7 +++++-- drivers/gpu/drm/exynos/exynos_ddc.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmiphy.c | 4 +++- drivers/gpu/drm/exynos/exynos_mixer.c | 12 ++++++------ 8 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 589edee..2ac01ca 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt @@ -1,7 +1,9 @@ Device-Tree bindings for drm hdmi driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmi". +- compatible: value should be one among the following:
- "samsung,exynos4210-hdmi"
- "samsung,exynos4212-hdmi"
- reg: physical base address of the hdmi and length of memory mapped region.
- interrupts: interrupt number to the cpu.
@@ -15,7 +17,7 @@ Required properties: Example:
hdmi {
compatible = "samsung,exynos5-hdmi";
compatible = "samsung,exynos4212-hdmi";
Sorry, but it's a NAK from me.
DeviceTree bindings are considered an ABI. This is to allow older dtbs to work with new kernels.
If you just change the binding this way, you break all the existing users of this compatible value.
In addition you are doing it in a way that breaks bisection:
- patch 1/4 breaks existing in-tree users of current compatible values,
- after patch 2 and 3 it is still broken,
- and eventually all in-tree users are fixed by patch 4 (but you can't
fix out-of-tree users).
Please do it without changing existing compatible values. Even if they are misleading, this is all can be described in the documentation - just list SoCs that can be used with each compatible value there.
Or you could just introduce the new compatible value and make all in-tree users use this, but keep the old values around and still accept them in the drivers. This way you get the goodness of the cleaner new symbols without breaking existing users. Just mark the old values as deprecated in the documentation, so no new devicetree usees them.
Regards, Lucas
-----Original Message----- From: dri-devel-bounces+inki.dae=samsung.com@lists.freedesktop.org [mailto:dri-devel-bounces+inki.dae=samsung.com@lists.freedesktop.org] On Behalf Of Lucas Stach Sent: Wednesday, June 19, 2013 4:59 PM To: Tomasz Figa Cc: kgene.kim@samsung.com; devicetree-discuss@lists.ozlabs.org; sw0312.kim@samsung.com; joshi@samsung.com;
dri-devel@lists.freedesktop.org;
linux-samsung-soc@vger.kernel.org; rob.herring@calxeda.com; s.nawrocki@samsung.com; grant.likely@linaro.org; Rahul Sharma Subject: Re: [PATCH 1/4] drm/exynos: rename compatible strings for hdmi subsystem
Am Mittwoch, den 19.06.2013, 09:52 +0200 schrieb Tomasz Figa:
Hi Rahul,
On Tuesday 18 of June 2013 18:19:35 Rahul Sharma wrote:
This patch renames the combatible strings for hdmi, mixer, ddc and hdmiphy. It follows the convention of using compatible string which represent the SoC in which the IP was added for the first time.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
Documentation/devicetree/bindings/video/exynos_hdmi.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_hdmiddc.txt | 4 ++-- Documentation/devicetree/bindings/video/exynos_hdmiphy.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_mixer.txt | 7 +++++-- drivers/gpu/drm/exynos/exynos_ddc.c
|
2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmiphy.c | 4 +++- drivers/gpu/drm/exynos/exynos_mixer.c | 12 ++++++------ 8 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 589edee..2ac01ca 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt @@ -1,7 +1,9 @@ Device-Tree bindings for drm hdmi driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmi". +- compatible: value should be one among the following:
- "samsung,exynos4210-hdmi"
- "samsung,exynos4212-hdmi"
- reg: physical base address of the hdmi and length of memory mapped region.
- interrupts: interrupt number to the cpu.
@@ -15,7 +17,7 @@ Required properties: Example:
hdmi {
compatible = "samsung,exynos5-hdmi";
compatible = "samsung,exynos4212-hdmi";
Sorry, but it's a NAK from me.
DeviceTree bindings are considered an ABI. This is to allow older dtbs
to
work with new kernels.
If you just change the binding this way, you break all the existing
users
of this compatible value.
In addition you are doing it in a way that breaks bisection:
- patch 1/4 breaks existing in-tree users of current compatible values,
- after patch 2 and 3 it is still broken,
- and eventually all in-tree users are fixed by patch 4 (but you can't
fix out-of-tree users).
Please do it without changing existing compatible values. Even if they
are
misleading, this is all can be described in the documentation - just
list
SoCs that can be used with each compatible value there.
Or you could just introduce the new compatible value and make all in-tree users use this, but keep the old values around and still accept them in the drivers. This way you get the goodness of the cleaner new symbols without breaking existing users. Just mark the old values as deprecated in the documentation, so no new devicetree usees them.
That's a good idea. We really need to mitigate such misleading somehow or other.
Thanks, Inki Dae
Regards, Lucas -- Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi All,
On Wed, Jun 19, 2013 at 1:57 PM, Inki Dae inki.dae@samsung.com wrote:
-----Original Message----- From: dri-devel-bounces+inki.dae=samsung.com@lists.freedesktop.org [mailto:dri-devel-bounces+inki.dae=samsung.com@lists.freedesktop.org] On Behalf Of Lucas Stach Sent: Wednesday, June 19, 2013 4:59 PM To: Tomasz Figa Cc: kgene.kim@samsung.com; devicetree-discuss@lists.ozlabs.org; sw0312.kim@samsung.com; joshi@samsung.com;
dri-devel@lists.freedesktop.org;
linux-samsung-soc@vger.kernel.org; rob.herring@calxeda.com; s.nawrocki@samsung.com; grant.likely@linaro.org; Rahul Sharma Subject: Re: [PATCH 1/4] drm/exynos: rename compatible strings for hdmi subsystem
Am Mittwoch, den 19.06.2013, 09:52 +0200 schrieb Tomasz Figa:
Hi Rahul,
On Tuesday 18 of June 2013 18:19:35 Rahul Sharma wrote:
This patch renames the combatible strings for hdmi, mixer, ddc and hdmiphy. It follows the convention of using compatible string which represent the SoC in which the IP was added for the first time.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
Documentation/devicetree/bindings/video/exynos_hdmi.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_hdmiddc.txt | 4 ++-- Documentation/devicetree/bindings/video/exynos_hdmiphy.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_mixer.txt | 7 +++++-- drivers/gpu/drm/exynos/exynos_ddc.c
|
2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmiphy.c | 4 +++- drivers/gpu/drm/exynos/exynos_mixer.c | 12 ++++++------ 8 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 589edee..2ac01ca 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt @@ -1,7 +1,9 @@ Device-Tree bindings for drm hdmi driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmi". +- compatible: value should be one among the following:
- "samsung,exynos4210-hdmi"
- "samsung,exynos4212-hdmi"
- reg: physical base address of the hdmi and length of memory mapped
region.
- interrupts: interrupt number to the cpu.
@@ -15,7 +17,7 @@ Required properties: Example:
hdmi {
compatible = "samsung,exynos5-hdmi";
compatible = "samsung,exynos4212-hdmi";
Sorry, but it's a NAK from me.
DeviceTree bindings are considered an ABI. This is to allow older dtbs
to
work with new kernels.
If you just change the binding this way, you break all the existing
users
of this compatible value.
In addition you are doing it in a way that breaks bisection:
- patch 1/4 breaks existing in-tree users of current compatible values,
- after patch 2 and 3 it is still broken,
- and eventually all in-tree users are fixed by patch 4 (but you can't
fix out-of-tree users).
@Tomasz, I understand your point but how is it possible to change compatible types in driver as well as in dtbs by not breaking either of them other then putting changes in a single patch. I ensured that hdmi stuff is intact with whole series merged in either tree (drm or arch). Please suggest a better way.
The Only existing user is Exynos5250, which is modified in the same patch set.
Please do it without changing existing compatible values. Even if they
are
misleading, this is all can be described in the documentation - just
list
SoCs that can be used with each compatible value there.
Or you could just introduce the new compatible value and make all in-tree users use this, but keep the old values around and still accept them in the drivers. This way you get the goodness of the cleaner new symbols without breaking existing users. Just mark the old values as deprecated in the documentation, so no new devicetree usees them.
I agree, above is a decent approach, but in this case we have only one user for this compatible type including in flight patches which I have modified along.
If it seems better to keep old compatible type (deprecated), it is fine with me.
That's a good idea. We really need to mitigate such misleading somehow or other.
Please sugggest me how to proceed.
regards, Rahul Sharma.
Thanks, Inki Dae
Regards, Lucas -- Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
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
Hi Rahul,
On Wednesday 19 of June 2013 15:02:59 Rahul Sharma wrote:
Hi All,
On Wed, Jun 19, 2013 at 1:57 PM, Inki Dae inki.dae@samsung.com wrote:
-----Original Message----- From: dri-devel-bounces+inki.dae=samsung.com@lists.freedesktop.org [mailto:dri-devel-bounces+inki.dae=samsung.com@lists.freedesktop.org] On Behalf Of Lucas Stach Sent: Wednesday, June 19, 2013 4:59 PM To: Tomasz Figa Cc: kgene.kim@samsung.com; devicetree-discuss@lists.ozlabs.org; sw0312.kim@samsung.com; joshi@samsung.com;
dri-devel@lists.freedesktop.org;
linux-samsung-soc@vger.kernel.org; rob.herring@calxeda.com; s.nawrocki@samsung.com; grant.likely@linaro.org; Rahul Sharma Subject: Re: [PATCH 1/4] drm/exynos: rename compatible strings for hdmi subsystem
Am Mittwoch, den 19.06.2013, 09:52 +0200 schrieb Tomasz Figa:
Hi Rahul,
On Tuesday 18 of June 2013 18:19:35 Rahul Sharma wrote:
This patch renames the combatible strings for hdmi, mixer, ddc and hdmiphy. It follows the convention of using compatible string which represent the SoC in which the IP was added for the first time.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
Documentation/devicetree/bindings/video/exynos_hdmi.txt | 6
++++-- Documentation/devicetree/bindings/video/exynos_hdmiddc.txt | 4 ++-- Documentation/devicetree/bindings/video/exynos_hdmiphy.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_mixer.txt |
7 +++++-- drivers/gpu/drm/exynos/exynos_ddc.c
2 +- drivers/gpu/drm/exynos/exynos_hdmi.c |
2 +- drivers/gpu/drm/exynos/exynos_hdmiphy.c | 4 +++- drivers/gpu/drm/exynos/exynos_mixer.c | 12 ++++++------ 8 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 589edee..2ac01ca 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt @@ -1,7 +1,9 @@
Device-Tree bindings for drm hdmi driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmi". +- compatible: value should be one among the following:
- "samsung,exynos4210-hdmi"
- "samsung,exynos4212-hdmi"
- reg: physical base address of the hdmi and length of memory mapped
region.
- interrupts: interrupt number to the cpu.
@@ -15,7 +17,7 @@ Required properties: Example: hdmi {
compatible = "samsung,exynos5-hdmi";
compatible = "samsung,exynos4212-hdmi";
Sorry, but it's a NAK from me.
DeviceTree bindings are considered an ABI. This is to allow older dtbs
to
work with new kernels.
If you just change the binding this way, you break all the existing
users
of this compatible value.
In addition you are doing it in a way that breaks bisection:
- patch 1/4 breaks existing in-tree users of current compatible
values,
- after patch 2 and 3 it is still broken,
- and eventually all in-tree users are fixed by patch 4 (but you can't
fix out-of-tree users).
@Tomasz, I understand your point but how is it possible to change compatible types in driver as well as in dtbs by not breaking either of them other then putting changes in a single patch.
It's very easy. (Let's forget about the fact that DT bindings are an ABI temporarily) You can simply add new compatible values to the driver in first patch, then modify dts files in second one and then remove old compatibles values from the driver in third patch. (Now we remember about DT being ABI again.)
I ensured that hdmi stuff is intact with whole series merged in either tree (drm or arch). Please suggest a better way.
The Only existing user is Exynos5250, which is modified in the same patch set.
This is not true. You have modified only the existing _in_ _tree_ users.
Keep in mind that device tree is not a part of the kernel. It is currently located in the same tree, but it is _not_ a part of the kernel.
Now think about existing boards (like exynos5250-snow) that have a dtb built from older dts sources stored in their flash memory. You need to maintain compatibilty with this old dtb in new kernels as well.
Please do it without changing existing compatible values. Even if they
are
misleading, this is all can be described in the documentation - just
list
SoCs that can be used with each compatible value there.
Or you could just introduce the new compatible value and make all in-tree users use this, but keep the old values around and still accept them in the drivers. This way you get the goodness of the cleaner new symbols without breaking existing users. Just mark the old values as deprecated in the documentation, so no new devicetree usees them.
I agree, above is a decent approach, but in this case we have only one user for this compatible type including in flight patches which I have modified along.
This only user is already present in 3.10-rc6. This means that we now must maintain compatibility with it.
If it seems better to keep old compatible type (deprecated), it is fine with me.
Yes, this is an acceptable solution.
That's a good idea. We really need to mitigate such misleading somehow or other.
Please sugggest me how to proceed.
I think it's enough said now.
Best regards, Tomasz
regards, Rahul Sharma.
Thanks, Inki Dae
Regards, Lucas -- Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
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
-- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Jun 19, 2013 at 3:20 PM, Tomasz Figa t.figa@samsung.com wrote:
Hi Rahul,
On Wednesday 19 of June 2013 15:02:59 Rahul Sharma wrote:
Hi All,
On Wed, Jun 19, 2013 at 1:57 PM, Inki Dae inki.dae@samsung.com wrote:
-----Original Message----- From: dri-devel-bounces+inki.dae=samsung.com@lists.freedesktop.org [mailto:dri-devel-bounces+inki.dae=samsung.com@lists.freedesktop.org] On Behalf Of Lucas Stach Sent: Wednesday, June 19, 2013 4:59 PM To: Tomasz Figa Cc: kgene.kim@samsung.com; devicetree-discuss@lists.ozlabs.org; sw0312.kim@samsung.com; joshi@samsung.com;
dri-devel@lists.freedesktop.org;
linux-samsung-soc@vger.kernel.org; rob.herring@calxeda.com; s.nawrocki@samsung.com; grant.likely@linaro.org; Rahul Sharma Subject: Re: [PATCH 1/4] drm/exynos: rename compatible strings for hdmi subsystem
Am Mittwoch, den 19.06.2013, 09:52 +0200 schrieb Tomasz Figa:
Hi Rahul,
On Tuesday 18 of June 2013 18:19:35 Rahul Sharma wrote:
This patch renames the combatible strings for hdmi, mixer, ddc and hdmiphy. It follows the convention of using compatible string which represent the SoC in which the IP was added for the first time.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
Documentation/devicetree/bindings/video/exynos_hdmi.txt | 6
++++-- Documentation/devicetree/bindings/video/exynos_hdmiddc.txt | 4 ++-- Documentation/devicetree/bindings/video/exynos_hdmiphy.txt | 6 ++++-- Documentation/devicetree/bindings/video/exynos_mixer.txt |
7 +++++-- drivers/gpu/drm/exynos/exynos_ddc.c
2 +- drivers/gpu/drm/exynos/exynos_hdmi.c |
2 +- drivers/gpu/drm/exynos/exynos_hdmiphy.c | 4 +++- drivers/gpu/drm/exynos/exynos_mixer.c | 12 ++++++------ 8 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 589edee..2ac01ca 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt @@ -1,7 +1,9 @@
Device-Tree bindings for drm hdmi driver
Required properties: -- compatible: value should be "samsung,exynos5-hdmi". +- compatible: value should be one among the following:
- "samsung,exynos4210-hdmi"
- "samsung,exynos4212-hdmi"
- reg: physical base address of the hdmi and length of memory mapped
region.
- interrupts: interrupt number to the cpu.
@@ -15,7 +17,7 @@ Required properties: Example: hdmi {
compatible = "samsung,exynos5-hdmi";
compatible = "samsung,exynos4212-hdmi";
Sorry, but it's a NAK from me.
DeviceTree bindings are considered an ABI. This is to allow older dtbs
to
work with new kernels.
If you just change the binding this way, you break all the existing
users
of this compatible value.
In addition you are doing it in a way that breaks bisection:
- patch 1/4 breaks existing in-tree users of current compatible
values,
- after patch 2 and 3 it is still broken,
- and eventually all in-tree users are fixed by patch 4 (but you can't
fix out-of-tree users).
@Tomasz, I understand your point but how is it possible to change compatible types in driver as well as in dtbs by not breaking either of them other then putting changes in a single patch.
It's very easy. (Let's forget about the fact that DT bindings are an ABI temporarily) You can simply add new compatible values to the driver in first patch, then modify dts files in second one and then remove old compatibles values from the driver in third patch. (Now we remember about DT being ABI again.)
I ensured that hdmi stuff is intact with whole series merged in either tree (drm or arch). Please suggest a better way.
The Only existing user is Exynos5250, which is modified in the same patch set.
This is not true. You have modified only the existing _in_ _tree_ users.
Keep in mind that device tree is not a part of the kernel. It is currently located in the same tree, but it is _not_ a part of the kernel.
Now think about existing boards (like exynos5250-snow) that have a dtb built from older dts sources stored in their flash memory. You need to maintain compatibilty with this old dtb in new kernels as well.
Please do it without changing existing compatible values. Even if they
are
misleading, this is all can be described in the documentation - just
list
SoCs that can be used with each compatible value there.
Or you could just introduce the new compatible value and make all in-tree users use this, but keep the old values around and still accept them in the drivers. This way you get the goodness of the cleaner new symbols without breaking existing users. Just mark the old values as deprecated in the documentation, so no new devicetree usees them.
I agree, above is a decent approach, but in this case we have only one user for this compatible type including in flight patches which I have modified along.
This only user is already present in 3.10-rc6. This means that we now must maintain compatibility with it.
If it seems better to keep old compatible type (deprecated), it is fine with me.
Yes, this is an acceptable solution.
That's a good idea. We really need to mitigate such misleading somehow or other.
Please sugggest me how to proceed.
I think it's enough said now.
Best regards, Tomasz
Fine. It seems if I change this patch to add new compatible strings, above concerns will be addressed. I will post the v2.
regards, Rahul Sharma.
regards, Rahul Sharma.
Thanks, Inki Dae
Regards, Lucas -- Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
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
-- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
-- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Add support for exynos5420 mixer IP in the drm mixer driver.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com --- drivers/gpu/drm/exynos/exynos_mixer.c | 49 +++++++++++++++++++++++++-------- drivers/gpu/drm/exynos/regs-mixer.h | 7 +++++ 2 files changed, 44 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 2fe6d33..d51ff36 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -78,6 +78,7 @@ struct mixer_resources { enum mixer_version_id { MXR_VER_0_0_0_16, MXR_VER_16_0_33_0, + MXR_VER_128_0_0_184, };
struct mixer_context { @@ -283,17 +284,19 @@ static void mixer_cfg_scan(struct mixer_context *ctx, unsigned int height) val = (ctx->interlace ? MXR_CFG_SCAN_INTERLACE : MXR_CFG_SCAN_PROGRASSIVE);
- /* choosing between porper HD and SD mode */ - if (height <= 480) - val |= MXR_CFG_SCAN_NTSC | MXR_CFG_SCAN_SD; - else if (height <= 576) - val |= MXR_CFG_SCAN_PAL | MXR_CFG_SCAN_SD; - else if (height <= 720) - val |= MXR_CFG_SCAN_HD_720 | MXR_CFG_SCAN_HD; - else if (height <= 1080) - val |= MXR_CFG_SCAN_HD_1080 | MXR_CFG_SCAN_HD; - else - val |= MXR_CFG_SCAN_HD_720 | MXR_CFG_SCAN_HD; + if (ctx->mxr_ver != MXR_VER_128_0_0_184) { + /* choosing between proper HD and SD mode */ + if (height <= 480) + val |= MXR_CFG_SCAN_NTSC | MXR_CFG_SCAN_SD; + else if (height <= 576) + val |= MXR_CFG_SCAN_PAL | MXR_CFG_SCAN_SD; + else if (height <= 720) + val |= MXR_CFG_SCAN_HD_720 | MXR_CFG_SCAN_HD; + else if (height <= 1080) + val |= MXR_CFG_SCAN_HD_1080 | MXR_CFG_SCAN_HD; + else + val |= MXR_CFG_SCAN_HD_720 | MXR_CFG_SCAN_HD; + }
mixer_reg_writemask(res, MXR_CFG, val, MXR_CFG_SCAN_MASK); } @@ -557,6 +560,14 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win) /* setup geometry */ mixer_reg_write(res, MXR_GRAPHIC_SPAN(win), win_data->fb_width);
+ /* setup display size */ + if (ctx->mxr_ver == MXR_VER_128_0_0_184 && + win == MIXER_DEFAULT_WIN) { + val = MXR_MXR_RES_HEIGHT(win_data->fb_height); + val |= MXR_MXR_RES_WIDTH(win_data->fb_width); + mixer_reg_write(res, MXR_RESOLUTION, val); + } + val = MXR_GRP_WH_WIDTH(win_data->crtc_width); val |= MXR_GRP_WH_HEIGHT(win_data->crtc_height); val |= MXR_GRP_WH_H_SCALE(x_ratio); @@ -581,7 +592,8 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win) mixer_cfg_layer(ctx, win, true);
/* layer update mandatory for mixer 16.0.33.0 */ - if (ctx->mxr_ver == MXR_VER_16_0_33_0) + if (ctx->mxr_ver == MXR_VER_16_0_33_0 || + ctx->mxr_ver == MXR_VER_128_0_0_184) mixer_layer_update(ctx);
mixer_run(ctx); @@ -816,6 +828,7 @@ static void mixer_win_disable(void *ctx, int win)
static int mixer_check_mode(void *ctx, struct drm_display_mode *mode) { + struct mixer_context *mixer_ctx = ctx; u32 w, h;
w = mode->hdisplay; @@ -825,6 +838,10 @@ static int mixer_check_mode(void *ctx, struct drm_display_mode *mode) mode->hdisplay, mode->vdisplay, mode->vrefresh, (mode->flags & DRM_MODE_FLAG_INTERLACE) ? 1 : 0);
+ if (mixer_ctx->mxr_ver == MXR_VER_0_0_0_16 || + mixer_ctx->mxr_ver == MXR_VER_128_0_0_184) + return 0; + if ((w >= 464 && w <= 720 && h >= 261 && h <= 576) || (w >= 1024 && w <= 1280 && h >= 576 && h <= 720) || (w >= 1664 && w <= 1920 && h >= 936 && h <= 1080)) @@ -1115,6 +1132,11 @@ static int vp_resources_init(struct exynos_drm_hdmi_context *ctx, return 0; }
+static struct mixer_drv_data exynos5420_mxr_drv_data = { + .version = MXR_VER_128_0_0_184, + .is_vp_enabled = 0, +}; + static struct mixer_drv_data exynos5250_mxr_drv_data = { .version = MXR_VER_16_0_33_0, .is_vp_enabled = 0, @@ -1139,6 +1161,9 @@ static struct platform_device_id mixer_driver_types[] = {
static struct of_device_id mixer_match_types[] = { { + .compatible = "samsung,exynos5420-mixer", + .data = &exynos5420_mxr_drv_data, + }, { .compatible = "samsung,exynos5250-mixer", .data = &exynos5250_mxr_drv_data, }, { diff --git a/drivers/gpu/drm/exynos/regs-mixer.h b/drivers/gpu/drm/exynos/regs-mixer.h index 5d8dbc0..4537026 100644 --- a/drivers/gpu/drm/exynos/regs-mixer.h +++ b/drivers/gpu/drm/exynos/regs-mixer.h @@ -44,6 +44,9 @@ #define MXR_CM_COEFF_Y 0x0080 #define MXR_CM_COEFF_CB 0x0084 #define MXR_CM_COEFF_CR 0x0088 +#define MXR_MO 0x0304 +#define MXR_RESOLUTION 0x0310 + #define MXR_GRAPHIC0_BASE_S 0x2024 #define MXR_GRAPHIC1_BASE_S 0x2044
@@ -119,6 +122,10 @@ #define MXR_GRP_WH_WIDTH(x) MXR_MASK_VAL(x, 26, 16) #define MXR_GRP_WH_HEIGHT(x) MXR_MASK_VAL(x, 10, 0)
+/* bits for MXR_RESOLUTION */ +#define MXR_MXR_RES_HEIGHT(x) MXR_MASK_VAL(x, 26, 16) +#define MXR_MXR_RES_WIDTH(x) MXR_MASK_VAL(x, 10, 0) + /* bits for MXR_GRAPHICn_SXY */ #define MXR_GRP_SXY_SX(x) MXR_MASK_VAL(x, 26, 16) #define MXR_GRP_SXY_SY(x) MXR_MASK_VAL(x, 10, 0)
Hi Rahul,
Code part looks good to me but IMHO, binding document for exynos_mixer is also fixed like following because compitable string samsung,exynos5420-mixer is added with this patch.
Required properties: - compatible: value should be: 1) "samsung,exynos4210-mixer" 2) "samsung,exynos5250-mixer" + 3) "samsung,exynos5420-mixer"
Thanks and Regards, - Seung-Woo Kim
On 2013년 06월 18일 21:49, Rahul Sharma wrote:
Add support for exynos5420 mixer IP in the drm mixer driver.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
drivers/gpu/drm/exynos/exynos_mixer.c | 49 +++++++++++++++++++++++++-------- drivers/gpu/drm/exynos/regs-mixer.h | 7 +++++ 2 files changed, 44 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 2fe6d33..d51ff36 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -78,6 +78,7 @@ struct mixer_resources { enum mixer_version_id { MXR_VER_0_0_0_16, MXR_VER_16_0_33_0,
- MXR_VER_128_0_0_184,
};
struct mixer_context { @@ -283,17 +284,19 @@ static void mixer_cfg_scan(struct mixer_context *ctx, unsigned int height) val = (ctx->interlace ? MXR_CFG_SCAN_INTERLACE : MXR_CFG_SCAN_PROGRASSIVE);
- /* choosing between porper HD and SD mode */
- if (height <= 480)
val |= MXR_CFG_SCAN_NTSC | MXR_CFG_SCAN_SD;
- else if (height <= 576)
val |= MXR_CFG_SCAN_PAL | MXR_CFG_SCAN_SD;
- else if (height <= 720)
val |= MXR_CFG_SCAN_HD_720 | MXR_CFG_SCAN_HD;
- else if (height <= 1080)
val |= MXR_CFG_SCAN_HD_1080 | MXR_CFG_SCAN_HD;
- else
val |= MXR_CFG_SCAN_HD_720 | MXR_CFG_SCAN_HD;
if (ctx->mxr_ver != MXR_VER_128_0_0_184) {
/* choosing between proper HD and SD mode */
if (height <= 480)
val |= MXR_CFG_SCAN_NTSC | MXR_CFG_SCAN_SD;
else if (height <= 576)
val |= MXR_CFG_SCAN_PAL | MXR_CFG_SCAN_SD;
else if (height <= 720)
val |= MXR_CFG_SCAN_HD_720 | MXR_CFG_SCAN_HD;
else if (height <= 1080)
val |= MXR_CFG_SCAN_HD_1080 | MXR_CFG_SCAN_HD;
else
val |= MXR_CFG_SCAN_HD_720 | MXR_CFG_SCAN_HD;
}
mixer_reg_writemask(res, MXR_CFG, val, MXR_CFG_SCAN_MASK);
} @@ -557,6 +560,14 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win) /* setup geometry */ mixer_reg_write(res, MXR_GRAPHIC_SPAN(win), win_data->fb_width);
- /* setup display size */
- if (ctx->mxr_ver == MXR_VER_128_0_0_184 &&
win == MIXER_DEFAULT_WIN) {
val = MXR_MXR_RES_HEIGHT(win_data->fb_height);
val |= MXR_MXR_RES_WIDTH(win_data->fb_width);
mixer_reg_write(res, MXR_RESOLUTION, val);
- }
- val = MXR_GRP_WH_WIDTH(win_data->crtc_width); val |= MXR_GRP_WH_HEIGHT(win_data->crtc_height); val |= MXR_GRP_WH_H_SCALE(x_ratio);
@@ -581,7 +592,8 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win) mixer_cfg_layer(ctx, win, true);
/* layer update mandatory for mixer 16.0.33.0 */
- if (ctx->mxr_ver == MXR_VER_16_0_33_0)
if (ctx->mxr_ver == MXR_VER_16_0_33_0 ||
ctx->mxr_ver == MXR_VER_128_0_0_184)
mixer_layer_update(ctx);
mixer_run(ctx);
@@ -816,6 +828,7 @@ static void mixer_win_disable(void *ctx, int win)
static int mixer_check_mode(void *ctx, struct drm_display_mode *mode) {
struct mixer_context *mixer_ctx = ctx; u32 w, h;
w = mode->hdisplay;
@@ -825,6 +838,10 @@ static int mixer_check_mode(void *ctx, struct drm_display_mode *mode) mode->hdisplay, mode->vdisplay, mode->vrefresh, (mode->flags & DRM_MODE_FLAG_INTERLACE) ? 1 : 0);
- if (mixer_ctx->mxr_ver == MXR_VER_0_0_0_16 ||
mixer_ctx->mxr_ver == MXR_VER_128_0_0_184)
return 0;
- if ((w >= 464 && w <= 720 && h >= 261 && h <= 576) || (w >= 1024 && w <= 1280 && h >= 576 && h <= 720) || (w >= 1664 && w <= 1920 && h >= 936 && h <= 1080))
@@ -1115,6 +1132,11 @@ static int vp_resources_init(struct exynos_drm_hdmi_context *ctx, return 0; }
+static struct mixer_drv_data exynos5420_mxr_drv_data = {
- .version = MXR_VER_128_0_0_184,
- .is_vp_enabled = 0,
+};
static struct mixer_drv_data exynos5250_mxr_drv_data = { .version = MXR_VER_16_0_33_0, .is_vp_enabled = 0, @@ -1139,6 +1161,9 @@ static struct platform_device_id mixer_driver_types[] = {
static struct of_device_id mixer_match_types[] = { {
.compatible = "samsung,exynos5420-mixer",
.data = &exynos5420_mxr_drv_data,
- }, { .compatible = "samsung,exynos5250-mixer", .data = &exynos5250_mxr_drv_data, }, {
diff --git a/drivers/gpu/drm/exynos/regs-mixer.h b/drivers/gpu/drm/exynos/regs-mixer.h index 5d8dbc0..4537026 100644 --- a/drivers/gpu/drm/exynos/regs-mixer.h +++ b/drivers/gpu/drm/exynos/regs-mixer.h @@ -44,6 +44,9 @@ #define MXR_CM_COEFF_Y 0x0080 #define MXR_CM_COEFF_CB 0x0084 #define MXR_CM_COEFF_CR 0x0088 +#define MXR_MO 0x0304 +#define MXR_RESOLUTION 0x0310
#define MXR_GRAPHIC0_BASE_S 0x2024 #define MXR_GRAPHIC1_BASE_S 0x2044
@@ -119,6 +122,10 @@ #define MXR_GRP_WH_WIDTH(x) MXR_MASK_VAL(x, 26, 16) #define MXR_GRP_WH_HEIGHT(x) MXR_MASK_VAL(x, 10, 0)
+/* bits for MXR_RESOLUTION */ +#define MXR_MXR_RES_HEIGHT(x) MXR_MASK_VAL(x, 26, 16) +#define MXR_MXR_RES_WIDTH(x) MXR_MASK_VAL(x, 10, 0)
/* bits for MXR_GRAPHICn_SXY */ #define MXR_GRP_SXY_SX(x) MXR_MASK_VAL(x, 26, 16) #define MXR_GRP_SXY_SY(x) MXR_MASK_VAL(x, 10, 0)
Sure Seung-Woo,
I will update binding document along with this patch.
regards, Rahul Sharma.
On Wed, Jun 19, 2013 at 10:54 AM, 김승우 sw0312.kim@samsung.com wrote:
Hi Rahul,
Code part looks good to me but IMHO, binding document for exynos_mixer is also fixed like following because compitable string samsung,exynos5420-mixer is added with this patch.
Required properties:
- compatible: value should be: 1) "samsung,exynos4210-mixer" 2) "samsung,exynos5250-mixer"
3) "samsung,exynos5420-mixer"
Thanks and Regards,
- Seung-Woo Kim
On 2013년 06월 18일 21:49, Rahul Sharma wrote:
Add support for exynos5420 mixer IP in the drm mixer driver.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
drivers/gpu/drm/exynos/exynos_mixer.c | 49 +++++++++++++++++++++++++-------- drivers/gpu/drm/exynos/regs-mixer.h | 7 +++++ 2 files changed, 44 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 2fe6d33..d51ff36 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -78,6 +78,7 @@ struct mixer_resources { enum mixer_version_id { MXR_VER_0_0_0_16, MXR_VER_16_0_33_0,
MXR_VER_128_0_0_184,
};
struct mixer_context { @@ -283,17 +284,19 @@ static void mixer_cfg_scan(struct mixer_context *ctx, unsigned int height) val = (ctx->interlace ? MXR_CFG_SCAN_INTERLACE : MXR_CFG_SCAN_PROGRASSIVE);
/* choosing between porper HD and SD mode */
if (height <= 480)
val |= MXR_CFG_SCAN_NTSC | MXR_CFG_SCAN_SD;
else if (height <= 576)
val |= MXR_CFG_SCAN_PAL | MXR_CFG_SCAN_SD;
else if (height <= 720)
val |= MXR_CFG_SCAN_HD_720 | MXR_CFG_SCAN_HD;
else if (height <= 1080)
val |= MXR_CFG_SCAN_HD_1080 | MXR_CFG_SCAN_HD;
else
val |= MXR_CFG_SCAN_HD_720 | MXR_CFG_SCAN_HD;
if (ctx->mxr_ver != MXR_VER_128_0_0_184) {
/* choosing between proper HD and SD mode */
if (height <= 480)
val |= MXR_CFG_SCAN_NTSC | MXR_CFG_SCAN_SD;
else if (height <= 576)
val |= MXR_CFG_SCAN_PAL | MXR_CFG_SCAN_SD;
else if (height <= 720)
val |= MXR_CFG_SCAN_HD_720 | MXR_CFG_SCAN_HD;
else if (height <= 1080)
val |= MXR_CFG_SCAN_HD_1080 | MXR_CFG_SCAN_HD;
else
val |= MXR_CFG_SCAN_HD_720 | MXR_CFG_SCAN_HD;
} mixer_reg_writemask(res, MXR_CFG, val, MXR_CFG_SCAN_MASK);
} @@ -557,6 +560,14 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win) /* setup geometry */ mixer_reg_write(res, MXR_GRAPHIC_SPAN(win), win_data->fb_width);
/* setup display size */
if (ctx->mxr_ver == MXR_VER_128_0_0_184 &&
win == MIXER_DEFAULT_WIN) {
val = MXR_MXR_RES_HEIGHT(win_data->fb_height);
val |= MXR_MXR_RES_WIDTH(win_data->fb_width);
mixer_reg_write(res, MXR_RESOLUTION, val);
}
val = MXR_GRP_WH_WIDTH(win_data->crtc_width); val |= MXR_GRP_WH_HEIGHT(win_data->crtc_height); val |= MXR_GRP_WH_H_SCALE(x_ratio);
@@ -581,7 +592,8 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win) mixer_cfg_layer(ctx, win, true);
/* layer update mandatory for mixer 16.0.33.0 */
if (ctx->mxr_ver == MXR_VER_16_0_33_0)
if (ctx->mxr_ver == MXR_VER_16_0_33_0 ||
ctx->mxr_ver == MXR_VER_128_0_0_184) mixer_layer_update(ctx); mixer_run(ctx);
@@ -816,6 +828,7 @@ static void mixer_win_disable(void *ctx, int win)
static int mixer_check_mode(void *ctx, struct drm_display_mode *mode) {
struct mixer_context *mixer_ctx = ctx; u32 w, h; w = mode->hdisplay;
@@ -825,6 +838,10 @@ static int mixer_check_mode(void *ctx, struct drm_display_mode *mode) mode->hdisplay, mode->vdisplay, mode->vrefresh, (mode->flags & DRM_MODE_FLAG_INTERLACE) ? 1 : 0);
if (mixer_ctx->mxr_ver == MXR_VER_0_0_0_16 ||
mixer_ctx->mxr_ver == MXR_VER_128_0_0_184)
return 0;
if ((w >= 464 && w <= 720 && h >= 261 && h <= 576) || (w >= 1024 && w <= 1280 && h >= 576 && h <= 720) || (w >= 1664 && w <= 1920 && h >= 936 && h <= 1080))
@@ -1115,6 +1132,11 @@ static int vp_resources_init(struct exynos_drm_hdmi_context *ctx, return 0; }
+static struct mixer_drv_data exynos5420_mxr_drv_data = {
.version = MXR_VER_128_0_0_184,
.is_vp_enabled = 0,
+};
static struct mixer_drv_data exynos5250_mxr_drv_data = { .version = MXR_VER_16_0_33_0, .is_vp_enabled = 0, @@ -1139,6 +1161,9 @@ static struct platform_device_id mixer_driver_types[] = {
static struct of_device_id mixer_match_types[] = { {
.compatible = "samsung,exynos5420-mixer",
.data = &exynos5420_mxr_drv_data,
}, { .compatible = "samsung,exynos5250-mixer", .data = &exynos5250_mxr_drv_data, }, {
diff --git a/drivers/gpu/drm/exynos/regs-mixer.h b/drivers/gpu/drm/exynos/regs-mixer.h index 5d8dbc0..4537026 100644 --- a/drivers/gpu/drm/exynos/regs-mixer.h +++ b/drivers/gpu/drm/exynos/regs-mixer.h @@ -44,6 +44,9 @@ #define MXR_CM_COEFF_Y 0x0080 #define MXR_CM_COEFF_CB 0x0084 #define MXR_CM_COEFF_CR 0x0088 +#define MXR_MO 0x0304 +#define MXR_RESOLUTION 0x0310
#define MXR_GRAPHIC0_BASE_S 0x2024 #define MXR_GRAPHIC1_BASE_S 0x2044
@@ -119,6 +122,10 @@ #define MXR_GRP_WH_WIDTH(x) MXR_MASK_VAL(x, 26, 16) #define MXR_GRP_WH_HEIGHT(x) MXR_MASK_VAL(x, 10, 0)
+/* bits for MXR_RESOLUTION */ +#define MXR_MXR_RES_HEIGHT(x) MXR_MASK_VAL(x, 26, 16) +#define MXR_MXR_RES_WIDTH(x) MXR_MASK_VAL(x, 10, 0)
/* bits for MXR_GRAPHICn_SXY */ #define MXR_GRP_SXY_SX(x) MXR_MASK_VAL(x, 26, 16) #define MXR_GRP_SXY_SY(x) MXR_MASK_VAL(x, 10, 0)
-- Seung-Woo Kim Samsung Software R&D Center --
Modified code for calculating hdmi IP register values from drm timing values. The modification is based on the inputs from hw team and specifically proposed for 1440x576i and 1440x480i. But same changes holds good for other interlaced resolutions also.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com --- drivers/gpu/drm/exynos/exynos_hdmi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 8752171..2f807d5 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1557,8 +1557,7 @@ static void hdmi_v14_mode_set(struct hdmi_context *hdata, (m->vsync_start - m->vdisplay) / 2); hdmi_set_reg(core->v2_blank, 2, m->vtotal / 2); hdmi_set_reg(core->v1_blank, 2, (m->vtotal - m->vdisplay) / 2); - hdmi_set_reg(core->v_blank_f0, 2, (m->vtotal + - ((m->vsync_end - m->vsync_start) * 4) + 5) / 2); + hdmi_set_reg(core->v_blank_f0, 2, m->vtotal - m->vdisplay / 2); hdmi_set_reg(core->v_blank_f1, 2, m->vtotal); hdmi_set_reg(core->v_sync_line_aft_2, 2, (m->vtotal / 2) + 7); hdmi_set_reg(core->v_sync_line_aft_1, 2, (m->vtotal / 2) + 2); @@ -1568,7 +1567,10 @@ static void hdmi_v14_mode_set(struct hdmi_context *hdata, (m->htotal / 2) + (m->hsync_start - m->hdisplay)); hdmi_set_reg(tg->vact_st, 2, (m->vtotal - m->vdisplay) / 2); hdmi_set_reg(tg->vact_sz, 2, m->vdisplay / 2); - hdmi_set_reg(tg->vact_st2, 2, 0x249);/* Reset value + 1*/ + hdmi_set_reg(tg->vact_st2, 2, m->vtotal - m->vdisplay / 2); + hdmi_set_reg(tg->vsync2, 2, (m->vtotal / 2) + 1); + hdmi_set_reg(tg->vsync_bot_hdmi, 2, (m->vtotal / 2) + 1); + hdmi_set_reg(tg->field_bot_hdmi, 2, (m->vtotal / 2) + 1); hdmi_set_reg(tg->vact_st3, 2, 0x0); hdmi_set_reg(tg->vact_st4, 2, 0x0); } else { @@ -1590,6 +1592,9 @@ static void hdmi_v14_mode_set(struct hdmi_context *hdata, hdmi_set_reg(tg->vact_st2, 2, 0x248); /* Reset value */ hdmi_set_reg(tg->vact_st3, 2, 0x47b); /* Reset value */ hdmi_set_reg(tg->vact_st4, 2, 0x6ae); /* Reset value */ + hdmi_set_reg(tg->vsync2, 2, 0x233); /* Reset value */ + hdmi_set_reg(tg->vsync_bot_hdmi, 2, 0x233); /* Reset value */ + hdmi_set_reg(tg->field_bot_hdmi, 2, 0x233); /* Reset value */ }
/* Following values & calculations are same irrespective of mode type */ @@ -1621,12 +1626,9 @@ static void hdmi_v14_mode_set(struct hdmi_context *hdata, hdmi_set_reg(tg->hact_sz, 2, m->hdisplay); hdmi_set_reg(tg->v_fsz, 2, m->vtotal); hdmi_set_reg(tg->vsync, 2, 0x1); - hdmi_set_reg(tg->vsync2, 2, 0x233); /* Reset value */ hdmi_set_reg(tg->field_chg, 2, 0x233); /* Reset value */ hdmi_set_reg(tg->vsync_top_hdmi, 2, 0x1); /* Reset value */ - hdmi_set_reg(tg->vsync_bot_hdmi, 2, 0x233); /* Reset value */ hdmi_set_reg(tg->field_top_hdmi, 2, 0x1); /* Reset value */ - hdmi_set_reg(tg->field_bot_hdmi, 2, 0x233); /* Reset value */ hdmi_set_reg(tg->tg_3d, 1, 0x0); }
Hi Rahul,
This patch looks good to me.
On 2013년 06월 18일 21:49, Rahul Sharma wrote:
Modified code for calculating hdmi IP register values from drm timing values. The modification is based on the inputs from hw team and specifically proposed for 1440x576i and 1440x480i. But same changes holds good for other interlaced resolutions also.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
Acked-by: Seung-Woo Kim sw0312.kim@samsung.com
drivers/gpu/drm/exynos/exynos_hdmi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 8752171..2f807d5 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1557,8 +1557,7 @@ static void hdmi_v14_mode_set(struct hdmi_context *hdata, (m->vsync_start - m->vdisplay) / 2); hdmi_set_reg(core->v2_blank, 2, m->vtotal / 2); hdmi_set_reg(core->v1_blank, 2, (m->vtotal - m->vdisplay) / 2);
hdmi_set_reg(core->v_blank_f0, 2, (m->vtotal +
((m->vsync_end - m->vsync_start) * 4) + 5) / 2);
hdmi_set_reg(core->v_blank_f1, 2, m->vtotal); hdmi_set_reg(core->v_sync_line_aft_2, 2, (m->vtotal / 2) + 7); hdmi_set_reg(core->v_sync_line_aft_1, 2, (m->vtotal / 2) + 2);hdmi_set_reg(core->v_blank_f0, 2, m->vtotal - m->vdisplay / 2);
@@ -1568,7 +1567,10 @@ static void hdmi_v14_mode_set(struct hdmi_context *hdata, (m->htotal / 2) + (m->hsync_start - m->hdisplay)); hdmi_set_reg(tg->vact_st, 2, (m->vtotal - m->vdisplay) / 2); hdmi_set_reg(tg->vact_sz, 2, m->vdisplay / 2);
hdmi_set_reg(tg->vact_st2, 2, 0x249);/* Reset value + 1*/
hdmi_set_reg(tg->vact_st2, 2, m->vtotal - m->vdisplay / 2);
hdmi_set_reg(tg->vsync2, 2, (m->vtotal / 2) + 1);
hdmi_set_reg(tg->vsync_bot_hdmi, 2, (m->vtotal / 2) + 1);
hdmi_set_reg(tg->vact_st3, 2, 0x0); hdmi_set_reg(tg->vact_st4, 2, 0x0); } else {hdmi_set_reg(tg->field_bot_hdmi, 2, (m->vtotal / 2) + 1);
@@ -1590,6 +1592,9 @@ static void hdmi_v14_mode_set(struct hdmi_context *hdata, hdmi_set_reg(tg->vact_st2, 2, 0x248); /* Reset value */ hdmi_set_reg(tg->vact_st3, 2, 0x47b); /* Reset value */ hdmi_set_reg(tg->vact_st4, 2, 0x6ae); /* Reset value */
hdmi_set_reg(tg->vsync2, 2, 0x233); /* Reset value */
hdmi_set_reg(tg->vsync_bot_hdmi, 2, 0x233); /* Reset value */
hdmi_set_reg(tg->field_bot_hdmi, 2, 0x233); /* Reset value */
}
/* Following values & calculations are same irrespective of mode type */
@@ -1621,12 +1626,9 @@ static void hdmi_v14_mode_set(struct hdmi_context *hdata, hdmi_set_reg(tg->hact_sz, 2, m->hdisplay); hdmi_set_reg(tg->v_fsz, 2, m->vtotal); hdmi_set_reg(tg->vsync, 2, 0x1);
- hdmi_set_reg(tg->vsync2, 2, 0x233); /* Reset value */ hdmi_set_reg(tg->field_chg, 2, 0x233); /* Reset value */ hdmi_set_reg(tg->vsync_top_hdmi, 2, 0x1); /* Reset value */
- hdmi_set_reg(tg->vsync_bot_hdmi, 2, 0x233); /* Reset value */ hdmi_set_reg(tg->field_top_hdmi, 2, 0x1); /* Reset value */
- hdmi_set_reg(tg->field_bot_hdmi, 2, 0x233); /* Reset value */ hdmi_set_reg(tg->tg_3d, 1, 0x0);
}
Applied.
Thanks, Inki Dae
-----Original Message----- From: 김승우 [mailto:sw0312.kim@samsung.com] Sent: Wednesday, June 19, 2013 2:34 PM To: Rahul Sharma Cc: linux-samsung-soc@vger.kernel.org; devicetree-
discuss@lists.ozlabs.org;
dri-devel@lists.freedesktop.org; kgene.kim@samsung.com; inki.dae@samsung.com; joshi@samsung.com; r.sh.open@gmail.com; Seung-Woo Kim Subject: Re: [PATCH 3/4] drm/exynos: fix interlace resolutions for exynos5420
Hi Rahul,
This patch looks good to me.
On 2013년 06월 18일 21:49, Rahul Sharma wrote:
Modified code for calculating hdmi IP register values from drm timing values. The modification is based on the inputs from hw team and
specifically
proposed for 1440x576i and 1440x480i. But same changes holds good for
other
interlaced resolutions also.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com
Acked-by: Seung-Woo Kim sw0312.kim@samsung.com
drivers/gpu/drm/exynos/exynos_hdmi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c
b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 8752171..2f807d5 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1557,8 +1557,7 @@ static void hdmi_v14_mode_set(struct hdmi_context
*hdata,
(m->vsync_start - m->vdisplay) / 2); hdmi_set_reg(core->v2_blank, 2, m->vtotal / 2); hdmi_set_reg(core->v1_blank, 2, (m->vtotal - m->vdisplay) /
2);
hdmi_set_reg(core->v_blank_f0, 2, (m->vtotal +
((m->vsync_end - m->vsync_start) * 4) + 5) / 2);
hdmi_set_reg(core->v_blank_f0, 2, m->vtotal - m->vdisplay /
2);
hdmi_set_reg(core->v_blank_f1, 2, m->vtotal); hdmi_set_reg(core->v_sync_line_aft_2, 2, (m->vtotal / 2) +
7);
hdmi_set_reg(core->v_sync_line_aft_1, 2, (m->vtotal / 2) +
2);
@@ -1568,7 +1567,10 @@ static void hdmi_v14_mode_set(struct hdmi_context
*hdata,
(m->htotal / 2) + (m->hsync_start - m->hdisplay)); hdmi_set_reg(tg->vact_st, 2, (m->vtotal - m->vdisplay) / 2); hdmi_set_reg(tg->vact_sz, 2, m->vdisplay / 2);
hdmi_set_reg(tg->vact_st2, 2, 0x249);/* Reset value + 1*/
hdmi_set_reg(tg->vact_st2, 2, m->vtotal - m->vdisplay / 2);
hdmi_set_reg(tg->vsync2, 2, (m->vtotal / 2) + 1);
hdmi_set_reg(tg->vsync_bot_hdmi, 2, (m->vtotal / 2) + 1);
hdmi_set_reg(tg->vact_st3, 2, 0x0); hdmi_set_reg(tg->vact_st4, 2, 0x0); } else {hdmi_set_reg(tg->field_bot_hdmi, 2, (m->vtotal / 2) + 1);
@@ -1590,6 +1592,9 @@ static void hdmi_v14_mode_set(struct hdmi_context
*hdata,
hdmi_set_reg(tg->vact_st2, 2, 0x248); /* Reset value */ hdmi_set_reg(tg->vact_st3, 2, 0x47b); /* Reset value */ hdmi_set_reg(tg->vact_st4, 2, 0x6ae); /* Reset value */
hdmi_set_reg(tg->vsync2, 2, 0x233); /* Reset value */
hdmi_set_reg(tg->vsync_bot_hdmi, 2, 0x233); /* Reset value
*/
hdmi_set_reg(tg->field_bot_hdmi, 2, 0x233); /* Reset value
*/
}
/* Following values & calculations are same irrespective of mode
type */
@@ -1621,12 +1626,9 @@ static void hdmi_v14_mode_set(struct hdmi_context
*hdata,
hdmi_set_reg(tg->hact_sz, 2, m->hdisplay); hdmi_set_reg(tg->v_fsz, 2, m->vtotal); hdmi_set_reg(tg->vsync, 2, 0x1);
- hdmi_set_reg(tg->vsync2, 2, 0x233); /* Reset value */ hdmi_set_reg(tg->field_chg, 2, 0x233); /* Reset value */ hdmi_set_reg(tg->vsync_top_hdmi, 2, 0x1); /* Reset value */
- hdmi_set_reg(tg->vsync_bot_hdmi, 2, 0x233); /* Reset value */ hdmi_set_reg(tg->field_top_hdmi, 2, 0x1); /* Reset value */
- hdmi_set_reg(tg->field_bot_hdmi, 2, 0x233); /* Reset value */ hdmi_set_reg(tg->tg_3d, 1, 0x0);
}
-- Seung-Woo Kim Samsung Software R&D Center --
This patch renames the combatible strings for hdmi, mixer, ddc and hdmiphy. It follows the convention of using compatible string which represent the SoC in which the IP was added for the first time.
Signed-off-by: Rahul Sharma rahul.sharma@samsung.com --- arch/arm/boot/dts/cros5250-common.dtsi | 4 ++-- arch/arm/boot/dts/exynos5250-smdk5250.dts | 4 ++-- arch/arm/boot/dts/exynos5250.dtsi | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi index 3f0239e..dc259e8b 100644 --- a/arch/arm/boot/dts/cros5250-common.dtsi +++ b/arch/arm/boot/dts/cros5250-common.dtsi @@ -190,7 +190,7 @@ samsung,i2c-max-bus-freq = <66000>;
hdmiddc@50 { - compatible = "samsung,exynos5-hdmiddc"; + compatible = "samsung,exynos4210-hdmiddc"; reg = <0x50>; }; }; @@ -224,7 +224,7 @@ samsung,i2c-max-bus-freq = <378000>;
hdmiphy@38 { - compatible = "samsung,exynos5-hdmiphy"; + compatible = "samsung,exynos4212-hdmiphy"; reg = <0x38>; }; }; diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index 3e0c792..f320d7c 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -72,7 +72,7 @@ samsung,i2c-max-bus-freq = <66000>;
hdmiddc@50 { - compatible = "samsung,exynos5-hdmiddc"; + compatible = "samsung,exynos4210-hdmiddc"; reg = <0x50>; }; }; @@ -102,7 +102,7 @@ samsung,i2c-max-bus-freq = <66000>;
hdmiphy@38 { - compatible = "samsung,exynos5-hdmiphy"; + compatible = "samsung,exynos4212-hdmiphy"; reg = <0x38>; }; }; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 0673524..2f7763b 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -601,7 +601,7 @@ };
hdmi { - compatible = "samsung,exynos5-hdmi"; + compatible = "samsung,exynos4212-hdmi"; reg = <0x14530000 0x70000>; interrupts = <0 95 0>; clocks = <&clock 333>, <&clock 136>, <&clock 137>, @@ -611,7 +611,7 @@ };
mixer { - compatible = "samsung,exynos5-mixer"; + compatible = "samsung,exynos5250-mixer"; reg = <0x14450000 0x10000>; interrupts = <0 94 0>; };
dri-devel@lists.freedesktop.org