Skip to content

Commit 0bb005a

Browse files
Sakari Ailushverkuil
authored andcommitted
media: v4l2-subdev: Add debug prints to v4l2_subdev_collect_streams()
Print streams found by v4l2_subdev_collect_streams() at debug level. This could be useful in debugging drivers, userspace programs or the framework itself. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
1 parent f986916 commit 0bb005a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/media/v4l2-core/v4l2-subdev.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2233,6 +2233,9 @@ static void v4l2_subdev_collect_streams(struct v4l2_subdev *sd,
22332233
*found_streams = BIT_ULL(0);
22342234
*enabled_streams =
22352235
(sd->enabled_pads & BIT_ULL(pad)) ? BIT_ULL(0) : 0;
2236+
dev_dbg(sd->dev,
2237+
"collect_streams: sub-device \"%s\" does not support streams\n",
2238+
sd->entity.name);
22362239
return;
22372240
}
22382241

@@ -2250,6 +2253,10 @@ static void v4l2_subdev_collect_streams(struct v4l2_subdev *sd,
22502253
if (cfg->enabled)
22512254
*enabled_streams |= BIT_ULL(cfg->stream);
22522255
}
2256+
2257+
dev_dbg(sd->dev,
2258+
"collect_streams: \"%s\":%u: found %#llx enabled %#llx\n",
2259+
sd->entity.name, pad, *found_streams, *enabled_streams);
22532260
}
22542261

22552262
static void v4l2_subdev_set_streams_enabled(struct v4l2_subdev *sd,

0 commit comments

Comments
 (0)