History

Merge tag 'media/v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab: - uAPI documentation for stateless decoders - Added a new CEC ioctl together with its documentation - Improved IPU3 documentation - New i2c drivers: hi556 and imx290 - Added support on Vivid driver for meta streams - Added de-interlace support for sunxi subdriver - Added a few new remote controler keymaps - Added H.265 support for Sunxi Cedrus driver - Another round of random driver cleanups, fixes and improvements * tag 'media/v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (361 commits) media: Revert "media: mtk-vcodec: Remove extra area allocation in an input buffer on encoding" media: hantro: Set H264 FIELDPIC_FLAG_E flag correctly media: hantro: Remove now unused H264 pic_size media: hantro: Use output buffer width and height for H264 decoding media: hantro: Reduce H264 extra space for motion vectors media: hantro: Fix H264 motion vector buffer offset media: ti-vpe: vpe: fix compatible to match bindings media: dt-bindings: media: ti-vpe: Document VPE driver media: zr364xx: remove redundant assigmnent to idx, clean up code media: Documentation: media: *_DEFAULT targets for subdevs media: hantro: Fix s_fmt for dynamic resolution changes media: i2c: Use the correct style for SPDX License Identifier media: siano: Use the correct style for SPDX License Identifier media: vicodec: media_device_cleanup was called too early media: vim2m: media_device_cleanup was called too early media: cedrus: Increase maximum supported size media: cedrus: Fix H264 4k support media: cedrus: Properly signal size in mode register media: v4l2-ctrl: Lock main_hdl on operations of requests_queued. media: si470x-i2c: add missed operations in remove ...

Linus Torvalds committed 6 years ago

Commit 89d57dd2 parents 3f1b210 0ca40f4299 files · +12846 −4720Browse files

Showing the changes to include/uapi/linux (4 of 299 files). Show all

Unified · Split

4 files
  1. include/uapi/linux/cec-funcs.h +18 −16
  2. include/uapi/linux/cec.h +131 −2
  3. include/uapi/linux/v4l2-controls.h +1 −0
  4. include/uapi/linux/videodev2.h +17 −5
