mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
media updates for v4.8-rc1
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXlfJvAAoJEAhfPr2O5OEVtLUP/RpCQ+W3YVryIdmLkdmYXoY7 m2rXtUh7GmzBjaBkFzbRCGZtgROF7zl0e1R3nm4tLbCV4Becw8HO7YiMjqFJm9xr b6IngIyshsHf60Eii3RpLqUFvYrc/DDIMeYf8miwj/PvFAfI2BV9apraexJlpUuI wdyi28cfBHq4WYhubaXKoAyBQ8YRA/t8KNRAkDlifaOaMbSAxWHlmqoSmJWeQx73 KHkSvbRPu4Hjo3R6q/ab8VhqmXeSnbqnQB9lgnxz7AmAZGhOlMYeAhV/K2ZwbBH8 swv36RmJVO59Ov+vNR4p7GGGDL3+qk8JLj4LNVVfOcW0A+t7WrPQEmrL6VsyaZAy /+r4NEOcQN6Z5nFwbr3E0tYJ2Y5jFHOvsBfKd3EEGwty+hCl634akgb0vqtg06cg E2KG+XW983RBadVwEBnEudxJb0fWPWHGhXEqRrwOD+718FNmTqYM6dEvTEyxRup8 EtCLj+eQQ4LmAyZxWyE8A+keKoMFQlHqk9LN9vQ7t7Wxq9mQ+V2l12T/lN4VhdTq 4QZ4mrCMCGEvNcNzgSg6R/9lVb6RHDtMXZ3htbB/w+5xET/IKIANYyg1Hr7ahtdh rTW/4q6n3jtsu6tp5poteFvPzZKAblbrj2EptVzZYkonQ5BeAUisFTtneUL10Jmj EUf/sH0fqoOA0VvV6Tu+ =mrOW -----END PGP SIGNATURE----- Merge tag 'media/v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - new framework support for HDMI CEC and remote control support - new encoding codec driver for Mediatek SoC - new frontend driver: helene tuner - added support for NetUp almost universal devices, with supports DVB-C/S/S2/T/T2 and ISDB-T - the mn88472 frontend driver got promoted from staging - a new driver for RCar video input - some soc_camera legacy drivers got removed: timb, omap1, mx2, mx3 - lots of driver cleanups, improvements and fixups * tag 'media/v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (377 commits) [media] cec: always check all_device_types and features [media] cec: poll should check if there is room in the tx queue [media] vivid: support monitor all mode [media] cec: fix test for unconfigured adapter in main message loop [media] cec: limit the size of the transmit queue [media] cec: zero unused msg part after msg->len [media] cec: don't set fh to NULL in CEC_TRANSMIT [media] cec: clear all status fields before transmit and always fill in sequence [media] cec: CEC_RECEIVE overwrote the timeout field [media] cxd2841er: Reading SNR for DVB-C added [media] cxd2841er: Reading BER and UCB for DVB-C added [media] cxd2841er: fix switch-case for DVB-C [media] cxd2841er: fix signal strength scale for ISDB-T [media] cxd2841er: adjust the dB scale for DVB-C [media] cxd2841er: provide signal strength for DVB-C [media] cxd2841er: fix BER report via DVBv5 stats API [media] mb86a20s: apply mask to val after checking for read failure [media] airspy: fix error logic during device register [media] s5p-cec/TODO: add TODO item [media] cec/TODO: drop comment about sphinx documentation ...
This commit is contained in:
commit
9c1958fc32
446 changed files with 28775 additions and 11176 deletions
|
|
@ -126,7 +126,7 @@ struct sur40_image_header {
|
|||
#define VIDEO_PACKET_SIZE 16384
|
||||
|
||||
/* polling interval (ms) */
|
||||
#define POLL_INTERVAL 4
|
||||
#define POLL_INTERVAL 1
|
||||
|
||||
/* maximum number of contacts FIXME: this is a guess? */
|
||||
#define MAX_CONTACTS 64
|
||||
|
|
@ -151,7 +151,6 @@ struct sur40_state {
|
|||
struct mutex lock;
|
||||
|
||||
struct vb2_queue queue;
|
||||
struct vb2_alloc_ctx *alloc_ctx;
|
||||
struct list_head buf_list;
|
||||
spinlock_t qlock;
|
||||
int sequence;
|
||||
|
|
@ -448,7 +447,7 @@ static void sur40_process_video(struct sur40_state *sur40)
|
|||
|
||||
/* return error if streaming was stopped in the meantime */
|
||||
if (sur40->sequence == -1)
|
||||
goto err_poll;
|
||||
return;
|
||||
|
||||
/* mark as finished */
|
||||
new_buf->vb.vb2_buf.timestamp = ktime_get_ns();
|
||||
|
|
@ -580,19 +579,13 @@ static int sur40_probe(struct usb_interface *interface,
|
|||
sur40->queue = sur40_queue;
|
||||
sur40->queue.drv_priv = sur40;
|
||||
sur40->queue.lock = &sur40->lock;
|
||||
sur40->queue.dev = sur40->dev;
|
||||
|
||||
/* initialize the queue */
|
||||
error = vb2_queue_init(&sur40->queue);
|
||||
if (error)
|
||||
goto err_unreg_v4l2;
|
||||
|
||||
sur40->alloc_ctx = vb2_dma_sg_init_ctx(sur40->dev);
|
||||
if (IS_ERR(sur40->alloc_ctx)) {
|
||||
dev_err(sur40->dev, "Can't allocate buffer context");
|
||||
error = PTR_ERR(sur40->alloc_ctx);
|
||||
goto err_unreg_v4l2;
|
||||
}
|
||||
|
||||
sur40->vdev = sur40_video_device;
|
||||
sur40->vdev.v4l2_dev = &sur40->v4l2;
|
||||
sur40->vdev.lock = &sur40->lock;
|
||||
|
|
@ -633,7 +626,6 @@ static void sur40_disconnect(struct usb_interface *interface)
|
|||
|
||||
video_unregister_device(&sur40->vdev);
|
||||
v4l2_device_unregister(&sur40->v4l2);
|
||||
vb2_dma_sg_cleanup_ctx(sur40->alloc_ctx);
|
||||
|
||||
input_unregister_polled_device(sur40->input);
|
||||
input_free_polled_device(sur40->input);
|
||||
|
|
@ -653,13 +645,10 @@ static void sur40_disconnect(struct usb_interface *interface)
|
|||
*/
|
||||
static int sur40_queue_setup(struct vb2_queue *q,
|
||||
unsigned int *nbuffers, unsigned int *nplanes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
unsigned int sizes[], struct device *alloc_devs[])
|
||||
{
|
||||
struct sur40_state *sur40 = vb2_get_drv_priv(q);
|
||||
|
||||
if (q->num_buffers + *nbuffers < 3)
|
||||
*nbuffers = 3 - q->num_buffers;
|
||||
alloc_ctxs[0] = sur40->alloc_ctx;
|
||||
|
||||
if (*nplanes)
|
||||
return sizes[0] < sur40_video_format.sizeimage ? -EINVAL : 0;
|
||||
|
|
@ -736,6 +725,7 @@ static int sur40_start_streaming(struct vb2_queue *vq, unsigned int count)
|
|||
static void sur40_stop_streaming(struct vb2_queue *vq)
|
||||
{
|
||||
struct sur40_state *sur40 = vb2_get_drv_priv(vq);
|
||||
vb2_wait_for_all_buffers(vq);
|
||||
sur40->sequence = -1;
|
||||
|
||||
/* Release all active buffers */
|
||||
|
|
@ -793,7 +783,6 @@ static int sur40_vidioc_enum_fmt(struct file *file, void *priv,
|
|||
{
|
||||
if (f->index != 0)
|
||||
return -EINVAL;
|
||||
strlcpy(f->description, "8-bit greyscale", sizeof(f->description));
|
||||
f->pixelformat = V4L2_PIX_FMT_GREY;
|
||||
f->flags = 0;
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue