mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
media updates for v4.8-rc1
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXoxLYAAoJEAhfPr2O5OEVZJgP/A6/98y7RgBXKr7gSgw3tgrw LohxiFq7PbOR4z5cKY1hJVxlEeRakDw+R1Xr0Sd2HhjoHYhQajJZrP+IvBr4tpVd dL+C8qtNlVNbg1sfdKgdsM1oPwQVW3Nr5GBoEq+HttJMnD4nBc1N6LxrNP3imhGZ JpEHJ9L+Bl7+4i4tF1r3K3ZHiQJ7sWYJcXno+To4ckUn4Obg30msk6dmYa8yD0ok Oc2hSX8rXHPATh43nXKz6+pLFgvl+J2vOxmZJ8rC/tXXU7TKfS7jTsUAJcoc1SW9 3qHpStPmzScG1qNgSI051xhl0uO2zxFa51oPwFT2fVgoX7x80rzpX2RI/QInoEFP T73y/vRyX1zDlnKsk/pn5kpyYIWdPGAIJ9sO3vM4Yxyjb78yyRVWi+1H2R6tn/+z hl11as2J3z+Vw6ShG0AJaCUFc7UmWKflzA1LQ1aF49kxLh5OZIphDebadHb1oMdx B1FMHEOJ+K6eELQBFqbNCipJu0OoHAjiFzdIBzeBKqrDPceo2ouGqq0StldZuR+n lhhf/M7JO/HrH+yYgclcIj16J29V+rTX6g7osGr9cKtoxcdkt3E/UaR25H89h61x xmrQk+t5RxaRo04Ohh7orxijVRlabLImB3lQOfy67bMkv6KNXvRe2oc+dbTUHNRM a9TlOv+X8G9XE8C5V4Oc =odtg -----END PGP SIGNATURE----- Merge tag 'media/v4.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media DocBook removal and some fixups from Mauro Carvalho Chehab: - removal of the media DocBook (since it's all in Sphinx now) - videobuf2: Fix an allocation regression - a few fixes related to the CEC drivers * tag 'media/v4.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] cec: fix off-by-one memset [media] staging: add MEDIA_SUPPORT dependency [media] vivid: don't handle CEC_MSG_SET_STREAM_PATH [media] media: adv7180: Fix broken interrupt register access [media] vb2: Fix allocation size of dma_parms [media] vim2m: copy the other colorspace-related fields as well [media] adv7511: fix VIC autodetect doc-rst: Remove the media docbook
This commit is contained in:
commit
c1ece76719
235 changed files with 49 additions and 62566 deletions
|
|
@ -100,7 +100,7 @@
|
|||
#define ADV7180_REG_IDENT 0x0011
|
||||
#define ADV7180_ID_7180 0x18
|
||||
|
||||
#define ADV7180_REG_ICONF1 0x0040
|
||||
#define ADV7180_REG_ICONF1 0x2040
|
||||
#define ADV7180_ICONF1_ACTIVE_LOW 0x01
|
||||
#define ADV7180_ICONF1_PSYNC_ONLY 0x10
|
||||
#define ADV7180_ICONF1_ACTIVE_TO_CLR 0xC0
|
||||
|
|
@ -113,15 +113,15 @@
|
|||
|
||||
#define ADV7180_IRQ1_LOCK 0x01
|
||||
#define ADV7180_IRQ1_UNLOCK 0x02
|
||||
#define ADV7180_REG_ISR1 0x0042
|
||||
#define ADV7180_REG_ICR1 0x0043
|
||||
#define ADV7180_REG_IMR1 0x0044
|
||||
#define ADV7180_REG_IMR2 0x0048
|
||||
#define ADV7180_REG_ISR1 0x2042
|
||||
#define ADV7180_REG_ICR1 0x2043
|
||||
#define ADV7180_REG_IMR1 0x2044
|
||||
#define ADV7180_REG_IMR2 0x2048
|
||||
#define ADV7180_IRQ3_AD_CHANGE 0x08
|
||||
#define ADV7180_REG_ISR3 0x004A
|
||||
#define ADV7180_REG_ICR3 0x004B
|
||||
#define ADV7180_REG_IMR3 0x004C
|
||||
#define ADV7180_REG_IMR4 0x50
|
||||
#define ADV7180_REG_ISR3 0x204A
|
||||
#define ADV7180_REG_ICR3 0x204B
|
||||
#define ADV7180_REG_IMR3 0x204C
|
||||
#define ADV7180_REG_IMR4 0x2050
|
||||
|
||||
#define ADV7180_REG_NTSC_V_BIT_END 0x00E6
|
||||
#define ADV7180_NTSC_V_BIT_END_MANUAL_NVEND 0x4F
|
||||
|
|
|
|||
|
|
@ -1041,6 +1041,8 @@ static int adv7511_s_dv_timings(struct v4l2_subdev *sd,
|
|||
struct v4l2_dv_timings *timings)
|
||||
{
|
||||
struct adv7511_state *state = get_adv7511_state(sd);
|
||||
struct v4l2_bt_timings *bt = &timings->bt;
|
||||
u32 fps;
|
||||
|
||||
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
|
||||
|
||||
|
|
@ -1052,15 +1054,29 @@ static int adv7511_s_dv_timings(struct v4l2_subdev *sd,
|
|||
if the format is one of the CEA or DMT timings. */
|
||||
v4l2_find_dv_timings_cap(timings, &adv7511_timings_cap, 0, NULL, NULL);
|
||||
|
||||
timings->bt.flags &= ~V4L2_DV_FL_REDUCED_FPS;
|
||||
|
||||
/* save timings */
|
||||
state->dv_timings = *timings;
|
||||
|
||||
/* set h/vsync polarities */
|
||||
adv7511_wr_and_or(sd, 0x17, 0x9f,
|
||||
((timings->bt.polarities & V4L2_DV_VSYNC_POS_POL) ? 0 : 0x40) |
|
||||
((timings->bt.polarities & V4L2_DV_HSYNC_POS_POL) ? 0 : 0x20));
|
||||
((bt->polarities & V4L2_DV_VSYNC_POS_POL) ? 0 : 0x40) |
|
||||
((bt->polarities & V4L2_DV_HSYNC_POS_POL) ? 0 : 0x20));
|
||||
|
||||
fps = (u32)bt->pixelclock / (V4L2_DV_BT_FRAME_WIDTH(bt) * V4L2_DV_BT_FRAME_HEIGHT(bt));
|
||||
switch (fps) {
|
||||
case 24:
|
||||
adv7511_wr_and_or(sd, 0xfb, 0xf9, 1 << 1);
|
||||
break;
|
||||
case 25:
|
||||
adv7511_wr_and_or(sd, 0xfb, 0xf9, 2 << 1);
|
||||
break;
|
||||
case 30:
|
||||
adv7511_wr_and_or(sd, 0xfb, 0xf9, 3 << 1);
|
||||
break;
|
||||
default:
|
||||
adv7511_wr_and_or(sd, 0xfb, 0xf9, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
/* update quantization range based on new dv_timings */
|
||||
adv7511_set_rgb_quantization_mode(sd, state->rgb_quantization_range_ctrl);
|
||||
|
|
|
|||
|
|
@ -171,6 +171,9 @@ struct vim2m_ctx {
|
|||
int mode;
|
||||
|
||||
enum v4l2_colorspace colorspace;
|
||||
enum v4l2_ycbcr_encoding ycbcr_enc;
|
||||
enum v4l2_xfer_func xfer_func;
|
||||
enum v4l2_quantization quant;
|
||||
|
||||
/* Source and destination queue data */
|
||||
struct vim2m_q_data q_data[2];
|
||||
|
|
@ -493,6 +496,9 @@ static int vidioc_g_fmt(struct vim2m_ctx *ctx, struct v4l2_format *f)
|
|||
f->fmt.pix.bytesperline = (q_data->width * q_data->fmt->depth) >> 3;
|
||||
f->fmt.pix.sizeimage = q_data->sizeimage;
|
||||
f->fmt.pix.colorspace = ctx->colorspace;
|
||||
f->fmt.pix.xfer_func = ctx->xfer_func;
|
||||
f->fmt.pix.ycbcr_enc = ctx->ycbcr_enc;
|
||||
f->fmt.pix.quantization = ctx->quant;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -549,6 +555,9 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
|
|||
return -EINVAL;
|
||||
}
|
||||
f->fmt.pix.colorspace = ctx->colorspace;
|
||||
f->fmt.pix.xfer_func = ctx->xfer_func;
|
||||
f->fmt.pix.ycbcr_enc = ctx->ycbcr_enc;
|
||||
f->fmt.pix.quantization = ctx->quant;
|
||||
|
||||
return vidioc_try_fmt(f, fmt);
|
||||
}
|
||||
|
|
@ -630,8 +639,12 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *priv,
|
|||
return ret;
|
||||
|
||||
ret = vidioc_s_fmt(file2ctx(file), f);
|
||||
if (!ret)
|
||||
if (!ret) {
|
||||
ctx->colorspace = f->fmt.pix.colorspace;
|
||||
ctx->xfer_func = f->fmt.pix.xfer_func;
|
||||
ctx->ycbcr_enc = f->fmt.pix.ycbcr_enc;
|
||||
ctx->quant = f->fmt.pix.quantization;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,7 +169,6 @@ static int vivid_received(struct cec_adapter *adap, struct cec_msg *msg)
|
|||
struct vivid_dev *dev = adap->priv;
|
||||
struct cec_msg reply;
|
||||
u8 dest = cec_msg_destination(msg);
|
||||
u16 pa;
|
||||
u8 disp_ctl;
|
||||
char osd[14];
|
||||
|
||||
|
|
@ -178,15 +177,6 @@ static int vivid_received(struct cec_adapter *adap, struct cec_msg *msg)
|
|||
cec_msg_init(&reply, dest, cec_msg_initiator(msg));
|
||||
|
||||
switch (cec_msg_opcode(msg)) {
|
||||
case CEC_MSG_SET_STREAM_PATH:
|
||||
if (cec_is_sink(adap))
|
||||
return -ENOMSG;
|
||||
cec_ops_set_stream_path(msg, &pa);
|
||||
if (pa != adap->phys_addr)
|
||||
return -ENOMSG;
|
||||
cec_msg_active_source(&reply, adap->phys_addr);
|
||||
cec_transmit_msg(adap, &reply, false);
|
||||
break;
|
||||
case CEC_MSG_SET_OSD_STRING:
|
||||
if (!cec_is_sink(adap))
|
||||
return -ENOMSG;
|
||||
|
|
|
|||
|
|
@ -743,7 +743,7 @@ EXPORT_SYMBOL_GPL(vb2_dma_contig_memops);
|
|||
int vb2_dma_contig_set_max_seg_size(struct device *dev, unsigned int size)
|
||||
{
|
||||
if (!dev->dma_parms) {
|
||||
dev->dma_parms = kzalloc(sizeof(dev->dma_parms), GFP_KERNEL);
|
||||
dev->dma_parms = kzalloc(sizeof(*dev->dma_parms), GFP_KERNEL);
|
||||
if (!dev->dma_parms)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue