Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93094449 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull media fixes from Mauro Carvalho Chehab:
 "A series of bug fix patches for v3.15-rc1.  Most are just driver
  fixes.  There are some changes at remote controller core level, fixing
  some definitions on a new API added for Kernel v3.15.

  It also adds the missing include at include/uapi/linux/v4l2-common.h,
  to allow its compilation on userspace, as pointed by you"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (24 commits)
  [media] gpsca: remove the risk of a division by zero
  [media] stk1160: warrant a NUL terminated string
  [media] v4l: ti-vpe: retain v4l2_buffer flags for captured buffers
  [media] v4l: ti-vpe: Set correct field parameter for output and capture buffers
  [media] v4l: ti-vpe: zero out reserved fields in try_fmt
  [media] v4l: ti-vpe: Fix initial configuration queue data
  [media] v4l: ti-vpe: Use correct bus_info name for the device in querycap
  [media] v4l: ti-vpe: report correct capabilities in querycap
  [media] v4l: ti-vpe: Allow usage of smaller images
  [media] v4l: ti-vpe: Use video_device_release_empty
  [media] v4l: ti-vpe: Make sure in job_ready that we have the needed number of dst_bufs
  [media] lgdt3305: include sleep functionality in lgdt3304_ops
  [media] drx-j: use customise option correctly
  [media] m88rs2000: fix sparse static warnings
  [media] r820t: fix size and init values
  [media] rc-core: remove generic scancode filter
  [media] rc-core: split dev->s_filter
  [media] rc-core: do not change 32bit NEC scancode format for now
  [media] rtl28xxu: remove duplicate ID 0458:707f Genius TVGo DVB-T03
  [media] xc2028: add missing break to switch
  ...
parents 07f5fef9 32654fba
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
config DVB_DRX39XYJ
config DVB_DRX39XYJ
	tristate "Micronas DRX-J demodulator"
	tristate "Micronas DRX-J demodulator"
	depends on DVB_CORE && I2C
	depends on DVB_CORE && I2C
	default m if DVB_FE_CUSTOMISE
	default m if !MEDIA_SUBDRV_AUTOSELECT
	help
	help
	  An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
	  An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
	  to support this frontend.
	  to support this frontend.
+1 −0
Original line number Original line Diff line number Diff line
@@ -1176,6 +1176,7 @@ static struct dvb_frontend_ops lgdt3304_ops = {
	},
	},
	.i2c_gate_ctrl        = lgdt3305_i2c_gate_ctrl,
	.i2c_gate_ctrl        = lgdt3305_i2c_gate_ctrl,
	.init                 = lgdt3305_init,
	.init                 = lgdt3305_init,
	.sleep                = lgdt3305_sleep,
	.set_frontend         = lgdt3304_set_parameters,
	.set_frontend         = lgdt3304_set_parameters,
	.get_frontend         = lgdt3305_get_frontend,
	.get_frontend         = lgdt3305_get_frontend,
	.get_tune_settings    = lgdt3305_get_tune_settings,
	.get_tune_settings    = lgdt3305_get_tune_settings,
+4 −4
Original line number Original line Diff line number Diff line
@@ -297,7 +297,7 @@ struct inittab {
	u8 val;
	u8 val;
};
};


struct inittab m88rs2000_setup[] = {
static struct inittab m88rs2000_setup[] = {
	{DEMOD_WRITE, 0x9a, 0x30},
	{DEMOD_WRITE, 0x9a, 0x30},
	{DEMOD_WRITE, 0x00, 0x01},
	{DEMOD_WRITE, 0x00, 0x01},
	{WRITE_DELAY, 0x19, 0x00},
	{WRITE_DELAY, 0x19, 0x00},
@@ -315,7 +315,7 @@ struct inittab m88rs2000_setup[] = {
	{0xff, 0xaa, 0xff}
	{0xff, 0xaa, 0xff}
};
};


struct inittab m88rs2000_shutdown[] = {
static struct inittab m88rs2000_shutdown[] = {
	{DEMOD_WRITE, 0x9a, 0x30},
	{DEMOD_WRITE, 0x9a, 0x30},
	{DEMOD_WRITE, 0xb0, 0x00},
	{DEMOD_WRITE, 0xb0, 0x00},
	{DEMOD_WRITE, 0xf1, 0x89},
	{DEMOD_WRITE, 0xf1, 0x89},
@@ -325,7 +325,7 @@ struct inittab m88rs2000_shutdown[] = {
	{0xff, 0xaa, 0xff}
	{0xff, 0xaa, 0xff}
};
};


struct inittab fe_reset[] = {
static struct inittab fe_reset[] = {
	{DEMOD_WRITE, 0x00, 0x01},
	{DEMOD_WRITE, 0x00, 0x01},
	{DEMOD_WRITE, 0x20, 0x81},
	{DEMOD_WRITE, 0x20, 0x81},
	{DEMOD_WRITE, 0x21, 0x80},
	{DEMOD_WRITE, 0x21, 0x80},
@@ -363,7 +363,7 @@ struct inittab fe_reset[] = {
	{0xff, 0xaa, 0xff}
	{0xff, 0xaa, 0xff}
};
};


struct inittab fe_trigger[] = {
static struct inittab fe_trigger[] = {
	{DEMOD_WRITE, 0x97, 0x04},
	{DEMOD_WRITE, 0x97, 0x04},
	{DEMOD_WRITE, 0x99, 0x77},
	{DEMOD_WRITE, 0x99, 0x77},
	{DEMOD_WRITE, 0x9b, 0x64},
	{DEMOD_WRITE, 0x9b, 0x64},
+32 −13
Original line number Original line Diff line number Diff line
@@ -49,8 +49,8 @@
#define VPE_MODULE_NAME "vpe"
#define VPE_MODULE_NAME "vpe"


/* minimum and maximum frame sizes */
/* minimum and maximum frame sizes */
#define MIN_W		128
#define MIN_W		32
#define MIN_H		128
#define MIN_H		32
#define MAX_W		1920
#define MAX_W		1920
#define MAX_H		1080
#define MAX_H		1080


@@ -887,6 +887,9 @@ static int job_ready(void *priv)
	if (v4l2_m2m_num_src_bufs_ready(ctx->m2m_ctx) < needed)
	if (v4l2_m2m_num_src_bufs_ready(ctx->m2m_ctx) < needed)
		return 0;
		return 0;


