[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240802152435.35796-3-jorcrous@amazon.com>
Date: Fri, 2 Aug 2024 15:24:34 +0000
From: Jordan Crouse <jorcrous@...zon.com>
To: <linux-media@...r.kernel.org>
CC: Bryan O'Donoghue <bryan.odonoghue@...aro.org>, Mauro Carvalho Chehab
<mchehab@...nel.org>, Robert Foss <rfoss@...nel.org>, Todor Tomov
<todor.too@...il.com>, <linux-arm-msm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH v1 2/2] media: camss: Avoid overwriting vfe clock rates for 8250
On sm8250 targets both the csid and vfe subsystems share a number of
clocks. Commit b4436a18eedb ("media: camss: add support for SM8250 camss")
reorganized the initialization sequence so that VFE gets initialized first
but a side effect of that was that the CSID subsystem came in after and
overwrites the set frequencies on the shared clocks.
Empty the frequency tables for the shared clocks in the CSID resources so
they won't overwrite the clock rates that the VFE has already set.
Signed-off-by: Jordan Crouse <jorcrous@...zon.com>
---
drivers/media/platform/qcom/camss/camss.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index 51b1d3550421..d78644c3ebe9 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -915,6 +915,15 @@ static const struct camss_subdev_resources csiphy_res_8250[] = {
}
};
+/*
+ * Both CSID and VFE use some of the same vfe clocks and both
+ * should prepare/enable them but only the VFE subsystem should be in charge
+ * of setting the clock rates.
+ *
+ * Set the frequency tables for those clocks in the CSID resources to
+ * be empty so the csid subsystem doesn't overwrite the clock rates that the
+ * VFE already set.
+ */
static const struct camss_subdev_resources csid_res_8250[] = {
/* CSID0 */
{
@@ -922,8 +931,8 @@ static const struct camss_subdev_resources csid_res_8250[] = {
.clock = { "vfe0_csid", "vfe0_cphy_rx", "vfe0", "vfe0_areg", "vfe0_ahb" },
.clock_rate = { { 400000000 },
{ 400000000 },
- { 350000000, 475000000, 576000000, 720000000 },
- { 100000000, 200000000, 300000000, 400000000 },
+ { 0 },
+ { 0 },
{ 0 } },
.reg = { "csid0" },
.interrupt = { "csid0" },
@@ -939,8 +948,8 @@ static const struct camss_subdev_resources csid_res_8250[] = {
.clock = { "vfe1_csid", "vfe1_cphy_rx", "vfe1", "vfe1_areg", "vfe1_ahb" },
.clock_rate = { { 400000000 },
{ 400000000 },
- { 350000000, 475000000, 576000000, 720000000 },
- { 100000000, 200000000, 300000000, 400000000 },
+ { 0 },
+ { 0 },
{ 0 } },
.reg = { "csid1" },
.interrupt = { "csid1" },
@@ -956,7 +965,7 @@ static const struct camss_subdev_resources csid_res_8250[] = {
.clock = { "vfe_lite_csid", "vfe_lite_cphy_rx", "vfe_lite", "vfe_lite_ahb" },
.clock_rate = { { 400000000 },
{ 400000000 },
- { 400000000, 480000000 },
+ { 0 },
{ 0 } },
.reg = { "csid2" },
.interrupt = { "csid2" },
@@ -973,7 +982,7 @@ static const struct camss_subdev_resources csid_res_8250[] = {
.clock = { "vfe_lite_csid", "vfe_lite_cphy_rx", "vfe_lite", "vfe_lite_ahb" },
.clock_rate = { { 400000000 },
{ 400000000 },
- { 400000000, 480000000 },
+ { 0 },
{ 0 } },
.reg = { "csid3" },
.interrupt = { "csid3" },
--
2.40.1
Powered by blists - more mailing lists