include/uapi/linux/cec-funcs.h+18−16
@@ -923,7 +923,8 @@ static inline void cec_msg_give_deck_status(struct cec_msg *msg, · 922 unmodified lines
923923 msg->len = 3;
924924 msg->msg[1] = CEC_MSG_GIVE_DECK_STATUS;
925925 msg->msg[2] = status_req;
926− msg->reply = reply ? CEC_MSG_DECK_STATUS : 0;
926+ msg->reply = (reply && status_req != CEC_OP_STATUS_REQ_OFF) ?
927+ CEC_MSG_DECK_STATUS : 0;
927928 }
928929
929930 static inline void cec_ops_give_deck_status(const struct cec_msg *msg,
@@ -1027,7 +1028,8 @@ static inline void cec_msg_give_tuner_device_status(struct cec_msg *msg, · 97 unmodified lines
10271028 msg->len = 3;
10281029 msg->msg[1] = CEC_MSG_GIVE_TUNER_DEVICE_STATUS;
10291030 msg->msg[2] = status_req;
1030− msg->reply = reply ? CEC_MSG_TUNER_DEVICE_STATUS : 0;
1031+ msg->reply = (reply && status_req != CEC_OP_STATUS_REQ_OFF) ?
1032+ CEC_MSG_TUNER_DEVICE_STATUS : 0;
10311033 }
10321034
10331035 static inline void cec_ops_give_tuner_device_status(const struct cec_msg *msg,
@@ -1302,17 +1304,17 @@ static inline void cec_msg_user_control_pressed(struct cec_msg *msg, · 268 unmodified lines
13021304 if (!ui_cmd->has_opt_arg)
13031305 return;
13041306 switch (ui_cmd->ui_cmd) {
1305− case 0x56:
1306− case 0x57:
1307− case 0x60:
1308− case 0x68:
1309− case 0x69:
1310− case 0x6a:
1307+ case CEC_OP_UI_CMD_SELECT_BROADCAST_TYPE:
1308+ case CEC_OP_UI_CMD_SELECT_SOUND_PRESENTATION:
1309+ case CEC_OP_UI_CMD_PLAY_FUNCTION:
1310+ case CEC_OP_UI_CMD_SELECT_MEDIA_FUNCTION:
1311+ case CEC_OP_UI_CMD_SELECT_AV_INPUT_FUNCTION:
1312+ case CEC_OP_UI_CMD_SELECT_AUDIO_INPUT_FUNCTION:
13111313 /* The optional operand is one byte for all these ui commands */
13121314 msg->len++;
13131315 msg->msg[3] = ui_cmd->play_mode;
13141316 break;
1315− case 0x67:
1317+ case CEC_OP_UI_CMD_TUNE_FUNCTION:
13161318 msg->len += 4;
13171319 msg->msg[3] = (ui_cmd->channel_identifier.channel_number_fmt << 2) |
13181320 (ui_cmd->channel_identifier.major >> 8);
@@ -1331,17 +1333,17 @@ static inline void cec_ops_user_control_pressed(const struct cec_msg *msg, · 12 unmodified lines
13311333 if (msg->len == 3)
13321334 return;
13331335 switch (ui_cmd->ui_cmd) {
1334− case 0x56:
1335− case 0x57:
1336− case 0x60:
1337− case 0x68:
1338− case 0x69:
1339− case 0x6a:
1336+ case CEC_OP_UI_CMD_SELECT_BROADCAST_TYPE:
1337+ case CEC_OP_UI_CMD_SELECT_SOUND_PRESENTATION:
1338+ case CEC_OP_UI_CMD_PLAY_FUNCTION:
1339+ case CEC_OP_UI_CMD_SELECT_MEDIA_FUNCTION:
1340+ case CEC_OP_UI_CMD_SELECT_AV_INPUT_FUNCTION:
1341+ case CEC_OP_UI_CMD_SELECT_AUDIO_INPUT_FUNCTION:
13401342 /* The optional operand is one byte for all these ui commands */
13411343 ui_cmd->play_mode = msg->msg[3];
13421344 ui_cmd->has_opt_arg = 1;
13431345 break;
1344− case 0x67:
1346+ case CEC_OP_UI_CMD_TUNE_FUNCTION:
13451347 if (msg->len < 7)
13461348 break;
13471349 ui_cmd->has_opt_arg = 1;
include/uapi/linux/cec.h+131−2
@@ -317,6 +317,8 @@ static inline int cec_is_unconfigured(__u16 log_addr_mask) · 316 unmodified lines
317317 #define CEC_CAP_NEEDS_HPD (1 << 6)
318318 /* Hardware can monitor CEC pin transitions */
319319 #define CEC_CAP_MONITOR_PIN (1 << 7)
320+/* CEC_ADAP_G_CONNECTOR_INFO is available */
321+#define CEC_CAP_CONNECTOR_INFO (1 << 8)
320322
321323 /**
322324 * struct cec_caps - CEC capabilities structure.
@@ -375,6 +377,34 @@ struct cec_log_addrs { · 52 unmodified lines
375377 /* CDC-Only device: supports only CDC messages */
376378 #define CEC_LOG_ADDRS_FL_CDC_ONLY (1 << 2)
377379
380+/**
381+ * struct cec_drm_connector_info - tells which drm connector is
382+ * associated with the CEC adapter.
383+ * @card_no: drm card number
384+ * @connector_id: drm connector ID
385+ */
386+struct cec_drm_connector_info {
387+ __u32 card_no;
388+ __u32 connector_id;
389+};
390+
391+#define CEC_CONNECTOR_TYPE_NO_CONNECTOR 0
392+#define CEC_CONNECTOR_TYPE_DRM 1
393+
394+/**
395+ * struct cec_connector_info - tells if and which connector is
396+ * associated with the CEC adapter.
397+ * @type: connector type (if any)
398+ * @drm: drm connector info
399+ */
400+struct cec_connector_info {
401+ __u32 type;
402+ union {
403+ struct cec_drm_connector_info drm;
404+ __u32 raw[16];
405+ };
406+};
407+
378408 /* Events */
379409
380410 /* Event that occurs when the adapter state changes */
@@ -398,10 +428,17 @@ struct cec_log_addrs { · 17 unmodified lines
398428 * struct cec_event_state_change - used when the CEC adapter changes state.
399429 * @phys_addr: the current physical address
400430 * @log_addr_mask: the current logical address mask
431+ * @have_conn_info: if non-zero, then HDMI connector information is available.
432+ * This field is only valid if CEC_CAP_CONNECTOR_INFO is set. If that
433+ * capability is set and @have_conn_info is zero, then that indicates
434+ * that the HDMI connector device is not instantiated, either because
435+ * the HDMI driver is still configuring the device or because the HDMI
436+ * device was unbound.
401437 */
402438 struct cec_event_state_change {
403439 __u16 phys_addr;
404440 __u16 log_addr_mask;
441+ __u16 have_conn_info;
405442 };
406443
407444 /**
@@ -476,6 +513,9 @@ struct cec_event { · 68 unmodified lines
476513 #define CEC_G_MODE _IOR('a', 8, __u32)
477514 #define CEC_S_MODE _IOW('a', 9, __u32)
478515
516+/* Get the connector info */
517+#define CEC_ADAP_G_CONNECTOR_INFO _IOR('a', 10, struct cec_connector_info)
518+
479519 /*
480520 * The remainder of this header defines all CEC messages and operands.
481521 * The format matters since it the cec-ctl utility parses it to generate
@@ -768,8 +808,8 @@ struct cec_event { · 286 unmodified lines
768808 #define CEC_MSG_SELECT_DIGITAL_SERVICE 0x93
769809 #define CEC_MSG_TUNER_DEVICE_STATUS 0x07
770810 /* Recording Flag Operand (rec_flag) */
771−#define CEC_OP_REC_FLAG_USED 0
772−#define CEC_OP_REC_FLAG_NOT_USED 1
811+#define CEC_OP_REC_FLAG_NOT_USED 0
812+#define CEC_OP_REC_FLAG_USED 1
773813 /* Tuner Display Info Operand (tuner_display_info) */
774814 #define CEC_OP_TUNER_DISPLAY_INFO_DIGITAL 0
775815 #define CEC_OP_TUNER_DISPLAY_INFO_NONE 1
@@ -820,6 +860,95 @@ struct cec_event { · 44 unmodified lines
820860 #define CEC_OP_MENU_STATE_DEACTIVATED 0x01
821861
822862 #define CEC_MSG_USER_CONTROL_PRESSED 0x44
863+/* UI Command Operand (ui_cmd) */
864+#define CEC_OP_UI_CMD_SELECT 0x00
865+#define CEC_OP_UI_CMD_UP 0x01
866+#define CEC_OP_UI_CMD_DOWN 0x02
867+#define CEC_OP_UI_CMD_LEFT 0x03
868+#define CEC_OP_UI_CMD_RIGHT 0x04
869+#define CEC_OP_UI_CMD_RIGHT_UP 0x05
870+#define CEC_OP_UI_CMD_RIGHT_DOWN 0x06
871+#define CEC_OP_UI_CMD_LEFT_UP 0x07
872+#define CEC_OP_UI_CMD_LEFT_DOWN 0x08
873+#define CEC_OP_UI_CMD_DEVICE_ROOT_MENU 0x09
874+#define CEC_OP_UI_CMD_DEVICE_SETUP_MENU 0x0a
875+#define CEC_OP_UI_CMD_CONTENTS_MENU 0x0b
876+#define CEC_OP_UI_CMD_FAVORITE_MENU 0x0c
877+#define CEC_OP_UI_CMD_BACK 0x0d
878+#define CEC_OP_UI_CMD_MEDIA_TOP_MENU 0x10
879+#define CEC_OP_UI_CMD_MEDIA_CONTEXT_SENSITIVE_MENU 0x11
880+#define CEC_OP_UI_CMD_NUMBER_ENTRY_MODE 0x1d
881+#define CEC_OP_UI_CMD_NUMBER_11 0x1e
882+#define CEC_OP_UI_CMD_NUMBER_12 0x1f
883+#define CEC_OP_UI_CMD_NUMBER_0_OR_NUMBER_10 0x20
884+#define CEC_OP_UI_CMD_NUMBER_1 0x21
885+#define CEC_OP_UI_CMD_NUMBER_2 0x22
886+#define CEC_OP_UI_CMD_NUMBER_3 0x23
887+#define CEC_OP_UI_CMD_NUMBER_4 0x24
888+#define CEC_OP_UI_CMD_NUMBER_5 0x25
889+#define CEC_OP_UI_CMD_NUMBER_6 0x26
890+#define CEC_OP_UI_CMD_NUMBER_7 0x27
891+#define CEC_OP_UI_CMD_NUMBER_8 0x28
892+#define CEC_OP_UI_CMD_NUMBER_9 0x29
893+#define CEC_OP_UI_CMD_DOT 0x2a
894+#define CEC_OP_UI_CMD_ENTER 0x2b
895+#define CEC_OP_UI_CMD_CLEAR 0x2c
896+#define CEC_OP_UI_CMD_NEXT_FAVORITE 0x2f
897+#define CEC_OP_UI_CMD_CHANNEL_UP 0x30
898+#define CEC_OP_UI_CMD_CHANNEL_DOWN 0x31
899+#define CEC_OP_UI_CMD_PREVIOUS_CHANNEL 0x32
900+#define CEC_OP_UI_CMD_SOUND_SELECT 0x33
901+#define CEC_OP_UI_CMD_INPUT_SELECT 0x34
902+#define CEC_OP_UI_CMD_DISPLAY_INFORMATION 0x35
903+#define CEC_OP_UI_CMD_HELP 0x36
904+#define CEC_OP_UI_CMD_PAGE_UP 0x37
905+#define CEC_OP_UI_CMD_PAGE_DOWN 0x38
906+#define CEC_OP_UI_CMD_POWER 0x40
907+#define CEC_OP_UI_CMD_VOLUME_UP 0x41
908+#define CEC_OP_UI_CMD_VOLUME_DOWN 0x42
909+#define CEC_OP_UI_CMD_MUTE 0x43
910+#define CEC_OP_UI_CMD_PLAY 0x44
911+#define CEC_OP_UI_CMD_STOP 0x45
912+#define CEC_OP_UI_CMD_PAUSE 0x46
913+#define CEC_OP_UI_CMD_RECORD 0x47
914+#define CEC_OP_UI_CMD_REWIND 0x48
915+#define CEC_OP_UI_CMD_FAST_FORWARD 0x49
916+#define CEC_OP_UI_CMD_EJECT 0x4a
917+#define CEC_OP_UI_CMD_SKIP_FORWARD 0x4b
918+#define CEC_OP_UI_CMD_SKIP_BACKWARD 0x4c
919+#define CEC_OP_UI_CMD_STOP_RECORD 0x4d
920+#define CEC_OP_UI_CMD_PAUSE_RECORD 0x4e
921+#define CEC_OP_UI_CMD_ANGLE 0x50
922+#define CEC_OP_UI_CMD_SUB_PICTURE 0x51
923+#define CEC_OP_UI_CMD_VIDEO_ON_DEMAND 0x52
924+#define CEC_OP_UI_CMD_ELECTRONIC_PROGRAM_GUIDE 0x53
925+#define CEC_OP_UI_CMD_TIMER_PROGRAMMING 0x54
926+#define CEC_OP_UI_CMD_INITIAL_CONFIGURATION 0x55
927+#define CEC_OP_UI_CMD_SELECT_BROADCAST_TYPE 0x56
928+#define CEC_OP_UI_CMD_SELECT_SOUND_PRESENTATION 0x57
929+#define CEC_OP_UI_CMD_AUDIO_DESCRIPTION 0x58
930+#define CEC_OP_UI_CMD_INTERNET 0x59
931+#define CEC_OP_UI_CMD_3D_MODE 0x5a
932+#define CEC_OP_UI_CMD_PLAY_FUNCTION 0x60
933+#define CEC_OP_UI_CMD_PAUSE_PLAY_FUNCTION 0x61
934+#define CEC_OP_UI_CMD_RECORD_FUNCTION 0x62
935+#define CEC_OP_UI_CMD_PAUSE_RECORD_FUNCTION 0x63
936+#define CEC_OP_UI_CMD_STOP_FUNCTION 0x64
937+#define CEC_OP_UI_CMD_MUTE_FUNCTION 0x65
938+#define CEC_OP_UI_CMD_RESTORE_VOLUME_FUNCTION 0x66
939+#define CEC_OP_UI_CMD_TUNE_FUNCTION 0x67
940+#define CEC_OP_UI_CMD_SELECT_MEDIA_FUNCTION 0x68
941+#define CEC_OP_UI_CMD_SELECT_AV_INPUT_FUNCTION 0x69
942+#define CEC_OP_UI_CMD_SELECT_AUDIO_INPUT_FUNCTION 0x6a
943+#define CEC_OP_UI_CMD_POWER_TOGGLE_FUNCTION 0x6b
944+#define CEC_OP_UI_CMD_POWER_OFF_FUNCTION 0x6c
945+#define CEC_OP_UI_CMD_POWER_ON_FUNCTION 0x6d
946+#define CEC_OP_UI_CMD_F1_BLUE 0x71
947+#define CEC_OP_UI_CMD_F2_RED 0x72
948+#define CEC_OP_UI_CMD_F3_GREEN 0x73
949+#define CEC_OP_UI_CMD_F4_YELLOW 0x74
950+#define CEC_OP_UI_CMD_F5 0x75
951+#define CEC_OP_UI_CMD_DATA 0x76
823952 /* UI Broadcast Type Operand (ui_bcast_type) */
824953 #define CEC_OP_UI_BCAST_TYPE_TOGGLE_ALL 0x00
825954 #define CEC_OP_UI_BCAST_TYPE_TOGGLE_DIG_ANA 0x01
include/uapi/linux/v4l2-controls.h+1−0
@@ -1034,6 +1034,7 @@ enum v4l2_jpeg_chroma_subsampling { · 1033 unmodified lines
10341034 #define V4L2_CID_TEST_PATTERN_GREENR (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5)
10351035 #define V4L2_CID_TEST_PATTERN_BLUE (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)
10361036 #define V4L2_CID_TEST_PATTERN_GREENB (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)
1037+#define V4L2_CID_UNIT_CELL_SIZE (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8)
10371038
10381039
10391040 /* Image processing controls */
include/uapi/linux/videodev2.h+17−5
@@ -422,6 +422,11 @@ struct v4l2_fract { · 421 unmodified lines
422422 __u32 denominator;
423423 };
424424
425+struct v4l2_area {
426+ __u32 width;
427+ __u32 height;
428+};
429+
425430 /**
426431 * struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP
427432 *
@@ -755,6 +760,7 @@ struct v4l2_pix_format { · 327 unmodified lines
755760 #define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */
756761 #define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */
757762 #define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */
763+#define V4L2_META_FMT_VIVID v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */
758764
759765 /* priv field value to indicates that subsequent fields are valid. */
760766 #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
@@ -915,11 +921,12 @@ struct v4l2_requestbuffers { · 154 unmodified lines
915921 };
916922
917923 /* capabilities for struct v4l2_requestbuffers and v4l2_create_buffers */
918−#define V4L2_BUF_CAP_SUPPORTS_MMAP (1 << 0)
919−#define V4L2_BUF_CAP_SUPPORTS_USERPTR (1 << 1)
920−#define V4L2_BUF_CAP_SUPPORTS_DMABUF (1 << 2)
921−#define V4L2_BUF_CAP_SUPPORTS_REQUESTS (1 << 3)
922−#define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)
924+#define V4L2_BUF_CAP_SUPPORTS_MMAP (1 << 0)
925+#define V4L2_BUF_CAP_SUPPORTS_USERPTR (1 << 1)
926+#define V4L2_BUF_CAP_SUPPORTS_DMABUF (1 << 2)
927+#define V4L2_BUF_CAP_SUPPORTS_REQUESTS (1 << 3)
928+#define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)
929+#define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF (1 << 5)
923930
924931 /**
925932 * struct v4l2_plane - plane info for multi-planar buffers
@@ -1041,6 +1048,8 @@ static inline __u64 v4l2_timeval_to_ns(const struct timeval *tv) · 115 unmodified lines
10411048 #define V4L2_BUF_FLAG_IN_REQUEST 0x00000080
10421049 /* timecode field is valid */
10431050 #define V4L2_BUF_FLAG_TIMECODE 0x00000100
1051+/* Don't return the capture buffer until OUTPUT timestamp changes */
1052+#define V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF 0x00000200
10441053 /* Buffer is prepared for queuing */
10451054 #define V4L2_BUF_FLAG_PREPARED 0x00000400
10461055 /* Cache handling flags */
@@ -1675,6 +1684,7 @@ struct v4l2_ext_control { · 628 unmodified lines
16751684 __u8 __user *p_u8;
16761685 __u16 __user *p_u16;
16771686 __u32 __user *p_u32;
1687+ struct v4l2_area __user *p_area;
16781688 void __user *ptr;
16791689 };
16801690 } __attribute__ ((packed));
@@ -1720,6 +1730,7 @@ enum v4l2_ctrl_type { · 39 unmodified lines
17201730 V4L2_CTRL_TYPE_U8 = 0x0100,
17211731 V4L2_CTRL_TYPE_U16 = 0x0101,
17221732 V4L2_CTRL_TYPE_U32 = 0x0102,
1733+ V4L2_CTRL_TYPE_AREA = 0x0106,
17231734 };
17241735
17251736 /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
@@ -1975,6 +1986,7 @@ struct v4l2_encoder_cmd { · 249 unmodified lines
19751986 #define V4L2_DEC_CMD_STOP (1)
19761987 #define V4L2_DEC_CMD_PAUSE (2)
19771988 #define V4L2_DEC_CMD_RESUME (3)
1989+#define V4L2_DEC_CMD_FLUSH (4)
19781990
19791991 /* Flags for V4L2_DEC_CMD_START */
19801992 #define V4L2_DEC_CMD_START_MUTE_AUDIO (1 << 0)

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