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/v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:

- regression fix for the rtl28xxu I2C logic

- build fix for the atmel driver

- videobuf2-core: dequeue if start_streaming fails

* tag 'media/v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
media: atmel: fix build when ISC=m and XISC=y
media: videobuf2-core: dequeue if start_streaming fails
media: rtl28xxu: fix zero-length control request
media: Revert "media: rtl28xxu: fix zero-length control request"

+45 -6
+12 -1
drivers/media/common/videobuf2/videobuf2-core.c
··· 1573 1573 struct media_request *req) 1574 1574 { 1575 1575 struct vb2_buffer *vb; 1576 + enum vb2_buffer_state orig_state; 1576 1577 int ret; 1577 1578 1578 1579 if (q->error) { ··· 1674 1673 * Add to the queued buffers list, a buffer will stay on it until 1675 1674 * dequeued in dqbuf. 1676 1675 */ 1676 + orig_state = vb->state; 1677 1677 list_add_tail(&vb->queued_entry, &q->queued_list); 1678 1678 q->queued_count++; 1679 1679 q->waiting_for_buffers = false; ··· 1705 1703 if (q->streaming && !q->start_streaming_called && 1706 1704 q->queued_count >= q->min_buffers_needed) { 1707 1705 ret = vb2_start_streaming(q); 1708 - if (ret) 1706 + if (ret) { 1707 + /* 1708 + * Since vb2_core_qbuf will return with an error, 1709 + * we should return it to state DEQUEUED since 1710 + * the error indicates that the buffer wasn't queued. 1711 + */ 1712 + list_del(&vb->queued_entry); 1713 + q->queued_count--; 1714 + vb->state = orig_state; 1709 1715 return ret; 1716 + } 1710 1717 } 1711 1718 1712 1719 dprintk(q, 2, "qbuf of buffer %d succeeded\n", vb->index);
+8
drivers/media/platform/atmel/Kconfig
··· 8 8 select VIDEOBUF2_DMA_CONTIG 9 9 select REGMAP_MMIO 10 10 select V4L2_FWNODE 11 + select VIDEO_ATMEL_ISC_BASE 11 12 help 12 13 This module makes the ATMEL Image Sensor Controller available 13 14 as a v4l2 device. ··· 20 19 select VIDEOBUF2_DMA_CONTIG 21 20 select REGMAP_MMIO 22 21 select V4L2_FWNODE 22 + select VIDEO_ATMEL_ISC_BASE 23 23 help 24 24 This module makes the ATMEL eXtended Image Sensor Controller 25 25 available as a v4l2 device. 26 + 27 + config VIDEO_ATMEL_ISC_BASE 28 + tristate 29 + default n 30 + help 31 + ATMEL ISC and XISC common code base. 26 32 27 33 config VIDEO_ATMEL_ISI 28 34 tristate "ATMEL Image Sensor Interface (ISI) support"
+3 -2
drivers/media/platform/atmel/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - atmel-isc-objs = atmel-sama5d2-isc.o atmel-isc-base.o 3 - atmel-xisc-objs = atmel-sama7g5-isc.o atmel-isc-base.o 2 + atmel-isc-objs = atmel-sama5d2-isc.o 3 + atmel-xisc-objs = atmel-sama7g5-isc.o 4 4 5 5 obj-$(CONFIG_VIDEO_ATMEL_ISI) += atmel-isi.o 6 + obj-$(CONFIG_VIDEO_ATMEL_ISC_BASE) += atmel-isc-base.o 6 7 obj-$(CONFIG_VIDEO_ATMEL_ISC) += atmel-isc.o 7 8 obj-$(CONFIG_VIDEO_ATMEL_XISC) += atmel-xisc.o
+11
drivers/media/platform/atmel/atmel-isc-base.c
··· 378 378 379 379 return 0; 380 380 } 381 + EXPORT_SYMBOL_GPL(isc_clk_init); 381 382 382 383 void isc_clk_cleanup(struct isc_device *isc) 383 384 { ··· 393 392 clk_unregister(isc_clk->clk); 394 393 } 395 394 } 395 + EXPORT_SYMBOL_GPL(isc_clk_cleanup); 396 396 397 397 static int isc_queue_setup(struct vb2_queue *vq, 398 398 unsigned int *nbuffers, unsigned int *nplanes, ··· 1580 1578 1581 1579 return ret; 1582 1580 } 1581 + EXPORT_SYMBOL_GPL(isc_interrupt); 1583 1582 1584 1583 static void isc_hist_count(struct isc_device *isc, u32 *min, u32 *max) 1585 1584 { ··· 2215 2212 .unbind = isc_async_unbind, 2216 2213 .complete = isc_async_complete, 2217 2214 }; 2215 + EXPORT_SYMBOL_GPL(isc_async_ops); 2218 2216 2219 2217 void isc_subdev_cleanup(struct isc_device *isc) 2220 2218 { ··· 2228 2224 2229 2225 INIT_LIST_HEAD(&isc->subdev_entities); 2230 2226 } 2227 + EXPORT_SYMBOL_GPL(isc_subdev_cleanup); 2231 2228 2232 2229 int isc_pipeline_init(struct isc_device *isc) 2233 2230 { ··· 2269 2264 2270 2265 return 0; 2271 2266 } 2267 + EXPORT_SYMBOL_GPL(isc_pipeline_init); 2272 2268 2273 2269 /* regmap configuration */ 2274 2270 #define ATMEL_ISC_REG_MAX 0xd5c ··· 2279 2273 .val_bits = 32, 2280 2274 .max_register = ATMEL_ISC_REG_MAX, 2281 2275 }; 2276 + EXPORT_SYMBOL_GPL(isc_regmap_config); 2282 2277 2278 + MODULE_AUTHOR("Songjun Wu"); 2279 + MODULE_AUTHOR("Eugen Hristev"); 2280 + MODULE_DESCRIPTION("Atmel ISC common code base"); 2281 + MODULE_LICENSE("GPL v2");
+11 -3
drivers/media/usb/dvb-usb-v2/rtl28xxu.c
··· 37 37 } else { 38 38 /* read */ 39 39 requesttype = (USB_TYPE_VENDOR | USB_DIR_IN); 40 - pipe = usb_rcvctrlpipe(d->udev, 0); 40 + 41 + /* 42 + * Zero-length transfers must use usb_sndctrlpipe() and 43 + * rtl28xxu_identify_state() uses a zero-length i2c read 44 + * command to determine the chip type. 45 + */ 46 + if (req->size) 47 + pipe = usb_rcvctrlpipe(d->udev, 0); 48 + else 49 + pipe = usb_sndctrlpipe(d->udev, 0); 41 50 } 42 51 43 52 ret = usb_control_msg(d->udev, pipe, 0, requesttype, req->value, ··· 621 612 static int rtl28xxu_identify_state(struct dvb_usb_device *d, const char **name) 622 613 { 623 614 struct rtl28xxu_dev *dev = d_to_priv(d); 624 - u8 buf[1]; 625 615 int ret; 626 - struct rtl28xxu_req req_demod_i2c = {0x0020, CMD_I2C_DA_RD, 1, buf}; 616 + struct rtl28xxu_req req_demod_i2c = {0x0020, CMD_I2C_DA_RD, 0, NULL}; 627 617 628 618 dev_dbg(&d->intf->dev, "\n"); 629 619