This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: subdev: Add debug prints to enable/disable_streams
Author:  Tomi Valkeinen <[email protected]>
Date:    Mon Jun 19 13:27:07 2023 +0200

It is often useful to see when streaming for a device is being enabled
or disabled. Add debug prints for this to v4l2_subdev_enable_streams()
and v4l2_subdev_disable_streams().

Signed-off-by: Tomi Valkeinen <[email protected]>
Reviewed-by: Jacopo Mondi <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/v4l2-core/v4l2-subdev.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

---

diff --git a/drivers/media/v4l2-core/v4l2-subdev.c 
b/drivers/media/v4l2-core/v4l2-subdev.c
index ec35e5a90cdf..b92348ad61f6 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -1989,11 +1989,16 @@ int v4l2_subdev_enable_streams(struct v4l2_subdev *sd, 
u32 pad,
                goto done;
        }
 
+       dev_dbg(dev, "enable streams %u:%#llx\n", pad, streams_mask);
+
        /* Call the .enable_streams() operation. */
        ret = v4l2_subdev_call(sd, pad, enable_streams, state, pad,
                               streams_mask);
-       if (ret)
+       if (ret) {
+               dev_dbg(dev, "enable streams %u:%#llx failed: %d\n", pad,
+                       streams_mask, ret);
                goto done;
+       }
 
        /* Mark the streams as enabled. */
        for (i = 0; i < state->stream_configs.num_configs; ++i) {
@@ -2101,11 +2106,16 @@ int v4l2_subdev_disable_streams(struct v4l2_subdev *sd, 
u32 pad,
                goto done;
        }
 
+       dev_dbg(dev, "disable streams %u:%#llx\n", pad, streams_mask);
+
        /* Call the .disable_streams() operation. */
        ret = v4l2_subdev_call(sd, pad, disable_streams, state, pad,
                               streams_mask);
-       if (ret)
+       if (ret) {
+               dev_dbg(dev, "disable streams %u:%#llx failed: %d\n", pad,
+                       streams_mask, ret);
                goto done;
+       }
 
        /* Mark the streams as disabled. */
        for (i = 0; i < state->stream_configs.num_configs; ++i) {

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to