History

Merge tag 'media/v4.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab: - several fixes for new drivers added for Kernel 4.8 addition (cec core, pulse8 cec driver and Mediatek vcodec) - a regression fix for cx23885 and saa7134 drivers - an important fix for rcar-fcp, making rcar_fcp_enable() return 0 on success * tag 'media/v4.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (25 commits) [media] cx23885/saa7134: assign q->dev to the PCI device [media] rcar-fcp: Make sure rcar_fcp_enable() returns 0 on success [media] cec: fix ioctl return code when not registered [media] cec: don't Feature Abort broadcast msgs when unregistered [media] vcodec:mediatek: Refine VP8 encoder driver [media] vcodec:mediatek: Refine H264 encoder driver [media] vcodec:mediatek: change H264 profile default to profile high [media] vcodec:mediatek: Add timestamp and timecode copy for V4L2 Encoder [media] vcodec:mediatek: Fix visible_height larger than coded_height issue in s_fmt_out [media] vcodec:mediatek: Fix fops_vcodec_release flow for V4L2 Encoder [media] vcodec:mediatek:code refine for v4l2 Encoder driver [media] cec-funcs.h: add missing vendor-specific messages [media] cec-edid: check for IEEE identifier [media] pulse8-cec: fix error handling [media] pulse8-cec: set correct Signal Free Time [media] mtk-vcodec: add HAS_DMA dependency [media] cec: ignore messages when log_addr_mask == 0 [media] cec: add item to TODO [media] cec: set unclaimed addresses to CEC_LOG_ADDR_INVALID [media] cec: add CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK flag ...

Linus Torvalds committed 10 years ago

Commit b1f2beb2 parents f887c21 d8feef922 files · +212 −78Browse files

Showing the changes to include/linux (2 of 22 files). Show all

Unified · Split

2 files
  1. include/linux/cec-funcs.h +75 −3
  2. include/linux/cec.h +4 −1
include/linux/cec-funcs.h+75−3
@@ -162,10 +162,11 @@ static inline void cec_msg_standby(struct cec_msg *msg) · 161 unmodified lines
162 162
163 163
164/* One Touch Record Feature */164/* One Touch Record Feature */
165static inline void cec_msg_record_off(struct cec_msg *msg)165static inline void cec_msg_record_off(struct cec_msg *msg, bool reply)
166{166{
167 msg->len = 2;167 msg->len = 2;
168 msg->msg[1] = CEC_MSG_RECORD_OFF;168 msg->msg[1] = CEC_MSG_RECORD_OFF;
169 msg->reply = reply ? CEC_MSG_RECORD_STATUS : 0;
169}170}
170 171
171struct cec_op_arib_data {172struct cec_op_arib_data {
@@ -227,7 +228,7 @@ static inline void cec_set_digital_service_id(__u8 *msg, · 55 unmodified lines
227 if (digital->service_id_method == CEC_OP_SERVICE_ID_METHOD_BY_CHANNEL) {228 if (digital->service_id_method == CEC_OP_SERVICE_ID_METHOD_BY_CHANNEL) {
228 *msg++ = (digital->channel.channel_number_fmt << 2) |229 *msg++ = (digital->channel.channel_number_fmt << 2) |
229 (digital->channel.major >> 8);230 (digital->channel.major >> 8);
230 *msg++ = digital->channel.major && 0xff;231 *msg++ = digital->channel.major & 0xff;
231 *msg++ = digital->channel.minor >> 8;232 *msg++ = digital->channel.minor >> 8;
232 *msg++ = digital->channel.minor & 0xff;233 *msg++ = digital->channel.minor & 0xff;
233 *msg++ = 0;234 *msg++ = 0;
@@ -323,6 +324,7 @@ static inline void cec_msg_record_on_phys_addr(struct cec_msg *msg, · 89 unmodified lines
323}324}
324 325
325static inline void cec_msg_record_on(struct cec_msg *msg,326static inline void cec_msg_record_on(struct cec_msg *msg,
327 bool reply,
326 const struct cec_op_record_src *rec_src)328 const struct cec_op_record_src *rec_src)
327{329{
328 switch (rec_src->type) {330 switch (rec_src->type) {
@@ -346,6 +348,7 @@ static inline void cec_msg_record_on(struct cec_msg *msg, · 17 unmodified lines
346 rec_src->ext_phys_addr.phys_addr);348 rec_src->ext_phys_addr.phys_addr);
347 break;349 break;
348 }350 }
351 msg->reply = reply ? CEC_MSG_RECORD_STATUS : 0;
349}352}
350 353
351static inline void cec_ops_record_on(const struct cec_msg *msg,354static inline void cec_ops_record_on(const struct cec_msg *msg,
@@ -1141,6 +1144,75 @@ static inline void cec_msg_give_device_vendor_id(struct cec_msg *msg, · 789 unmodified lines
1141 msg->reply = reply ? CEC_MSG_DEVICE_VENDOR_ID : 0;1144 msg->reply = reply ? CEC_MSG_DEVICE_VENDOR_ID : 0;
1142}1145}
1143 1146
1147static inline void cec_msg_vendor_command(struct cec_msg *msg,
1148 __u8 size, const __u8 *vendor_cmd)
1149{
1150 if (size > 14)
1151 size = 14;
1152 msg->len = 2 + size;
1153 msg->msg[1] = CEC_MSG_VENDOR_COMMAND;
1154 memcpy(msg->msg + 2, vendor_cmd, size);
1155}
1156
1157static inline void cec_ops_vendor_command(const struct cec_msg *msg,
1158 __u8 *size,
1159 const __u8 **vendor_cmd)
1160{
1161 *size = msg->len - 2;
1162
1163 if (*size > 14)
1164 *size = 14;
1165 *vendor_cmd = msg->msg + 2;
1166}
1167
1168static inline void cec_msg_vendor_command_with_id(struct cec_msg *msg,
1169 __u32 vendor_id, __u8 size,
1170 const __u8 *vendor_cmd)
1171{
1172 if (size > 11)
1173 size = 11;
1174 msg->len = 5 + size;
1175 msg->msg[1] = CEC_MSG_VENDOR_COMMAND_WITH_ID;
1176 msg->msg[2] = vendor_id >> 16;
1177 msg->msg[3] = (vendor_id >> 8) & 0xff;
1178 msg->msg[4] = vendor_id & 0xff;
1179 memcpy(msg->msg + 5, vendor_cmd, size);
1180}
1181
1182static inline void cec_ops_vendor_command_with_id(const struct cec_msg *msg,
1183 __u32 *vendor_id, __u8 *size,
1184 const __u8 **vendor_cmd)
1185{
1186 *size = msg->len - 5;
1187
1188 if (*size > 11)
1189 *size = 11;
1190 *vendor_id = (msg->msg[2] << 16) | (msg->msg[3] << 8) | msg->msg[4];
1191 *vendor_cmd = msg->msg + 5;
1192}
1193
1194static inline void cec_msg_vendor_remote_button_down(struct cec_msg *msg,
1195 __u8 size,
1196 const __u8 *rc_code)
1197{
1198 if (size > 14)
1199 size = 14;
1200 msg->len = 2 + size;
1201 msg->msg[1] = CEC_MSG_VENDOR_REMOTE_BUTTON_DOWN;
1202 memcpy(msg->msg + 2, rc_code, size);
1203}
1204
1205static inline void cec_ops_vendor_remote_button_down(const struct cec_msg *msg,
1206 __u8 *size,
1207 const __u8 **rc_code)
1208{
1209 *size = msg->len - 2;
1210
1211 if (*size > 14)
1212 *size = 14;
1213 *rc_code = msg->msg + 2;
1214}
1215
1144static inline void cec_msg_vendor_remote_button_up(struct cec_msg *msg)1216static inline void cec_msg_vendor_remote_button_up(struct cec_msg *msg)
1145{1217{
1146 msg->len = 2;1218 msg->len = 2;
@@ -1277,7 +1349,7 @@ static inline void cec_msg_user_control_pressed(struct cec_msg *msg, · 130 unmodified lines
1277 msg->len += 4;1349 msg->len += 4;
1278 msg->msg[3] = (ui_cmd->channel_identifier.channel_number_fmt << 2) |1350 msg->msg[3] = (ui_cmd->channel_identifier.channel_number_fmt << 2) |
1279 (ui_cmd->channel_identifier.major >> 8);1351 (ui_cmd->channel_identifier.major >> 8);
1280 msg->msg[4] = ui_cmd->channel_identifier.major && 0xff;1352 msg->msg[4] = ui_cmd->channel_identifier.major & 0xff;
1281 msg->msg[5] = ui_cmd->channel_identifier.minor >> 8;1353 msg->msg[5] = ui_cmd->channel_identifier.minor >> 8;
1282 msg->msg[6] = ui_cmd->channel_identifier.minor & 0xff;1354 msg->msg[6] = ui_cmd->channel_identifier.minor & 0xff;
1283 break;1355 break;
include/linux/cec.h+4−1
@@ -364,7 +364,7 @@ struct cec_caps { · 363 unmodified lines
364 * @num_log_addrs: how many logical addresses should be claimed. Set by the364 * @num_log_addrs: how many logical addresses should be claimed. Set by the
365 * caller.365 * caller.
366 * @vendor_id: the vendor ID of the device. Set by the caller.366 * @vendor_id: the vendor ID of the device. Set by the caller.
367 * @flags: set to 0.367 * @flags: flags.
368 * @osd_name: the OSD name of the device. Set by the caller.368 * @osd_name: the OSD name of the device. Set by the caller.
369 * @primary_device_type: the primary device type for each logical address.369 * @primary_device_type: the primary device type for each logical address.
370 * Set by the caller.370 * Set by the caller.
@@ -389,6 +389,9 @@ struct cec_log_addrs { · 18 unmodified lines
389 __u8 features[CEC_MAX_LOG_ADDRS][12];389 __u8 features[CEC_MAX_LOG_ADDRS][12];
390};390};
391 391
392/* Allow a fallback to unregistered */
393#define CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK (1 << 0)
394
392/* Events */395/* Events */
393 396
394/* Event that occurs when the adapter state changes */397/* Event that occurs when the adapter state changes */

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