]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
[media] v4l: Add pad-level DV timings subdev operations
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 29 Jan 2014 13:05:10 +0000 (10:05 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 25 May 2014 15:37:57 +0000 (12:37 -0300)
The dv_timings_cap and enum_dv_timings subdev operations are implemented
at the device level, but apply to pads. Create new variants of those
operations at the pad level. The device level variants will be removed
once all drivers are ported to the pad level DT timings operations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
include/media/v4l2-subdev.h
include/uapi/linux/videodev2.h

index dd5bbbe2d56a100af0d72f72457c4b457220e9af..9fab013eea86fa6de72b0e38f3694eba96d4848a 100644 (file)
@@ -517,6 +517,10 @@ struct v4l2_subdev_pad_ops {
                             struct v4l2_subdev_selection *sel);
        int (*get_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid);
        int (*set_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid);
+       int (*dv_timings_cap)(struct v4l2_subdev *sd,
+                             struct v4l2_dv_timings_cap *cap);
+       int (*enum_dv_timings)(struct v4l2_subdev *sd,
+                              struct v4l2_enum_dv_timings *timings);
 #ifdef CONFIG_MEDIA_CONTROLLER
        int (*link_validate)(struct v4l2_subdev *sd, struct media_link *link,
                             struct v4l2_subdev_format *source_fmt,
index 00259d2baa101dd197c7fe76231c8a5b0d958b90..168ff507bf75a6d2d8abcfb5162c79c02feb1678 100644 (file)
@@ -1106,12 +1106,15 @@ struct v4l2_dv_timings {
 
 /** struct v4l2_enum_dv_timings - DV timings enumeration
  * @index:     enumeration index
+ * @pad:       the pad number for which to enumerate timings (used with
+ *             v4l-subdev nodes only)
  * @reserved:  must be zeroed
  * @timings:   the timings for the given index
  */
 struct v4l2_enum_dv_timings {
        __u32 index;
-       __u32 reserved[3];
+       __u32 pad;
+       __u32 reserved[2];
        struct v4l2_dv_timings timings;
 };
 
@@ -1149,11 +1152,14 @@ struct v4l2_bt_timings_cap {
 
 /** struct v4l2_dv_timings_cap - DV timings capabilities
  * @type:      the type of the timings (same as in struct v4l2_dv_timings)
+ * @pad:       the pad number for which to query capabilities (used with
+ *             v4l-subdev nodes only)
  * @bt:                the BT656/1120 timings capabilities
  */
 struct v4l2_dv_timings_cap {
        __u32 type;
-       __u32 reserved[3];
+       __u32 pad;
+       __u32 reserved[2];
        union {
                struct v4l2_bt_timings_cap bt;
                __u32 raw_data[32];