[v4,2/3] media: s5p-mfc: Add variant data for MFC v7 hardware for Exynos 3250 SoC

Message ID 20221114054655.68090-3-aakarsh.jain@samsung.com
State New
Headers
Series Add new compatible for Exynos3250 |

Commit Message

Aakarsh Jain Nov. 14, 2022, 5:46 a.m. UTC
  commit "5441e9dafdfc6dc40fa" 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.
Lets add variant driver data based on the new compatible string
"samsung,exynos3250-mfc" for Exynos3250 SoC.

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

Comments

Krzysztof Kozlowski Nov. 14, 2022, 7:51 a.m. UTC | #1
On 14/11/2022 06:46, Aakarsh Jain wrote:
> commit "5441e9dafdfc6dc40fa" which adds mfc v7 support for

Please run scripts/checkpatch.pl and fix reported warnings.

> Exynos3250 and use the same compatible string as used by
> Exynos5240 but both the IPs are a bit different in terms of
> IP clock.
> Lets add variant driver data based on the new compatible string

Just "Add variant"

Best regards,
Krzysztof
  
Aakarsh Jain Nov. 14, 2022, 9:44 a.m. UTC | #2
Hi Krzysztof,

> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:krzysztof.kozlowski@linaro.org]
> Sent: 14 November 2022 13:22
> To: Aakarsh Jain <aakarsh.jain@samsung.com>; linux-arm-
> kernel@lists.infradead.org; linux-media@vger.kernel.org; linux-
> kernel@vger.kernel.org; devicetree@vger.kernel.org
> Cc: m.szyprowski@samsung.com; andrzej.hajda@intel.com;
> mchehab@kernel.org; hverkuil-cisco@xs4all.nl;
> ezequiel@vanguardiasur.com.ar; jernej.skrabec@gmail.com;
> benjamin.gaignard@collabora.com; krzysztof.kozlowski+dt@linaro.org;
> stanimir.varbanov@linaro.org; dillon.minfei@gmail.com;
> david.plowman@raspberrypi.com; mark.rutland@arm.com;
> robh+dt@kernel.org; krzk+dt@kernel.org; andi@etezian.org;
> alim.akhtar@samsung.com; aswani.reddy@samsung.com;
> pankaj.dubey@samsung.com; smitha.t@samsung.com
> Subject: Re: [Patch v4 2/3] media: s5p-mfc: Add variant data for MFC v7
> hardware for Exynos 3250 SoC
> 
> On 14/11/2022 06:46, Aakarsh Jain wrote:
> > commit "5441e9dafdfc6dc40fa" which adds mfc v7 support for
> 
> Please run scripts/checkpatch.pl and fix reported warnings.
> 
Do you mean warnings on "5441e9dafdfc6dc40fa" commit? Or on this patch?
 
I am running like this :  ./scripts/checkpatch.pl patch_file, it does not show any warnings.

or am I missing anything while running checkpatch on the current patch?

> > Exynos3250 and use the same compatible string as used by
> > Exynos5240 but both the IPs are a bit different in terms of IP clock.
> > Lets add variant driver data based on the new compatible string
> 
> Just "Add variant"
> 
> Best regards,
> Krzysztof
  
Krzysztof Kozlowski Nov. 14, 2022, 10:05 a.m. UTC | #3
On 14/11/2022 10:44, Aakarsh Jain wrote:
> Hi Krzysztof,
> 
>> -----Original Message-----
>> From: Krzysztof Kozlowski [mailto:krzysztof.kozlowski@linaro.org]
>> Sent: 14 November 2022 13:22
>> To: Aakarsh Jain <aakarsh.jain@samsung.com>; linux-arm-
>> kernel@lists.infradead.org; linux-media@vger.kernel.org; linux-
>> kernel@vger.kernel.org; devicetree@vger.kernel.org
>> Cc: m.szyprowski@samsung.com; andrzej.hajda@intel.com;
>> mchehab@kernel.org; hverkuil-cisco@xs4all.nl;
>> ezequiel@vanguardiasur.com.ar; jernej.skrabec@gmail.com;
>> benjamin.gaignard@collabora.com; krzysztof.kozlowski+dt@linaro.org;
>> stanimir.varbanov@linaro.org; dillon.minfei@gmail.com;
>> david.plowman@raspberrypi.com; mark.rutland@arm.com;
>> robh+dt@kernel.org; krzk+dt@kernel.org; andi@etezian.org;
>> alim.akhtar@samsung.com; aswani.reddy@samsung.com;
>> pankaj.dubey@samsung.com; smitha.t@samsung.com
>> Subject: Re: [Patch v4 2/3] media: s5p-mfc: Add variant data for MFC v7
>> hardware for Exynos 3250 SoC
>>
>> On 14/11/2022 06:46, Aakarsh Jain wrote:
>>> commit "5441e9dafdfc6dc40fa" which adds mfc v7 support for
>>
>> Please run scripts/checkpatch.pl and fix reported warnings.
>>
> Do you mean warnings on "5441e9dafdfc6dc40fa" commit? Or on this patch?
>  
> I am running like this :  ./scripts/checkpatch.pl patch_file, it does not show any warnings.
> 
> or am I missing anything while running checkpatch on the current patch?

Eh, you're right... checkpatch does not catch it. You need to fix syntax
- drop quotes, use proper commit title:

https://elixir.bootlin.com/linux/v5.19-rc1/source/Documentation/process/submitting-patches.rst#L100

Best regards,
Krzysztof
  

Patch

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,