media: qcom: camss: Fix clock and IRQ configurations for 8775p platform
Subsystems (4)
cover media: qcom: camss: Fix clock and IRQ configurations for 8775p platform
This series contains two fixes for the Qualcomm Camera Subsystem driver on 8775p platform:
1. Fix CSID clock configuration and IRQ offset. Simplify the lite CSID clock requirements and correct the buffer done IRQ status offset calculation.
2. Add missing clocks for VFE lite instances.
---
Wenmeng Liu (2):
media: qcom: camss: Fix csid clock configuration and IRQ offset for 8775p
media: qcom: camss: Add missing clocks for VFE lite on 8775p
.../media/platform/qcom/camss/camss-csid-gen3.c | 6 +- drivers/media/platform/qcom/camss/camss.c | 80 ++++++++++++---------- 2 files changed, 45 insertions(+), 41 deletions(-)
---
base-commit: 5c9e55fecf9365890c64f14761a80f9413a3b1d1
change-id: 20260313-vfelite_fix-00a36e8dccfd
Best regards,
Signature · 1 line
Wenmeng Liu <[email protected]>
PATCH 1/2 media: qcom: camss: Fix csid clock configuration and IRQ offset for 8775p
Fix two issues in csid driver for 8775p platform:
1. Simplify clock configuration for csid lite by removing unused clocks and correcting clock rates. Only vfe_lite_csid and vfe_lite_cphy_rx clocks are actually needed.
2. Fix BUF_DONE_IRQ_STATUS_RDI_OFFSET calculation for csid lite on sa8775p platform. The offset should be 0 for csid lite on sa8775p,
--- .../media/platform/qcom/camss/camss-csid-gen3.c | 6 ++-- drivers/media/platform/qcom/camss/camss.c | 40 +++++++++------------- 2 files changed, 20 insertions(+), 26 deletions(-)
drivers/media/platform/qcom/camss/camss-csid-gen3.c +3 -3
@@ -48,9 +48,9 @@#define IS_CSID_690 (csid) ((csid->camss->res->version == CAMSS_8775P) \ || (csid->camss->res->version == CAMSS_8300))#define CSID_BUF_DONE_IRQ_STATUS 0x8C -#define BUF_DONE_IRQ_STATUS_RDI_OFFSET (csid_is_lite(csid) ?\ - 1 : (IS_CSID_690(csid) ?\ - 13 : 14)) +#define BUF_DONE_IRQ_STATUS_RDI_OFFSET (csid_is_lite(csid) ? \ + ((IS_CSID_690(csid) ? 0 : 1)) : \ + ((IS_CSID_690(csid) ? 13 : 14)))#define CSID_BUF_DONE_IRQ_MASK 0x90#define CSID_BUF_DONE_IRQ_CLEAR 0x94#define CSID_BUF_DONE_IRQ_SET 0x98
drivers/media/platform/qcom/camss/camss.c +17 -23
@@ -3598,9 +3598,11 @@ static const struct camss_subdev_resources csid_res_8775p[] = {/* CSID2 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", -"vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx" }, + .clock_rate = { + { 400000000, 480000000 }, + { 400000000, 480000000 } + }, .clock_rate = { { 0, 0, 400000000, 400000000, 0}, { 0, 0, 400000000, 480000000, 0}
@@ -3617,12 +3619,10 @@ static const struct camss_subdev_resources csid_res_8775p[] = {/* CSID3 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", -"vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx" }, .clock_rate = { - { 0, 0, 400000000, 400000000, 0}, - { 0, 0, 400000000, 480000000, 0} + { 400000000, 480000000 }, + { 400000000, 480000000 } }, .reg = { "csid_lite1" }, .interrupt = { "csid_lite1" },
@@ -3636,12 +3636,10 @@ static const struct camss_subdev_resources csid_res_8775p[] = {/* CSID4 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", -"vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx" }, .clock_rate = { - { 0, 0, 400000000, 400000000, 0}, - { 0, 0, 400000000, 480000000, 0} + { 400000000, 480000000 }, + { 400000000, 480000000 } }, .reg = { "csid_lite2" }, .interrupt = { "csid_lite2" },
@@ -3655,12 +3653,10 @@ static const struct camss_subdev_resources csid_res_8775p[] = {/* CSID5 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", -"vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx" }, .clock_rate = { - { 0, 0, 400000000, 400000000, 0}, - { 0, 0, 400000000, 480000000, 0} + { 400000000, 480000000 }, + { 400000000, 480000000 } }, .reg = { "csid_lite3" }, .interrupt = { "csid_lite3" },
@@ -3674,12 +3670,10 @@ static const struct camss_subdev_resources csid_res_8775p[] = {/* CSID6 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", -"vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx" }, .clock_rate = { - { 0, 0, 400000000, 400000000, 0}, - { 0, 0, 400000000, 480000000, 0} + { 400000000, 480000000 }, + { 400000000, 480000000 } }, .reg = { "csid_lite4" }, .interrupt = { "csid_lite4" },
Signature · 1 line
2.34.1
Bryan O'Donoghue
maintainerRe: [PATCH 1/2] media: qcom: camss: Fix csid clock configuration and IRQ offset for 8775p
Quoted 5 lines · Wenmeng Liu
Fix two issues in csid driver for 8775p platform:
1. Simplify clock configuration for csid lite by removing unused clocks and correcting clock rates. Only
vfe_lite_csidandvfe_lite_cphy_rxclocks are actually needed.
This should be its own patch and should that patch have a Fixes: ?
Simplification != fixing a bug.
Quoted 5 lines
2. Fix
BUF_DONE_IRQ_STATUS_RDI_OFFSETcalculation for csid lite on sa8775p platform. The offset should be 0 for csid lite on sa8775p,Fixes ed03e99de0fa ("media: qcom: camss: Add support for CSID 690")Signed-off-by Wenmeng Liu <[email protected]>
Yeah this should be standalone then.
My general rule here is if your patch requires line items to explain various things being done, then those line-items deserve their own patch.
---
bod
Re: [PATCH 1/2] media: qcom: camss: Fix csid clock configuration and IRQ offset for 8775p
Hi Bryan,
Quoted 10 lines · Bryan O'Donoghue
Quoted 5 lines · Wenmeng Liu
Fix two issues in csid driver for 8775p platform:
1. Simplify clock configuration for csid lite by removing unused clocks and correcting clock rates. Only
vfe_lite_csidandvfe_lite_cphy_rxclocks are actually needed.This should be its own patch and should that patch have a Fixes: ?
Simplification != fixing a bug.
Sure, There is also an issue with the clock here, I will also modify the description.
Quoted 10 lines
Quoted 6 lines
2. Fix
BUF_DONE_IRQ_STATUS_RDI_OFFSETcalculation for csid lite on sa8775p platform. The offset should be 0 for csid lite on sa8775p,Fixes ed03e99de0fa ("media: qcom: camss: Add support for CSID 690")Signed-off-by Wenmeng Liu <[email protected]>Yeah this should be standalone then.
My general rule here is if your patch requires line items to explain various things being done, then those line-items deserve their own patch.
ACK.
Quoted 3 lines
---
bod
Thanks,
Wenmeng
PATCH 2/2 media: qcom: camss: Add missing clocks for VFE lite on 8775p
In reply to Wenmeng LiuAdd missing required clocks (cpas_ahb and camnoc_axi) for VFE lite instances on 8775p platform. These clocks are necessary for proper VFE lite operation:
--- drivers/media/platform/qcom/camss/camss.c | 40 +++++++++++++++++++------------ 1 file changed, 25 insertions(+), 15 deletions(-)
drivers/media/platform/qcom/camss/camss.c +25 -15
@@ -3746,15 +3746,17 @@ static const struct camss_subdev_resources vfe_res_8775p[] = {/* VFE2 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", + .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb","vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + "vfe_lite", "camnoc_axi"}, .clock_rate = { - { 0, 0, 0, 0 }, + { 0 }, + { 0 }, { 300000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 480000000, 600000000, 600000000, 600000000 }, + { 400000000 }, }, .reg = { "vfe_lite0" }, .interrupt = { "vfe_lite0" },
@@ -3769,15 +3771,17 @@ static const struct camss_subdev_resources vfe_res_8775p[] = {/* VFE3 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", + .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb","vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + "vfe_lite", "camnoc_axi"}, .clock_rate = { - { 0, 0, 0, 0 }, + { 0 }, + { 0 }, { 300000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 480000000, 600000000, 600000000, 600000000 }, + { 400000000 }, }, .reg = { "vfe_lite1" }, .interrupt = { "vfe_lite1" },
@@ -3792,15 +3796,17 @@ static const struct camss_subdev_resources vfe_res_8775p[] = {/* VFE4 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", + .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb","vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + "vfe_lite", "camnoc_axi"}, .clock_rate = { - { 0, 0, 0, 0 }, + { 0 }, + { 0 }, { 300000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 480000000, 600000000, 600000000, 600000000 }, + { 400000000 }, }, .reg = { "vfe_lite2" }, .interrupt = { "vfe_lite2" },
@@ -3815,15 +3821,17 @@ static const struct camss_subdev_resources vfe_res_8775p[] = {/* VFE5 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", + .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb","vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + "vfe_lite", "camnoc_axi"}, .clock_rate = { - { 0, 0, 0, 0 }, + { 0 }, + { 0 }, { 300000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 480000000, 600000000, 600000000, 600000000 }, + { 400000000 }, }, .reg = { "vfe_lite3" }, .interrupt = { "vfe_lite3" },
@@ -3838,15 +3846,17 @@ static const struct camss_subdev_resources vfe_res_8775p[] = {/* VFE6 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", + .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb","vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + "vfe_lite", "camnoc_axi"}, .clock_rate = { - { 0, 0, 0, 0 }, + { 0 }, + { 0 }, { 300000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 480000000, 600000000, 600000000, 600000000 }, + { 400000000 }, }, .reg = { "vfe_lite4" }, .interrupt = { "vfe_lite4" },
Signature · 1 line
2.34.1
Re: [PATCH 2/2] media: qcom: camss: Add missing clocks for VFE lite on 8775p
Quoted 110 lines · Wenmeng Liu
Add missing required clocks (
cpas_ahbandcamnoc_axi) for VFE lite instances on 8775p platform. These clocks are necessary for proper VFE lite operation:Fixes e7b59e1d06fb ("media: qcom: camss: Add support for VFE 690")Signed-off-by Wenmeng Liu <[email protected]>--- drivers/media/platform/qcom/camss/camss.c | 40 +++++++++++++++++++------------ 1 file changed, 25 insertions(+), 15 deletions(-)drivers/media/platform/qcom/camss/camss.c +22
-15@@ -3746,15 +3746,17 @@ static const struct camss_subdev_resources vfe_res_8775p[] = {/* VFE2 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", + .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb","vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + "vfe_lite", "camnoc_axi"}, .clock_rate = { - { 0, 0, 0, 0 }, + { 0 }, + { 0 }, { 300000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 480000000, 600000000, 600000000, 600000000 }, + { 400000000 }, }, .reg = { "vfe_lite0" }, .interrupt = { "vfe_lite0" },@@ -3769,15 +3771,17 @@ static const struct camss_subdev_resources vfe_res_8775p[] = {/* VFE3 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", + .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb","vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + "vfe_lite", "camnoc_axi"}, .clock_rate = { - { 0, 0, 0, 0 }, + { 0 }, + { 0 }, { 300000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 480000000, 600000000, 600000000, 600000000 }, + { 400000000 }, }, .reg = { "vfe_lite1" }, .interrupt = { "vfe_lite1" },@@ -3792,15 +3796,17 @@ static const struct camss_subdev_resources vfe_res_8775p[] = {/* VFE4 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", + .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb","vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + "vfe_lite", "camnoc_axi"}, .clock_rate = { - { 0, 0, 0, 0 }, + { 0 }, + { 0 }, { 300000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 480000000, 600000000, 600000000, 600000000 }, + { 400000000 }, }, .reg = { "vfe_lite2" }, .interrupt = { "vfe_lite2" },@@ -3815,15 +3821,17 @@ static const struct camss_subdev_resources vfe_res_8775p[] = {/* VFE5 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", + .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb","vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + "vfe_lite", "camnoc_axi"}, .clock_rate = { - { 0, 0, 0, 0 }, + { 0 }, + { 0 }, { 300000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 480000000, 600000000, 600000000, 600000000 }, + { 400000000 }, }, .reg = { "vfe_lite3" }, .interrupt = { "vfe_lite3" },@@ -3838,15 +3846,17 @@ static const struct camss_subdev_resources vfe_res_8775p[] = {/* VFE6 (lite) */ { .regulators = {}, - .clock = { "cpas_vfe_lite", "vfe_lite_ahb", + .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb","vfe_lite_csid" ,"vfe_lite_cphy_rx" , - "vfe_lite"}, + "vfe_lite", "camnoc_axi"}, .clock_rate = { - { 0, 0, 0, 0 },
drivers/media/platform/qcom/camss/camss.c static const struct camss_subdev_resources vfe_res_8775p[] = { · line 3862
Quoted 10 lines
drivers/media/platform/qcom/camss/camss.c +3
-0+ { 0 }, + { 0 }, { 300000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 400000000, 400000000, 400000000, 400000000 }, { 480000000, 600000000, 600000000, 600000000 }, + { 400000000 }, }, .reg = { "vfe_lite4" }, .interrupt = { "vfe_lite4" },
---
bod