Re: [PATCH v4 6/6] media: qcom: camss: sm8250: set the camera NoC AXI rate from the VFE

From: Loic Poulain

Date: Wed Oct 28 2026 - 10:40:12 EST


On Wed, Oct 28, 2026 at 2:24 PM Atanas Filipov
<atanas.filipov@xxxxxxxxxxxxxxxx> wrote:
>
> The SM8250 VFE resources list both the camera NoC AXI RCG,
> camnoc_axi_src, and its camnoc_axi branch. The camnoc_axi_src levels
> are never applied, since vfe_match_clock_names() does not match that
> name, and they list 480 MHz, which the RCG does not support. The
> camnoc_axi branch has no rates, so the camera NoC runs from XO and two
> concurrent streams stall.
>
> Drop camnoc_axi_src, as the camnoc_axi branch keeps it enabled through
> its parent, and list the 300 and 400 MHz camera NoC AXI rates for the
> camnoc_axi branch, whose rate the VFE sets through the parent. The four
> VFEs share the camnoc_axi clock, so it runs at the highest rate
> requested by the running VFEs.
>
> Signed-off-by: Atanas Filipov <atanas.filipov@xxxxxxxxxxxxxxxx>

So, as previously discussed, we'll probably need a smarter AXI clock
scaling/aggregation scheme at some point, but for now this looks fine.

Reviewed-by: Loic Poulain <loic.poulain@xxxxxxxxxxxxxxxx>

> ---
> drivers/media/platform/qcom/camss/camss.c | 28 ++++++++++-------------
> 1 file changed, 12 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index 9e29b713288f..6c3e00e043eb 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
> @@ -2120,13 +2120,12 @@ static const struct camss_subdev_resources vfe_res_8250[] = {
> /* VFE0 */
> {
> .regulators = {},
> - .clock = { "camnoc_axi_src", "slow_ahb_src", "cpas_ahb",
> + .clock = { "slow_ahb_src", "cpas_ahb",
> "camnoc_axi", "vfe0_ahb", "vfe0_areg", "vfe0",
> "vfe0_axi", "cam_hf_axi" },
> - .clock_rate = { { 19200000, 300000000, 400000000, 480000000 },
> - { 19200000, 80000000 },
> + .clock_rate = { { 19200000, 80000000 },
> { 19200000 },
> - { 0 },
> + { 300000000, 400000000 },
> { 0 },
> { 400000000 },
> { 350000000, 475000000, 576000000, 720000000 },
> @@ -2146,13 +2145,12 @@ static const struct camss_subdev_resources vfe_res_8250[] = {
> /* VFE1 */
> {
> .regulators = {},
> - .clock = { "camnoc_axi_src", "slow_ahb_src", "cpas_ahb",
> + .clock = { "slow_ahb_src", "cpas_ahb",
> "camnoc_axi", "vfe1_ahb", "vfe1_areg", "vfe1",
> "vfe1_axi", "cam_hf_axi" },
> - .clock_rate = { { 19200000, 300000000, 400000000, 480000000 },
> - { 19200000, 80000000 },
> + .clock_rate = { { 19200000, 80000000 },
> { 19200000 },
> - { 0 },
> + { 300000000, 400000000 },
> { 0 },
> { 400000000 },
> { 350000000, 475000000, 576000000, 720000000 },
> @@ -2172,13 +2170,12 @@ static const struct camss_subdev_resources vfe_res_8250[] = {
> /* VFE2 (lite) */
> {
> .regulators = {},
> - .clock = { "camnoc_axi_src", "slow_ahb_src", "cpas_ahb",
> + .clock = { "slow_ahb_src", "cpas_ahb",
> "camnoc_axi", "vfe_lite_ahb", "vfe_lite_axi",
> "vfe_lite", "cam_hf_axi" },
> - .clock_rate = { { 19200000, 300000000, 400000000, 480000000 },
> - { 19200000, 80000000 },
> + .clock_rate = { { 19200000, 80000000 },
> { 19200000 },
> - { 0 },
> + { 300000000, 400000000 },
> { 0 },
> { 0 },
> { 400000000, 480000000 },
> @@ -2196,13 +2193,12 @@ static const struct camss_subdev_resources vfe_res_8250[] = {
> /* VFE3 (lite) */
> {
> .regulators = {},
> - .clock = { "camnoc_axi_src", "slow_ahb_src", "cpas_ahb",
> + .clock = { "slow_ahb_src", "cpas_ahb",
> "camnoc_axi", "vfe_lite_ahb", "vfe_lite_axi",
> "vfe_lite", "cam_hf_axi" },
> - .clock_rate = { { 19200000, 300000000, 400000000, 480000000 },
> - { 19200000, 80000000 },
> + .clock_rate = { { 19200000, 80000000 },
> { 19200000 },
> - { 0 },
> + { 300000000, 400000000 },
> { 0 },
> { 0 },
> { 400000000, 480000000 },
> --
> 2.34.1
>