mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
media updates for v4.2-rc1
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJVi+2qAAoJEAhfPr2O5OEVJdUP/2JzjQ17fswt4JCqXZRMjSZi ZZThdFY5Cirs4lKovigTsBwoFFf0nZ5ti+8MpbrglKUBRQTOwWXP/KrJt4hCCikD nkcEPkATqlhCYNqxI/6TgUgvVODmTO6PtLbWYpnW64zi9zq0FM4Ko1h+s8ynB91O UeDXbn00G2ifMo9BXuzyms+uW7f1LI0+Fqhwf3t9QrO8DTjjEU5Km9teUPMrJmgn rcfCrj4c3uDX4Wh4xe1DEs6T7Cf6qRKG5BLjwm6uNO3RMsZ5sA6tgCdE6FonhGrF Kvso2NCLQggZg6mgvMXoazYmaqxeeXsy06GBkmrQ9Xx6jo5z+nyJAWwVn7awdt7R 89CWWn9MRrjhG3QLiluacJaH/5Z+fULSe6Stg2AVqfQGy/EwE7N2BR1CqO0i4pbN PredVtT77wyuDfUg6cYgJNjhhCcSt2i71X5Wt42rCZMylTGg3vWq//RqLo7xReaz XC0uhrJRDnF02BMzwQftUa8+UTn8Ozb7OyV91DzmZq9njsVHLAyY5u5Q/Fye5buH 4Ejcjou3edVPMKu7aBtOt4Bmnwc03jBLTlMTdBMeHQugaj3aTP7G7EcX2UAGq4SK 2e5GaYyIaAvpiddhBJzSzzd8u+XtRynKtFvfWnR+wTnILC+w+nfM/PbthVlXNJZx 4sUv1XmWxbJT3T7wJ8xE =iJ/U -----END PGP SIGNATURE----- Merge tag 'media/v4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Lots of improvements at the DVB API DocBook documentation. Now, the frontend and the network APIs are fully in sync with the Kernel and looks more like the rest of the media documentation; - New frontend driver: cx24120 - New driver for a PCI device: cobalt. This driver is actually not sold in the market, but it is a good example of a multi-HDMI input device; - The dt3155 driver were promoted from staging; - The mantis driver got remote controller support; - New V4L2 driver for ST bdisp SoC chipsets; - Make sparse and smatch happier: several bugs were solved by fixing the issues reported by those static code analyzers. - Lots of new device additions, new features, improvements and cleanups at the existing drivers. * tag 'media/v4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (553 commits) [media] lmedm04: fix the range for relative measurements [media] lmedm04: use u32 instead of u64 for relative stats [media] omap3isp: remove unused var [media] saa7134: fix page size on some archs [media] use CONFIG_PM_SLEEP for suspend/resume [media] tuner-i2c: be consistent with I2C declaration [media] si470x: cleanup define namespace [media] bdisp: prevent compiling on random arch [media] vb2: Don't WARN when v4l2_buffer.bytesused is 0 for multiplanar buffers [media] MAINTAINERS: Add entry for the Renesas VSP1 driver [media] videodev2.h: fix copy-and-paste error in V4L2_MAP_XFER_FUNC_DEFAULT [media] Revert "[media] vb2: Push mmap_sem down to memops" [media] mantis: cleanup a warning [media] bdisp-debug: don't try to divide by s64 [media] cx88: don't declare restart_video_queue if not used [media] au0828: move dev->boards atribuition to happen earlier [media] lmedm04: implement dvb v5 statistics [media] bdisp: remove unused var [media] bdisp: remove needless check ts2020: fix compilation on i386 ...
This commit is contained in:
commit
5b4ca44477
571 changed files with 27333 additions and 10259 deletions
|
|
@ -980,8 +980,7 @@ config TOUCHSCREEN_SUN4I
|
|||
|
||||
config TOUCHSCREEN_SUR40
|
||||
tristate "Samsung SUR40 (Surface 2.0/PixelSense) touchscreen"
|
||||
depends on USB
|
||||
depends on MEDIA_USB_SUPPORT
|
||||
depends on USB && MEDIA_USB_SUPPORT && HAS_DMA
|
||||
select INPUT_POLLDEV
|
||||
select VIDEOBUF2_DMA_SG
|
||||
help
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ struct sur40_image_header {
|
|||
#define VIDEO_PACKET_SIZE 16384
|
||||
|
||||
/* polling interval (ms) */
|
||||
#define POLL_INTERVAL 10
|
||||
#define POLL_INTERVAL 4
|
||||
|
||||
/* maximum number of contacts FIXME: this is a guess? */
|
||||
#define MAX_CONTACTS 64
|
||||
|
|
@ -342,7 +342,7 @@ static void sur40_poll(struct input_polled_dev *polldev)
|
|||
* instead of at the end.
|
||||
*/
|
||||
if (packet_id != header->packet_id)
|
||||
dev_warn(sur40->dev, "packet ID mismatch\n");
|
||||
dev_dbg(sur40->dev, "packet ID mismatch\n");
|
||||
|
||||
packet_blobs = result / sizeof(struct sur40_blob);
|
||||
dev_dbg(sur40->dev, "received %d blobs\n", packet_blobs);
|
||||
|
|
@ -389,6 +389,8 @@ static void sur40_process_video(struct sur40_state *sur40)
|
|||
list_del(&new_buf->list);
|
||||
spin_unlock(&sur40->qlock);
|
||||
|
||||
dev_dbg(sur40->dev, "buffer acquired\n");
|
||||
|
||||
/* retrieve data via bulk read */
|
||||
result = usb_bulk_msg(sur40->usbdev,
|
||||
usb_rcvbulkpipe(sur40->usbdev, VIDEO_ENDPOINT),
|
||||
|
|
@ -416,6 +418,8 @@ static void sur40_process_video(struct sur40_state *sur40)
|
|||
goto err_poll;
|
||||
}
|
||||
|
||||
dev_dbg(sur40->dev, "header acquired\n");
|
||||
|
||||
sgt = vb2_dma_sg_plane_desc(&new_buf->vb, 0);
|
||||
|
||||
result = usb_sg_init(&sgr, sur40->usbdev,
|
||||
|
|
@ -432,11 +436,18 @@ static void sur40_process_video(struct sur40_state *sur40)
|
|||
goto err_poll;
|
||||
}
|
||||
|
||||
dev_dbg(sur40->dev, "image acquired\n");
|
||||
|
||||
/* return error if streaming was stopped in the meantime */
|
||||
if (sur40->sequence == -1)
|
||||
goto err_poll;
|
||||
|
||||
/* mark as finished */
|
||||
v4l2_get_timestamp(&new_buf->vb.v4l2_buf.timestamp);
|
||||
new_buf->vb.v4l2_buf.sequence = sur40->sequence++;
|
||||
new_buf->vb.v4l2_buf.field = V4L2_FIELD_NONE;
|
||||
vb2_buffer_done(&new_buf->vb, VB2_BUF_STATE_DONE);
|
||||
dev_dbg(sur40->dev, "buffer marked done\n");
|
||||
return;
|
||||
|
||||
err_poll:
|
||||
|
|
@ -716,6 +727,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);
|
||||
sur40->sequence = -1;
|
||||
|
||||
/* Release all active buffers */
|
||||
return_all_buffers(sur40, VB2_BUF_STATE_ERROR);
|
||||
|
|
@ -778,6 +790,33 @@ static int sur40_vidioc_enum_fmt(struct file *file, void *priv,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int sur40_vidioc_enum_framesizes(struct file *file, void *priv,
|
||||
struct v4l2_frmsizeenum *f)
|
||||
{
|
||||
if ((f->index != 0) || (f->pixel_format != V4L2_PIX_FMT_GREY))
|
||||
return -EINVAL;
|
||||
|
||||
f->type = V4L2_FRMSIZE_TYPE_DISCRETE;
|
||||
f->discrete.width = sur40_video_format.width;
|
||||
f->discrete.height = sur40_video_format.height;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sur40_vidioc_enum_frameintervals(struct file *file, void *priv,
|
||||
struct v4l2_frmivalenum *f)
|
||||
{
|
||||
if ((f->index > 1) || (f->pixel_format != V4L2_PIX_FMT_GREY)
|
||||
|| (f->width != sur40_video_format.width)
|
||||
|| (f->height != sur40_video_format.height))
|
||||
return -EINVAL;
|
||||
|
||||
f->type = V4L2_FRMIVAL_TYPE_DISCRETE;
|
||||
f->discrete.denominator = 60/(f->index+1);
|
||||
f->discrete.numerator = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static const struct usb_device_id sur40_table[] = {
|
||||
{ USB_DEVICE(ID_MICROSOFT, ID_SUR40) }, /* Samsung SUR40 */
|
||||
{ } /* terminating null entry */
|
||||
|
|
@ -829,6 +868,9 @@ static const struct v4l2_ioctl_ops sur40_video_ioctl_ops = {
|
|||
.vidioc_s_fmt_vid_cap = sur40_vidioc_fmt,
|
||||
.vidioc_g_fmt_vid_cap = sur40_vidioc_fmt,
|
||||
|
||||
.vidioc_enum_framesizes = sur40_vidioc_enum_framesizes,
|
||||
.vidioc_enum_frameintervals = sur40_vidioc_enum_frameintervals,
|
||||
|
||||
.vidioc_enum_input = sur40_vidioc_enum_input,
|
||||
.vidioc_g_input = sur40_vidioc_g_input,
|
||||
.vidioc_s_input = sur40_vidioc_s_input,
|
||||
|
|
|
|||
Loading…
Reference in a new issue