Skip to contentSkip to conversation

media: platform: rpi1-cfe: fix pad in call to get_mbus_config()

PATCH Superseded Cosmin Tanislav 2 participants 3 messages Feb 25, 2025 – Apr 3, 2025

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: platform: rpi1-cfe: fix pad in call to get_mbus_config()

The source subdevice might be using a source pad not equal to 0.

Use the already existing source_pad field of cfe.

Fixes e7bad98c205d ("media: v4l: Convert the users of v4l2_get_link_freq to call it on a pad")
---
 drivers/media/platform/raspberrypi/rp1-cfe/cfe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c +2 -2
index 69a5f23e7954..7db4fe5e0fd4 100644
@@ -1206,8 +1206,8 @@ static int cfe_start_streaming(struct vb2_queue *vq, unsigned int count)
 	cfg_reg_write(cfe, MIPICFG_INTE,
 		      MIPICFG_INT_CSI_DMA | MIPICFG_INT_PISP_FE);
 
-	ret = v4l2_subdev_call(cfe->source_sd, pad, get_mbus_config, 0,
-			       &mbus_config);
+	ret = v4l2_subdev_call(cfe->source_sd, pad, get_mbus_config,
+			       cfe->source_pad, &mbus_config);
 	if (ret < 0 && ret != -ENOIOCTLCMD) {
 		cfe_err(cfe, "g_mbus_config failed\n");
 		goto err_clear_inte;
Signature · 1 line
2.48.1
#1 lore raw
Quoted 5 lines · Cosmin Tanislav

The source subdevice might be using a source pad not equal to 0.

Use the already existing source_pad field of cfe.

Fixes e7bad98c205d ("media: v4l: Convert the users of v4l2_get_link_freq to call it on a pad")

I used the wrong Fixes tag, this is the correct one:

Fixes 6edb685abb2a ("media: raspberrypi: Add support for RP1-CFE")
Quoted 20 lines
---
  drivers/media/platform/raspberrypi/rp1-cfe/cfe.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c +2 -2
index 69a5f23e7954..7db4fe5e0fd4 100644
@@ -1206,8 +1206,8 @@ static int cfe_start_streaming(struct vb2_queue *vq, unsigned int count)
  	cfg_reg_write(cfe, MIPICFG_INTE,
  		      MIPICFG_INT_CSI_DMA | MIPICFG_INT_PISP_FE);
 
-	ret = v4l2_subdev_call(cfe->source_sd, pad, get_mbus_config, 0,
-			       &mbus_config);
+	ret = v4l2_subdev_call(cfe->source_sd, pad, get_mbus_config,
+			       cfe->source_pad, &mbus_config);
  	if (ret < 0 && ret != -ENOIOCTLCMD) {
  		cfe_err(cfe, "g_mbus_config failed\n");
  		goto err_clear_inte;
maintainer Reviewed-by
#2 lore raw

Hi,

Quoted 17 lines · Cosmin Tanislav
Quoted 5 lines · Cosmin Tanislav

The source subdevice might be using a source pad not equal to 0.

Use the already existing source_pad field of cfe.

Fixes e7bad98c205d ("media: v4l: Convert the users of v4l2_get_link_freq to call it on a pad")

I used the wrong Fixes tag, this is the correct one:

Fixes 6edb685abb2a ("media: raspberrypi: Add support for RP1-CFE")
Quoted 5 lines

---
  drivers/media/platform/raspberrypi/rp1-cfe/cfe.c | 4 ++--

  1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 16 lines
Quoted 5 lines
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c +0 -0
index 69a5f23e7954..7db4fe5e0fd4 100644

drivers/media/platform/raspberrypi/rp1-cfe/cfe.c static int cfe_start_streaming(struct vb2_queue · line 1213

Quoted 10 lines
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c +2 -2
@@ -1206,8 +1206,8 @@ static int cfe_start_streaming(struct vb2_queue 
 *vq, unsigned int count)
       cfg_reg_write(cfe, MIPICFG_INTE,
                 MIPICFG_INT_CSI_DMA | MIPICFG_INT_PISP_FE);
-    ret = v4l2_subdev_call(cfe->source_sd, pad, get_mbus_config, 0,
-                   &mbus_config);
+    ret = v4l2_subdev_call(cfe->source_sd, pad, get_mbus_config,
+                   cfe->source_pad, &mbus_config);
       if (ret < 0 && ret != -ENOIOCTLCMD) {
           cfe_err(cfe, "g_mbus_config failed\n");
           goto err_clear_inte;

Please send a v2 with corrected description.

Tomi