History

media: v4l: subdev: Add len_routes field to struct v4l2_subdev_routing

The len_routes field is used to tell the size of the routes array in struct v4l2_subdev_routing. This way the number of routes returned from S_ROUTING IOCTL may be larger than the number of routes provided, in case there are more routes returned by the driver. Note that this uAPI is still disabled in the code, so this change can safely be done. Anyone who manually patched the code to enable this uAPI must update their code. The patch also increases the number of reserved fields in struct v4l2_subdev_routing.

Sakari Ailus committed 3 years ago

Commit 83a22a01 parent 38c84935 files · +49 −25Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/v4l2-subdev.h+7−3
@@ -228,15 +228,19 @@ struct v4l2_subdev_route { · 227 unmodified lines
228228 * struct v4l2_subdev_routing - Subdev routing information
229229 *
230230 * @which: configuration type (from enum v4l2_subdev_format_whence)
231− * @num_routes: the total number of routes in the routes array
231+ * @len_routes: the length of the routes array, in routes; set by the user, not
232+ * modified by the kernel
232233 * @routes: pointer to the routes array
234+ * @num_routes: the total number of routes, possibly more than fits in the
235+ * routes array
233236 * @reserved: drivers and applications must zero this array
234237 */
235238 struct v4l2_subdev_routing {
236239 __u32 which;
237− __u32 num_routes;
240+ __u32 len_routes;
238241 __u64 routes;
239− __u32 reserved[6];
242+ __u32 num_routes;
243+ __u32 reserved[11];
240244 };
241245
242246 /*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t