Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'media/v6.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
"Some driver fixes:
- a regression fix for the verisilicon driver
- uvcvideo: don't expose unsupported video formats to userspace
- camss-video: don't zero subdev format after init
- mediatek: some fixes for 4K decoder formats
- fix a Sphinx build warning (missing doc for client_caps)
- some fixes for imx and atomisp staging drivers

And two CEC core fixes:
- don't set last_initiator if TX in progress
- disable adapter in cec_devnode_unregister"

* tag 'media/v6.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
media: uvcvideo: Don't expose unsupported formats to userspace
media: v4l2-subdev: Fix missing kerneldoc for client_caps
media: staging: media: imx: initialize hs_settle to avoid warning
media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad()
media: staging: media: atomisp: init high & low vars
media: cec: core: don't set last_initiator if tx in progress
media: cec: core: disable adapter in cec_devnode_unregister
media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats
media: camss: camss-video: Don't zero subdev format again after initialization
media: verisilicon: Additional fix for the crash when opening the driver

+32 -15
+6 -2
drivers/media/cec/core/cec-adap.c
··· 1091 1091 mutex_lock(&adap->lock); 1092 1092 dprintk(2, "%s: %*ph\n", __func__, msg->len, msg->msg); 1093 1093 1094 - adap->last_initiator = 0xff; 1094 + if (!adap->transmit_in_progress) 1095 + adap->last_initiator = 0xff; 1095 1096 1096 1097 /* Check if this message was for us (directed or broadcast). */ 1097 1098 if (!cec_msg_is_broadcast(msg)) { ··· 1586 1585 * 1587 1586 * This function is called with adap->lock held. 1588 1587 */ 1589 - static int cec_adap_enable(struct cec_adapter *adap) 1588 + int cec_adap_enable(struct cec_adapter *adap) 1590 1589 { 1591 1590 bool enable; 1592 1591 int ret = 0; ··· 1595 1594 adap->log_addrs.num_log_addrs; 1596 1595 if (adap->needs_hpd) 1597 1596 enable = enable && adap->phys_addr != CEC_PHYS_ADDR_INVALID; 1597 + 1598 + if (adap->devnode.unregistered) 1599 + enable = false; 1598 1600 1599 1601 if (enable == adap->is_enabled) 1600 1602 return 0;
+2
drivers/media/cec/core/cec-core.c
··· 191 191 mutex_lock(&adap->lock); 192 192 __cec_s_phys_addr(adap, CEC_PHYS_ADDR_INVALID, false); 193 193 __cec_s_log_addrs(adap, NULL, false); 194 + // Disable the adapter (since adap->devnode.unregistered is true) 195 + cec_adap_enable(adap); 194 196 mutex_unlock(&adap->lock); 195 197 196 198 cdev_device_del(&devnode->cdev, &devnode->dev);
+1
drivers/media/cec/core/cec-priv.h
··· 47 47 void cec_monitor_pin_cnt_dec(struct cec_adapter *adap); 48 48 int cec_adap_status(struct seq_file *file, void *priv); 49 49 int cec_thread_func(void *_adap); 50 + int cec_adap_enable(struct cec_adapter *adap); 50 51 void __cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block); 51 52 int __cec_s_log_addrs(struct cec_adapter *adap, 52 53 struct cec_log_addrs *log_addrs, bool block);
+3
drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c
··· 584 584 585 585 if (!(ctx->dev->dec_capability & VCODEC_CAPABILITY_4K_DISABLED)) { 586 586 for (i = 0; i < num_supported_formats; i++) { 587 + if (mtk_video_formats[i].type != MTK_FMT_DEC) 588 + continue; 589 + 587 590 mtk_video_formats[i].frmsize.max_width = 588 591 VCODEC_DEC_4K_CODED_WIDTH; 589 592 mtk_video_formats[i].frmsize.max_height =
-1
drivers/media/platform/qcom/camss/camss-video.c
··· 353 353 if (subdev == NULL) 354 354 return -EPIPE; 355 355 356 - memset(&fmt, 0, sizeof(fmt)); 357 356 fmt.pad = pad; 358 357 359 358 ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt);
+4 -2
drivers/media/platform/verisilicon/hantro_v4l2.c
··· 397 397 if (!raw_vpu_fmt) 398 398 return -EINVAL; 399 399 400 - if (ctx->is_encoder) 400 + if (ctx->is_encoder) { 401 401 encoded_fmt = &ctx->dst_fmt; 402 - else 402 + ctx->vpu_src_fmt = raw_vpu_fmt; 403 + } else { 403 404 encoded_fmt = &ctx->src_fmt; 405 + } 404 406 405 407 hantro_reset_fmt(&raw_fmt, raw_vpu_fmt); 406 408 raw_fmt.width = encoded_fmt->width;
+11 -5
drivers/media/usb/uvc/uvc_driver.c
··· 251 251 /* Find the format descriptor from its GUID. */ 252 252 fmtdesc = uvc_format_by_guid(&buffer[5]); 253 253 254 - if (fmtdesc != NULL) { 255 - format->fcc = fmtdesc->fcc; 256 - } else { 254 + if (!fmtdesc) { 255 + /* 256 + * Unknown video formats are not fatal errors, the 257 + * caller will skip this descriptor. 258 + */ 257 259 dev_info(&streaming->intf->dev, 258 260 "Unknown video format %pUl\n", &buffer[5]); 259 - format->fcc = 0; 261 + return 0; 260 262 } 261 263 264 + format->fcc = fmtdesc->fcc; 262 265 format->bpp = buffer[21]; 263 266 264 267 /* ··· 678 675 interval = (u32 *)&frame[nframes]; 679 676 680 677 streaming->format = format; 681 - streaming->nformats = nformats; 678 + streaming->nformats = 0; 682 679 683 680 /* Parse the format descriptors. */ 684 681 while (buflen > 2 && buffer[1] == USB_DT_CS_INTERFACE) { ··· 692 689 &interval, buffer, buflen); 693 690 if (ret < 0) 694 691 goto error; 692 + if (!ret) 693 + break; 695 694 695 + streaming->nformats++; 696 696 frame += format->nframes; 697 697 format++; 698 698
+1 -2
drivers/media/v4l2-core/v4l2-mc.c
··· 314 314 { 315 315 struct fwnode_handle *endpoint; 316 316 317 - if (!(sink->flags & MEDIA_PAD_FL_SINK) || 318 - !is_media_entity_v4l2_subdev(sink->entity)) 317 + if (!(sink->flags & MEDIA_PAD_FL_SINK)) 319 318 return -EINVAL; 320 319 321 320 fwnode_graph_for_each_endpoint(dev_fwnode(src_sd->dev), endpoint) {
+2 -2
drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
··· 373 373 static int ov2680_detect(struct i2c_client *client) 374 374 { 375 375 struct i2c_adapter *adapter = client->adapter; 376 - u32 high, low; 376 + u32 high = 0, low = 0; 377 377 int ret; 378 378 u16 id; 379 379 u8 revision; ··· 383 383 384 384 ret = ov_read_reg8(client, OV2680_SC_CMMN_CHIP_ID_H, &high); 385 385 if (ret) { 386 - dev_err(&client->dev, "sensor_id_high = 0x%x\n", high); 386 + dev_err(&client->dev, "sensor_id_high read failed (%d)\n", ret); 387 387 return -ENODEV; 388 388 } 389 389 ret = ov_read_reg8(client, OV2680_SC_CMMN_CHIP_ID_L, &low);
+1 -1
drivers/staging/media/imx/imx8mq-mipi-csi2.c
··· 354 354 struct v4l2_subdev_state *sd_state) 355 355 { 356 356 int ret; 357 - u32 hs_settle; 357 + u32 hs_settle = 0; 358 358 359 359 ret = imx8mq_mipi_csi_sw_reset(state); 360 360 if (ret)
+1
include/media/v4l2-subdev.h
··· 1119 1119 * @vfh: pointer to &struct v4l2_fh 1120 1120 * @state: pointer to &struct v4l2_subdev_state 1121 1121 * @owner: module pointer to the owner of this file handle 1122 + * @client_caps: bitmask of ``V4L2_SUBDEV_CLIENT_CAP_*`` 1122 1123 */ 1123 1124 struct v4l2_subdev_fh { 1124 1125 struct v4l2_fh vfh;