2022-11-15 04:08:12

by Aakarsh Jain

[permalink] [raw]
Subject: [Patch v5 0/3] Add new compatible for Exynos3250

Since MFC v7 support was added for Exynos5420 and Exynos3250
SoC with same compatible string "samsung,mfc-v7". As both SoCs
having different hardware properties and having same compatible
string for both SoCs doesn't seems to be correct.
Add a new compatible to differentiate the two SoC's MFC IP, at
the same time to keep git bisect happy, add a fallback to mfc-v7
for Exynos3250.

Changes since v4:
- Addressed review comments from Krzysztof Kozlowski.
- Fixed syntax in commit body,dropped quotes and corrected proper
commit title as per submitting-patches.rst.

Changes since v3:
- Addressed review comments from Krzysztof Kozlowski.
- Added new compatible string for Exynos3250 followed by mfc-v7 fallback.

Changes since v2:
- Addressed review comments from Krzysztof Kozlowski.
- Changed subject prefixes matching the subsystem.

Changes since v1:
- Addressed review comments from Marek Szyprowski.
- Changed subject prefix from arm64 to arm.

- Addressed review comments from Krzysztof Kozlowski.
- Changed subject prefixes matching the subsystem.
- Added new compatible string for Exynos3250 followed by mfc-v7 fallback.
- Removed checkpatch warnings from s5p_mfc.c.Sent separate patch
series for the same.

- Addressed review comments from Tommaso Merciai.
- Change in commit message body from used to use in Patch-2.

Aakarsh Jain (3):
media: dt-bindings: s5p-mfc: Add new compatible string for Exynos3250
SoC
media: s5p-mfc: Add variant data for MFC v7 hardware for Exynos 3250
SoC
ARM: dts: exynos: Add new SoC specific compatible string for
Exynos3250 SoC

.../devicetree/bindings/media/s5p-mfc.txt | 10 ++++++----
arch/arm/boot/dts/exynos3250.dtsi | 2 +-
.../media/platform/samsung/s5p-mfc/s5p_mfc.c | 17 +++++++++++++++--
3 files changed, 22 insertions(+), 7 deletions(-)

--
2.17.1



2022-11-15 04:08:32

by Aakarsh Jain

[permalink] [raw]
Subject: [Patch v5 1/3] media: dt-bindings: s5p-mfc: Add new compatible string for Exynos3250 SoC

Since MFC v7 support was present for both Exynos5420 and Exynos3250
SoC with same compatible string "samsung,mfc-v7". As both SoCs
having different hardware properties and having same compatible
string for both SoCs doesn't seems to be correct.
Add new compatible for Exynos3250 SoC followed by mfc-v7 fallback
which will differentiate the node properties for both SoCs which
support MFC v7.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Tommaso Merciai <[email protected]>
Suggested-by: Alim Akhtar <[email protected]>
Signed-off-by: Aakarsh Jain <[email protected]>
---
Documentation/devicetree/bindings/media/s5p-mfc.txt | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

We are already in process of converting this txt file to yaml.
https://patchwork.kernel.org/project/linux-media/patch/[email protected]/
Modifying this txt binding for completeness.

diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt
index aa54c8159d9f..8eb90c043d5d 100644
--- a/Documentation/devicetree/bindings/media/s5p-mfc.txt
+++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt
@@ -10,10 +10,12 @@ Required properties:
- compatible : value should be either one among the following
(a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs
(b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs
- (c) "samsung,mfc-v7" for MFC v7 present in Exynos5420 SoC
- (d) "samsung,mfc-v8" for MFC v8 present in Exynos5800 SoC
- (e) "samsung,exynos5433-mfc" for MFC v8 present in Exynos5433 SoC
- (f) "samsung,mfc-v10" for MFC v10 present in Exynos7880 SoC
+ (c) "samsung,exynos3250-mfc", "samsung,mfc-v7" for MFC v7
+ present in Exynos3250 SoC
+ (d) "samsung,mfc-v7" for MFC v7 present in Exynos5420 SoC
+ (e) "samsung,mfc-v8" for MFC v8 present in Exynos5800 SoC
+ (f) "samsung,exynos5433-mfc" for MFC v8 present in Exynos5433 SoC
+ (g) "samsung,mfc-v10" for MFC v10 present in Exynos7880 SoC

- reg : Physical base address of the IP registers and length of memory
mapped region.
--
2.17.1


2022-11-15 04:08:39

by Aakarsh Jain

[permalink] [raw]
Subject: [Patch v5 2/3] media: s5p-mfc: Add variant data for MFC v7 hardware for Exynos 3250 SoC

Commit 5441e9dafdfc6dc40 ("[media] s5p-mfc: Core support for MFC v7")
which adds mfc v7 support for Exynos3250 and use the same compatible
string as used by Exynos5240 but both the IPs are a bit different in
terms of IP clock.
Add variant driver data based on the new compatible string
"samsung,exynos3250-mfc" for Exynos3250 SoC.

Suggested-by: Alim Akhtar <[email protected]>
Fixes: 5441e9dafdfc ("[media] s5p-mfc: Core support for MFC v7")
Signed-off-by: Aakarsh Jain <[email protected]>
---
.../media/platform/samsung/s5p-mfc/s5p_mfc.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
index fca5c6405eec..007c7dbee037 100644
--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
@@ -1576,8 +1576,18 @@ static struct s5p_mfc_variant mfc_drvdata_v7 = {
.port_num = MFC_NUM_PORTS_V7,
.buf_size = &buf_size_v7,
.fw_name[0] = "s5p-mfc-v7.fw",
- .clk_names = {"mfc", "sclk_mfc"},
- .num_clocks = 2,
+ .clk_names = {"mfc"},
+ .num_clocks = 1,
+};
+
+static struct s5p_mfc_variant mfc_drvdata_v7_3250 = {
+ .version = MFC_VERSION_V7,
+ .version_bit = MFC_V7_BIT,
+ .port_num = MFC_NUM_PORTS_V7,
+ .buf_size = &buf_size_v7,
+ .fw_name[0] = "s5p-mfc-v7.fw",
+ .clk_names = {"mfc", "sclk_mfc"},
+ .num_clocks = 2,
};

static struct s5p_mfc_buf_size_v6 mfc_buf_size_v8 = {
@@ -1647,6 +1657,9 @@ static const struct of_device_id exynos_mfc_match[] = {
}, {
.compatible = "samsung,mfc-v7",
.data = &mfc_drvdata_v7,
+ }, {
+ .compatible = "samsung,exynos3250-mfc",
+ .data = &mfc_drvdata_v7_3250,
}, {
.compatible = "samsung,mfc-v8",
.data = &mfc_drvdata_v8,
--
2.17.1


2022-11-15 04:08:52

by Aakarsh Jain

[permalink] [raw]
Subject: [Patch v5 3/3] ARM: dts: exynos: Add new SoC specific compatible string for Exynos3250 SoC

Commit 752d3a23d1f68de ("ARM: dts: add MFC codec device node for
exynos3250") which adds MFC codec device node for exynos3250 SoC.
Since exynos3250.dtsi and exynos5420.dtsi are using same compatible
string as "samsung,mfc-v7" but their node properties are different.
As both SoCs have MFC v7 hardware module but with different clock
hierarchy and complexity.
Add new compatible string followed by mfc-v7 fallback for Exynos3250
SoC.

Reviewed-by: Tommaso Merciai <[email protected]>
Suggested-by: Alim Akhtar <[email protected]>
Signed-off-by: Aakarsh Jain <[email protected]>
---
arch/arm/boot/dts/exynos3250.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index 326b9e0ed8d3..a2d6ee7fff08 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -485,7 +485,7 @@
};

mfc: codec@13400000 {
- compatible = "samsung,mfc-v7";
+ compatible = "samsung,exynos3250-mfc", "samsung,mfc-v7";
reg = <0x13400000 0x10000>;
interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "mfc", "sclk_mfc";
--
2.17.1


2022-11-15 10:53:16

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: (subset) [Patch v5 3/3] ARM: dts: exynos: Add new SoC specific compatible string for Exynos3250 SoC

On Mon, 14 Nov 2022 17:20:24 +0530, Aakarsh Jain wrote:
> Commit 752d3a23d1f68de ("ARM: dts: add MFC codec device node for
> exynos3250") which adds MFC codec device node for exynos3250 SoC.

This sentence ends prematurely. I don't know what you wanted to say here, so I
dropped it.

> Since exynos3250.dtsi and exynos5420.dtsi are using same compatible
> string as "samsung,mfc-v7" but their node properties are different.
> As both SoCs have MFC v7 hardware module but with different clock
> hierarchy and complexity.
> Add new compatible string followed by mfc-v7 fallback for Exynos3250
> SoC.
>
> [...]

Applied with changes to commit msg, thanks!

[3/3] ARM: dts: exynos: Add new SoC specific compatible string for Exynos3250 SoC
https://git.kernel.org/krzk/linux/c/c9259e0d224b15a734673200e0825fae5ea2ab1e

Best regards,
--
Krzysztof Kozlowski <[email protected]>

2022-11-24 12:05:11

by Alim Akhtar

[permalink] [raw]
Subject: RE: [Patch v5 2/3] media: s5p-mfc: Add variant data for MFC v7 hardware for Exynos 3250 SoC



>-----Original Message-----
>From: Aakarsh Jain [mailto:[email protected]]
>Sent: Monday, November 14, 2022 5:20 PM
>To: [email protected]; [email protected]; linux-
>[email protected]; [email protected]
>Cc: [email protected]; [email protected];
>[email protected]; [email protected];
>[email protected]; [email protected];
>[email protected]; [email protected];
>[email protected]; [email protected];
>[email protected]; [email protected];
>[email protected]; [email protected]; [email protected];
>[email protected]; [email protected];
>[email protected]; [email protected];
>[email protected]
>Subject: [Patch v5 2/3] media: s5p-mfc: Add variant data for MFC v7 hardware
>for Exynos 3250 SoC
>
>Commit 5441e9dafdfc6dc40 ("[media] s5p-mfc: Core support for MFC v7")
>which adds mfc v7 support for Exynos3250 and use the same compatible string
>as used by Exynos5240 but both the IPs are a bit different in terms of IP clock.
>Add variant driver data based on the new compatible string
>"samsung,exynos3250-mfc" for Exynos3250 SoC.
>
>Suggested-by: Alim Akhtar <[email protected]>
>Fixes: 5441e9dafdfc ("[media] s5p-mfc: Core support for MFC v7")
>Signed-off-by: Aakarsh Jain <[email protected]>
>---
Thanks!

Reviewed-by: Alim Akhtar <[email protected]>

> .../media/platform/samsung/s5p-mfc/s5p_mfc.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
>b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
>index fca5c6405eec..007c7dbee037 100644
>--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
>+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
>@@ -1576,8 +1576,18 @@ static struct s5p_mfc_variant mfc_drvdata_v7 = {
> .port_num = MFC_NUM_PORTS_V7,
> .buf_size = &buf_size_v7,
> .fw_name[0] = "s5p-mfc-v7.fw",
>- .clk_names = {"mfc", "sclk_mfc"},
>- .num_clocks = 2,
>+ .clk_names = {"mfc"},
>+ .num_clocks = 1,
>+};
>+
>+static struct s5p_mfc_variant mfc_drvdata_v7_3250 = {
>+ .version = MFC_VERSION_V7,
>+ .version_bit = MFC_V7_BIT,
>+ .port_num = MFC_NUM_PORTS_V7,
>+ .buf_size = &buf_size_v7,
>+ .fw_name[0] = "s5p-mfc-v7.fw",
>+ .clk_names = {"mfc", "sclk_mfc"},
>+ .num_clocks = 2,
> };
>
> static struct s5p_mfc_buf_size_v6 mfc_buf_size_v8 = { @@ -1647,6 +1657,9
>@@ static const struct of_device_id exynos_mfc_match[] = {
> }, {
> .compatible = "samsung,mfc-v7",
> .data = &mfc_drvdata_v7,
>+ }, {
>+ .compatible = "samsung,exynos3250-mfc",
>+ .data = &mfc_drvdata_v7_3250,
> }, {
> .compatible = "samsung,mfc-v8",
> .data = &mfc_drvdata_v8,
>--
>2.17.1