	if (v4l2_m2m_num_dst_bufs_ready(ctx->m2m_ctx) < needed)
		return 0;

	return 1;
	return 1;
}
}


@@ -1277,18 +1280,17 @@ static irqreturn_t vpe_irq(int irq_vpe, void *data)
	s_buf = &s_vb->v4l2_buf;
	s_buf = &s_vb->v4l2_buf;
	d_buf = &d_vb->v4l2_buf;
	d_buf = &d_vb->v4l2_buf;


	d_buf->flags = s_buf->flags;

	d_buf->timestamp = s_buf->timestamp;
	d_buf->timestamp = s_buf->timestamp;
	d_buf->flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
	if (s_buf->flags & V4L2_BUF_FLAG_TIMECODE)
	d_buf->flags |= s_buf->flags & V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
	if (s_buf->flags & V4L2_BUF_FLAG_TIMECODE) {
		d_buf->flags |= V4L2_BUF_FLAG_TIMECODE;
		d_buf->timecode = s_buf->timecode;
		d_buf->timecode = s_buf->timecode;
	}

	d_buf->sequence = ctx->sequence;
	d_buf->sequence = ctx->sequence;
	d_buf->field = ctx->field;


	d_q_data = &ctx->q_data[Q_DATA_DST];
	d_q_data = &ctx->q_data[Q_DATA_DST];
	if (d_q_data->flags & Q_DATA_INTERLACED) {
	if (d_q_data->flags & Q_DATA_INTERLACED) {
		d_buf->field = ctx->field;
		if (ctx->field == V4L2_FIELD_BOTTOM) {
		if (ctx->field == V4L2_FIELD_BOTTOM) {
			ctx->sequence++;
			ctx->sequence++;
			ctx->field = V4L2_FIELD_TOP;
			ctx->field = V4L2_FIELD_TOP;
@@ -1297,6 +1299,7 @@ static irqreturn_t vpe_irq(int irq_vpe, void *data)
			ctx->field = V4L2_FIELD_BOTTOM;
			ctx->field = V4L2_FIELD_BOTTOM;
		}
		}
	} else {
	} else {
		d_buf->field = V4L2_FIELD_NONE;
		ctx->sequence++;
		ctx->sequence++;
	}
	}


@@ -1335,8 +1338,9 @@ static int vpe_querycap(struct file *file, void *priv,
{
{
	strncpy(cap->driver, VPE_MODULE_NAME, sizeof(cap->driver) - 1);
	strncpy(cap->driver, VPE_MODULE_NAME, sizeof(cap->driver) - 1);
	strncpy(cap->card, VPE_MODULE_NAME, sizeof(cap->card) - 1);
	strncpy(cap->card, VPE_MODULE_NAME, sizeof(cap->card) - 1);
	strlcpy(cap->bus_info, VPE_MODULE_NAME, sizeof(cap->bus_info));
	snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
	cap->device_caps  = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING;
		VPE_MODULE_NAME);
	cap->device_caps  = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING;
	cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
	cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
	return 0;
	return 0;
}
}
@@ -1476,6 +1480,7 @@ static int __vpe_try_fmt(struct vpe_ctx *ctx, struct v4l2_format *f,
		}
		}
	}
	}


	memset(pix->reserved, 0, sizeof(pix->reserved));
	for (i = 0; i < pix->num_planes; i++) {
	for (i = 0; i < pix->num_planes; i++) {
		plane_fmt = &pix->plane_fmt[i];
		plane_fmt = &pix->plane_fmt[i];
		depth = fmt->vpdma_fmt[i]->depth;
		depth = fmt->vpdma_fmt[i]->depth;
@@ -1487,6 +1492,8 @@ static int __vpe_try_fmt(struct vpe_ctx *ctx, struct v4l2_format *f,


		plane_fmt->sizeimage =
		plane_fmt->sizeimage =
				(pix->height * pix->width * depth) >> 3;
				(pix->height * pix->width * depth) >> 3;

		memset(plane_fmt->reserved, 0, sizeof(plane_fmt->reserved));
	}
	}


	return 0;
	return 0;
@@ -1717,6 +1724,16 @@ static int vpe_buf_prepare(struct vb2_buffer *vb)
	q_data = get_q_data(ctx, vb->vb2_queue->type);
	q_data = get_q_data(ctx, vb->vb2_queue->type);
	num_planes = q_data->fmt->coplanar ? 2 : 1;
	num_planes = q_data->fmt->coplanar ? 2 : 1;


	if (vb->vb2_queue->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
		if (!(q_data->flags & Q_DATA_INTERLACED)) {
			vb->v4l2_buf.field = V4L2_FIELD_NONE;
		} else {
			if (vb->v4l2_buf.field != V4L2_FIELD_TOP &&
					vb->v4l2_buf.field != V4L2_FIELD_BOTTOM)
				return -EINVAL;
		}
	}

	for (i = 0; i < num_planes; i++) {
	for (i = 0; i < num_planes; i++) {
		if (vb2_plane_size(vb, i) < q_data->sizeimage[i]) {
		if (vb2_plane_size(vb, i) < q_data->sizeimage[i]) {
			vpe_err(ctx->dev,
			vpe_err(ctx->dev,
@@ -1866,9 +1883,11 @@ static int vpe_open(struct file *file)
	s_q_data->fmt = &vpe_formats[2];
	s_q_data->fmt = &vpe_formats[2];
	s_q_data->width = 1920;
	s_q_data->width = 1920;
	s_q_data->height = 1080;
	s_q_data->height = 1080;
	s_q_data->sizeimage[VPE_LUMA] = (s_q_data->width * s_q_data->height *
	s_q_data->bytesperline[VPE_LUMA] = (s_q_data->width *
			s_q_data->fmt->vpdma_fmt[VPE_LUMA]->depth) >> 3;
			s_q_data->fmt->vpdma_fmt[VPE_LUMA]->depth) >> 3;
	s_q_data->colorspace = V4L2_COLORSPACE_SMPTE170M;
	s_q_data->sizeimage[VPE_LUMA] = (s_q_data->bytesperline[VPE_LUMA] *
			s_q_data->height);
	s_q_data->colorspace = V4L2_COLORSPACE_REC709;
	s_q_data->field = V4L2_FIELD_NONE;
	s_q_data->field = V4L2_FIELD_NONE;
	s_q_data->c_rect.left = 0;
	s_q_data->c_rect.left = 0;
	s_q_data->c_rect.top = 0;
	s_q_data->c_rect.top = 0;
@@ -2002,7 +2021,7 @@ static struct video_device vpe_videodev = {
	.fops		= &vpe_fops,
	.fops		= &vpe_fops,
	.ioctl_ops	= &vpe_ioctl_ops,
	.ioctl_ops	= &vpe_ioctl_ops,
	.minor		= -1,
	.minor		= -1,
	.release	= video_device_release,
	.release	= video_device_release_empty,
	.vfl_dir	= VFL_DIR_M2M,
	.vfl_dir	= VFL_DIR_M2M,
};
};


+14 −1
Original line number Original line Diff line number Diff line
@@ -504,6 +504,18 @@ static int img_ir_set_filter(struct rc_dev *dev, enum rc_filter_type type,
	return ret;
	return ret;
}
}


static int img_ir_set_normal_filter(struct rc_dev *dev,
				    struct rc_scancode_filter *sc_filter)
{
	return img_ir_set_filter(dev, RC_FILTER_NORMAL, sc_filter); 
}

static int img_ir_set_wakeup_filter(struct rc_dev *dev,
				    struct rc_scancode_filter *sc_filter)
{
	return img_ir_set_filter(dev, RC_FILTER_WAKEUP, sc_filter);
}

/**
/**
 * img_ir_set_decoder() - Set the current decoder.
 * img_ir_set_decoder() - Set the current decoder.
 * @priv:	IR private data.
 * @priv:	IR private data.
@@ -986,7 +998,8 @@ int img_ir_probe_hw(struct img_ir_priv *priv)
	rdev->map_name = RC_MAP_EMPTY;
	rdev->map_name = RC_MAP_EMPTY;
	rc_set_allowed_protocols(rdev, img_ir_allowed_protos(priv));
	rc_set_allowed_protocols(rdev, img_ir_allowed_protos(priv));
	rdev->input_name = "IMG Infrared Decoder";
	rdev->input_name = "IMG Infrared Decoder";
	rdev->s_filter = img_ir_set_filter;
	rdev->s_filter = img_ir_set_normal_filter;
	rdev->s_wakeup_filter = img_ir_set_wakeup_filter;


	/* Register hardware decoder */
	/* Register hardware decoder */
	error = rc_register_device(rdev);
	error = rc_register_device(rdev);
Loading