[no subject]
Cool crazy deals never seen before with our latest 2008 improved models. http://zbleather.com/content/download/download.php -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: vb2_reqbufs() is not allowing more than VIDEO_MAX_FRAME
On 07/07/2014 09:27 AM, Divneil Wadhawan wrote: Hi Hans, include/media/davinci/vpfe_capture.h It uses videobuf-dma-contig.h, so, I left it out. drivers/media/platform/vivi-core.c Cannot find this one. Checked with find, in case it changed location, but couldn't. drivers/media/pci/saa7134/* Updated. Please find below the patch. I am hoping it's good to go. Acked-by: Hans Verkuil hans.verk...@cisco.com Pawel, Kamil, can you take a look as well? To my knowledge there drivers/media/platform/s5p-mfc is the only one that uses the buffer index as a bit index (1 v4l2_buf.index), but that driver has its own maximum buffer limit of 32 so it should not be affected by this patch. Regards, Hans Regards, Divneil From 1792d75dc0f893a181d991a0b238bbd0ead945c1 Mon Sep 17 00:00:00 2001 From: Divneil Wadhawan divneil.wadha...@st.com Date: Mon, 7 Jul 2014 12:38:06 +0530 Subject: [PATCH] v4l2: vb2: replace VIDEO_MAX_FRAME with VB2_MAX_FRAME - vb2 drivers to rely on VB2_MAX_FRAME. - VB2_MAX_FRAME bumps the value to 64 from current 32 Change-Id: I3d7998898df43553486166c44b54524aac449deb Signed-off-by: Divneil Wadhawan divneil.wadha...@st.com --- drivers/media/pci/saa7134/saa7134-ts.c|4 ++-- drivers/media/pci/saa7134/saa7134-vbi.c |4 ++-- drivers/media/pci/saa7134/saa7134-video.c |2 +- drivers/media/platform/mem2mem_testdev.c |2 +- drivers/media/platform/ti-vpe/vpe.c |2 +- drivers/media/v4l2-core/videobuf2-core.c |8 include/media/videobuf2-core.h|4 +++- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/media/pci/saa7134/saa7134-ts.c b/drivers/media/pci/saa7134/saa7134-ts.c index bd25323..0d04995 100644 --- a/drivers/media/pci/saa7134/saa7134-ts.c +++ b/drivers/media/pci/saa7134/saa7134-ts.c @@ -227,8 +227,8 @@ int saa7134_ts_init1(struct saa7134_dev *dev) /* sanitycheck insmod options */ if (tsbufs 2) tsbufs = 2; - if (tsbufs VIDEO_MAX_FRAME) - tsbufs = VIDEO_MAX_FRAME; + if (tsbufs VB2_MAX_FRAME) + tsbufs = VB2_MAX_FRAME; if (ts_nr_packets 4) ts_nr_packets = 4; if (ts_nr_packets 312) diff --git a/drivers/media/pci/saa7134/saa7134-vbi.c b/drivers/media/pci/saa7134/saa7134-vbi.c index c06dbe1..15b5860 100644 --- a/drivers/media/pci/saa7134/saa7134-vbi.c +++ b/drivers/media/pci/saa7134/saa7134-vbi.c @@ -203,8 +203,8 @@ int saa7134_vbi_init1(struct saa7134_dev *dev) if (vbibufs 2) vbibufs = 2; - if (vbibufs VIDEO_MAX_FRAME) - vbibufs = VIDEO_MAX_FRAME; + if (vbibufs VB2_MAX_FRAME) + vbibufs = VB2_MAX_FRAME; return 0; } diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index d375999..47dda6c 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c @@ -2032,7 +2032,7 @@ int saa7134_video_init1(struct saa7134_dev *dev) int ret; /* sanitycheck insmod options */ - if (gbuffers 2 || gbuffers VIDEO_MAX_FRAME) + if (gbuffers 2 || gbuffers VB2_MAX_FRAME) gbuffers = 2; if (gbufsize gbufsize_max) gbufsize = gbufsize_max; diff --git a/drivers/media/platform/mem2mem_testdev.c b/drivers/media/platform/mem2mem_testdev.c index 0714070..fe3235d 100644 --- a/drivers/media/platform/mem2mem_testdev.c +++ b/drivers/media/platform/mem2mem_testdev.c @@ -55,7 +55,7 @@ MODULE_PARM_DESC(debug, activates debug info); #define MEM2MEM_NAME m2m-testdev /* Per queue */ -#define MEM2MEM_DEF_NUM_BUFS VIDEO_MAX_FRAME +#define MEM2MEM_DEF_NUM_BUFS VB2_MAX_FRAME /* In bytes, per queue */ #define MEM2MEM_VID_MEM_LIMIT (16 * 1024 * 1024) diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c index 972f43f..6b370ed 100644 --- a/drivers/media/platform/ti-vpe/vpe.c +++ b/drivers/media/platform/ti-vpe/vpe.c @@ -1970,7 +1970,7 @@ static const struct v4l2_ctrl_config vpe_bufs_per_job = { .type = V4L2_CTRL_TYPE_INTEGER, .def = VPE_DEF_BUFS_PER_JOB, .min = 1, - .max = VIDEO_MAX_FRAME, + .max = VB2_MAX_FRAME, .step = 1, }; diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 7c4489c..09bc9bb 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -904,7 +904,7 @@ static int __reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req) /* * Make sure the requested values and current defaults are sane. */ - num_buffers = min_t(unsigned int, req-count, VIDEO_MAX_FRAME); + num_buffers = min_t(unsigned int, req-count, VB2_MAX_FRAME); num_buffers = max_t(unsigned int, num_buffers, q-min_buffers_needed); memset(q-plane_sizes, 0, sizeof(q-plane_sizes)); memset(q-alloc_ctx, 0, sizeof(q-alloc_ctx)); @@ -1005,7 +1005,7 @@ static int __create_bufs(struct vb2_queue *q, struct v4l2_create_buffers *create
Resend: [PATCH 0/4] rcar_vin: fix soc_camera WARN_ON() issues.
Resent to include the author and a couple of other interested parties :) This patch series provides fixes that allow the rcar_vin driver to function without triggering dozens of warnings from the videobuf2 and soc_camera layers. Patches 2/3 should probably be merged into a single, atomic change, although patch 2 does not make the existing situation /worse/ in and of itself. Patch 4 does not change the code logic, but is cleaner and less prone to breakage caused by furtutre modification. Also, more consistent with the use of vb pointers elsewhere in the driver. Comments welcome! -Ian -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/4] media: rcar_vin: Ensure all in-flight buffers are returned to error state before stopping.
Videobuf2 complains about buffers that are still marked ACTIVE (in use by the driver) following a call to stop_streaming(). This patch returns all active buffers to state ERROR prior to stopping. Note: this introduces a (non fatal) race condition as the stream is not guaranteed to be stopped at this point. Signed-off-by: Ian Molton ian.mol...@codethink.co.uk Signed-off-by: William Towle william.to...@codethink.co.uk --- drivers/media/platform/soc_camera/rcar_vin.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 7154500..06ce705 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -513,8 +513,14 @@ static void rcar_vin_stop_streaming(struct vb2_queue *vq) struct soc_camera_host *ici = to_soc_camera_host(icd-parent); struct rcar_vin_priv *priv = ici-priv; struct list_head *buf_head, *tmp; + int i; spin_lock_irq(priv-lock); + + for (i = 0; i vq-num_buffers; ++i) + if (vq-bufs[i]-state == VB2_BUF_STATE_ACTIVE) + vb2_buffer_done(vq-bufs[i], VB2_BUF_STATE_ERROR); + list_for_each_safe(buf_head, tmp, priv-capture) list_del_init(buf_head); spin_unlock_irq(priv-lock); -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/4] media: rcar_vin: Dont aggressively retire buffers
rcar_vin_videobuf_release() is called once per buffer from the buf_cleanup hook. There is no need to look up the queue and free all buffers at this point. Signed-off-by: Ian Molton ian.mol...@codethink.co.uk Signed-off-by: William Towle william.to...@codethink.co.uk --- drivers/media/platform/soc_camera/rcar_vin.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index e594230..7154500 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -493,17 +493,11 @@ static void rcar_vin_videobuf_release(struct vb2_buffer *vb) * to release could be any of the current buffers in use, so * release all buffers that are in use by HW */ - for (i = 0; i MAX_BUFFER_NUM; i++) { - if (priv-queue_buf[i]) { - vb2_buffer_done(priv-queue_buf[i], - VB2_BUF_STATE_ERROR); - priv-queue_buf[i] = NULL; - } - } - } else { - list_del_init(to_buf_list(vb)); + priv-queue_buf[i] = NULL; } + list_del_init(to_buf_list(vb)); + spin_unlock_irq(priv-lock); } -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/4] media: rcar_vin: Fix race condition terminating stream
This patch fixes a race condition whereby a frame being captured may generate an interrupt between requesting capture to halt and freeing buffers. This condition is exposed by the earlier patch that explicitly calls vb2_buffer_done() during stop streaming. The solution is to wait for capture to finish prior to finalising these buffers. Signed-off-by: Ian Molton ian.mol...@codethink.co.uk Signed-off-by: William Towle william.to...@codethink.co.uk --- drivers/media/platform/soc_camera/rcar_vin.c | 43 ++-- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 06ce705..aeda4e2 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -455,6 +455,29 @@ error: vb2_buffer_done(vb, VB2_BUF_STATE_ERROR); } +/* + * Wait for capture to stop and all in-flight buffers to be finished with by + * the video hardware. This must be called under priv-lock + * + */ +static void rcar_vin_wait_stop_streaming(struct rcar_vin_priv *priv) +{ + while (priv-state != STOPPED) { + + /* issue stop if running */ + if (priv-state == RUNNING) + rcar_vin_request_capture_stop(priv); + + /* wait until capturing has been stopped */ + if (priv-state == STOPPING) { + priv-request_to_stop = true; + spin_unlock_irq(priv-lock); + wait_for_completion(priv-capture_stop); + spin_lock_irq(priv-lock); + } + } +} + static void rcar_vin_videobuf_release(struct vb2_buffer *vb) { struct soc_camera_device *icd = soc_camera_from_vb2q(vb-vb2_queue); @@ -462,7 +485,6 @@ static void rcar_vin_videobuf_release(struct vb2_buffer *vb) struct rcar_vin_priv *priv = ici-priv; unsigned int i; int buf_in_use = 0; - spin_lock_irq(priv-lock); /* Is the buffer in use by the VIN hardware? */ @@ -474,20 +496,8 @@ static void rcar_vin_videobuf_release(struct vb2_buffer *vb) } if (buf_in_use) { - while (priv-state != STOPPED) { - - /* issue stop if running */ - if (priv-state == RUNNING) - rcar_vin_request_capture_stop(priv); - - /* wait until capturing has been stopped */ - if (priv-state == STOPPING) { - priv-request_to_stop = true; - spin_unlock_irq(priv-lock); - wait_for_completion(priv-capture_stop); - spin_lock_irq(priv-lock); - } - } + rcar_vin_wait_stop_streaming(priv); + /* * Capturing has now stopped. The buffer we have been asked * to release could be any of the current buffers in use, so @@ -517,12 +527,15 @@ static void rcar_vin_stop_streaming(struct vb2_queue *vq) spin_lock_irq(priv-lock); + rcar_vin_wait_stop_streaming(priv); + for (i = 0; i vq-num_buffers; ++i) if (vq-bufs[i]-state == VB2_BUF_STATE_ACTIVE) vb2_buffer_done(vq-bufs[i], VB2_BUF_STATE_ERROR); list_for_each_safe(buf_head, tmp, priv-capture) list_del_init(buf_head); + spin_unlock_irq(priv-lock); } -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/4] media: rcar_vin: Clean up rcar_vin_irq
This patch makes the rcar_vin IRQ handler a little more readable. Removes an else clause, and simplifies the buffer handling. Signed-off-by: Ian Molton ian.mol...@codethink.co.uk Reviewed-by: William Towle william.to...@codethink.co.uk --- drivers/media/platform/soc_camera/rcar_vin.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index aeda4e2..a8d2785 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -554,7 +554,6 @@ static irqreturn_t rcar_vin_irq(int irq, void *data) struct rcar_vin_priv *priv = data; u32 int_status; bool can_run = false, hw_stopped; - int slot; unsigned int handled = 0; spin_lock(priv-lock); @@ -573,17 +572,22 @@ static irqreturn_t rcar_vin_irq(int irq, void *data) hw_stopped = !(ioread32(priv-base + VNMS_REG) VNMS_CA); if (!priv-request_to_stop) { + struct vb2_buffer **q_entry = priv-queue_buf; + struct vb2_buffer *vb; + if (is_continuous_transfer(priv)) - slot = (ioread32(priv-base + VNMS_REG) - VNMS_FBS_MASK) VNMS_FBS_SHIFT; - else - slot = 0; + q_entry += (ioread32(priv-base + VNMS_REG) + VNMS_FBS_MASK) VNMS_FBS_SHIFT; + + vb = *q_entry; + + vb-v4l2_buf.field = priv-field; + vb-v4l2_buf.sequence = priv-sequence++; + do_gettimeofday(vb-v4l2_buf.timestamp); + + vb2_buffer_done(vb, VB2_BUF_STATE_DONE); - priv-queue_buf[slot]-v4l2_buf.field = priv-field; - priv-queue_buf[slot]-v4l2_buf.sequence = priv-sequence++; - do_gettimeofday(priv-queue_buf[slot]-v4l2_buf.timestamp); - vb2_buffer_done(priv-queue_buf[slot], VB2_BUF_STATE_DONE); - priv-queue_buf[slot] = NULL; + *q_entry = NULL; if (priv-state != STOPPING) can_run = rcar_vin_fill_hw_slot(priv); -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Fix typo in comments
Expression ((7bit i2c_addr 1) 0x01) can not be right because it is always 0 Signed-off-by: Raimonds Cicans r...@apollo.lv --- drivers/media/usb/dvb-usb/dibusb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb/dibusb.h b/drivers/media/usb/dvb-usb/dibusb.h index e47c321..32ab139 100644 --- a/drivers/media/usb/dvb-usb/dibusb.h +++ b/drivers/media/usb/dvb-usb/dibusb.h @@ -36,7 +36,7 @@ /* * i2c read - * bulk write: 0x02 ((7bit i2c_addr 1) 0x01) register_bytes length_word + * bulk write: 0x02 ((7bit i2c_addr 1) | 0x01) register_bytes length_word * bulk read: byte_buffer (length_word bytes) */ #define DIBUSB_REQ_I2C_READ0x02 -- 1.8.5.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] libv4lconvert: add support for extended controls
libv4lconvert did not support the extended control API so qv4l2, which uses it, didn't work properly with libv4l2 since passing software emulated controls using the extended control API will fail as those controls are obviously not known to the driver. This patch adds support for this API. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- lib/include/libv4lconvert.h | 6 ++ lib/libv4l2/libv4l2.c | 15 lib/libv4lconvert/control/libv4lcontrol.c | 141 ++ lib/libv4lconvert/control/libv4lcontrol.h | 3 + lib/libv4lconvert/libv4lconvert.c | 15 5 files changed, 180 insertions(+) diff --git a/lib/include/libv4lconvert.h b/lib/include/libv4lconvert.h index 2c1f199..e94d3bd 100644 --- a/lib/include/libv4lconvert.h +++ b/lib/include/libv4lconvert.h @@ -132,6 +132,12 @@ LIBV4L_PUBLIC int v4lconvert_vidioc_g_ctrl(struct v4lconvert_data *data, void *arg); LIBV4L_PUBLIC int v4lconvert_vidioc_s_ctrl(struct v4lconvert_data *data, void *arg); +LIBV4L_PUBLIC int v4lconvert_vidioc_g_ext_ctrls(struct v4lconvert_data *data, + void *arg); +LIBV4L_PUBLIC int v4lconvert_vidioc_try_ext_ctrls(struct v4lconvert_data *data, + void *arg); +LIBV4L_PUBLIC int v4lconvert_vidioc_s_ext_ctrls(struct v4lconvert_data *data, + void *arg); /* Is the passed in pixelformat supported as destination format? */ LIBV4L_PUBLIC int v4lconvert_supported_dst_format(unsigned int pixelformat); diff --git a/lib/libv4l2/libv4l2.c b/lib/libv4l2/libv4l2.c index 1dcf34d..8291ebe 100644 --- a/lib/libv4l2/libv4l2.c +++ b/lib/libv4l2/libv4l2.c @@ -1022,6 +1022,9 @@ int v4l2_ioctl(int fd, unsigned long int request, ...) case VIDIOC_QUERYCTRL: case VIDIOC_G_CTRL: case VIDIOC_S_CTRL: + case VIDIOC_G_EXT_CTRLS: + case VIDIOC_TRY_EXT_CTRLS: + case VIDIOC_S_EXT_CTRLS: case VIDIOC_ENUM_FRAMESIZES: case VIDIOC_ENUM_FRAMEINTERVALS: is_capture_request = 1; @@ -1129,6 +1132,18 @@ no_capture_request: result = v4lconvert_vidioc_s_ctrl(devices[index].convert, arg); break; + case VIDIOC_G_EXT_CTRLS: + result = v4lconvert_vidioc_g_ext_ctrls(devices[index].convert, arg); + break; + + case VIDIOC_TRY_EXT_CTRLS: + result = v4lconvert_vidioc_try_ext_ctrls(devices[index].convert, arg); + break; + + case VIDIOC_S_EXT_CTRLS: + result = v4lconvert_vidioc_s_ext_ctrls(devices[index].convert, arg); + break; + case VIDIOC_QUERYCAP: { struct v4l2_capability *cap = arg; diff --git a/lib/libv4lconvert/control/libv4lcontrol.c b/lib/libv4lconvert/control/libv4lcontrol.c index ee39ba7..2fd585d 100644 --- a/lib/libv4lconvert/control/libv4lcontrol.c +++ b/lib/libv4lconvert/control/libv4lcontrol.c @@ -916,6 +916,81 @@ int v4lcontrol_vidioc_g_ctrl(struct v4lcontrol_data *data, void *arg) VIDIOC_G_CTRL, arg); } +static void v4lcontrol_alloc_valid_controls(struct v4lcontrol_data *data, + const struct v4l2_ext_controls *src, + struct v4l2_ext_controls *dst) +{ + struct v4l2_ext_control *ctrl; + unsigned i, j; + + *dst = *src; + if (data-controls == 0) + return; + ctrl = malloc(src-count * sizeof(*ctrl)); + if (ctrl == NULL) + return; + dst-controls = ctrl; + dst-count = 0; + for (i = 0; i src-count; i++) { + for (j = 0; j V4LCONTROL_COUNT; j++) + if ((data-controls (1 j)) + src-controls[i].id == fake_controls[j].id) + break; + if (j == V4LCONTROL_COUNT) + ctrl[dst-count++] = src-controls[i]; + } +} + +static void v4lcontrol_free_valid_controls(struct v4lcontrol_data *data, + struct v4l2_ext_controls *src, + struct v4l2_ext_controls *dst) +{ + unsigned i, j, k = 0; + int inc_idx; + + src-error_idx = dst-error_idx; + if (dst-controls == src-controls) + return; + + inc_idx = dst-error_idx dst-count; + for (i = 0; i src-count; i++) { + for (j = 0; j V4LCONTROL_COUNT; j++) + if ((data-controls (1 j)) + src-controls[i].id == fake_controls[j].id) + break; + if (j == V4LCONTROL_COUNT) + src-controls[i] = dst-controls[k++]; + else if (inc_idx) + src-error_idx++; + } + free(dst-controls); +} + +int v4lcontrol_vidioc_g_ext_ctrls(struct v4lcontrol_data *data, void *arg) +{ + struct v4l2_ext_controls *ctrls = arg; + struct
[PATCH 2/2] libv4lcontrol: sync control strings/flags with the kernel
Hans, I'd like your opinion on this. I really don't think the (sw) suffix serves any purpose and is just confusing to the end-user. If you think that it is important that apps/users know that a control is emulated, then I would propose adding a V4L2_CTRL_FLAG_EMULATED and setting it in libv4lcontrol. Similar to the FMT_FLAG_EMULATED. Regards, Hans The emulated control names and control flags were different from what the kernel uses. Sync them up. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- lib/libv4lconvert/control/libv4lcontrol.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/libv4lconvert/control/libv4lcontrol.c b/lib/libv4lconvert/control/libv4lcontrol.c index 2fd585d..33bf9ce 100644 --- a/lib/libv4lconvert/control/libv4lcontrol.c +++ b/lib/libv4lconvert/control/libv4lcontrol.c @@ -788,7 +788,7 @@ static const struct v4l2_queryctrl fake_controls[V4LCONTROL_COUNT] = { { .id = V4L2_CID_AUTO_WHITE_BALANCE, .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = Whitebalance (software), + .name = White Balance, Automatic, .minimum = 0, .maximum = 1, .step = 1, @@ -797,7 +797,7 @@ static const struct v4l2_queryctrl fake_controls[V4LCONTROL_COUNT] = { }, { .id = V4L2_CID_HFLIP, .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = Horizontal flip (sw), + .name = Horizontal Flip, .minimum = 0, .maximum = 1, .step = 1, @@ -806,7 +806,7 @@ static const struct v4l2_queryctrl fake_controls[V4LCONTROL_COUNT] = { }, { .id = V4L2_CID_VFLIP, .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = Vertical flip (sw), + .name = Vertical Flip, .minimum = 0, .maximum = 1, .step = 1, @@ -815,17 +815,17 @@ static const struct v4l2_queryctrl fake_controls[V4LCONTROL_COUNT] = { }, { .id = V4L2_CID_GAMMA, .type = V4L2_CTRL_TYPE_INTEGER, - .name = Gamma (software), + .name = Gamma, .minimum = 500, /* == 0.5 */ .maximum = 3000, /* == 3.0 */ .step = 1, .default_value = 1000, /* == 1.0 */ - .flags = 0 + .flags = V4L2_CTRL_FLAG_SLIDER }, { /* Dummy place holder for V4LCONTROL_AUTO_ENABLE_COUNT */ }, { .id = V4L2_CID_AUTOGAIN, .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = Auto Gain (software), + .name = Gain, Automatic, .minimum = 0, .maximum = 1, .step = 1, @@ -834,12 +834,12 @@ static const struct v4l2_queryctrl fake_controls[V4LCONTROL_COUNT] = { }, { .id = V4L2_CTRL_CLASS_USER + 0x2000, /* FIXME */ .type = V4L2_CTRL_TYPE_INTEGER, - .name = Auto Gain target, + .name = Auto Gain Target, .minimum = 0, .maximum = 255, .step = 1, .default_value = 100, - .flags = 0 + .flags = V4L2_CTRL_FLAG_SLIDER }, }; -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: vb2_reqbufs() is not allowing more than VIDEO_MAX_FRAME
Hi Hans, From: Hans Verkuil [mailto:hverk...@xs4all.nl] Sent: Tuesday, July 08, 2014 9:52 AM To: Divneil Wadhawan; linux-media@vger.kernel.org; Kamil Debski; pa...@osciak.com Subject: Re: vb2_reqbufs() is not allowing more than VIDEO_MAX_FRAME On 07/07/2014 09:27 AM, Divneil Wadhawan wrote: Hi Hans, include/media/davinci/vpfe_capture.h It uses videobuf-dma-contig.h, so, I left it out. drivers/media/platform/vivi-core.c Cannot find this one. Checked with find, in case it changed location, but couldn't. drivers/media/pci/saa7134/* Updated. Please find below the patch. I am hoping it's good to go. Acked-by: Hans Verkuil hans.verk...@cisco.com Pawel, Kamil, can you take a look as well? To my knowledge there drivers/media/platform/s5p-mfc is the only one that uses the buffer index as a bit index (1 v4l2_buf.index), but that driver has its own maximum buffer limit of 32 so it should not be affected by this patch. Yes, MFC has a hardware limit of 32 buffers. It will not be affected by this patch as it uses internal #define MFC_MAX_BUFFERS 32. Best wishes, -- Kamil Debski Samsung RD Institute Poland Regards, Hans Regards, Divneil From 1792d75dc0f893a181d991a0b238bbd0ead945c1 Mon Sep 17 00:00:00 2001 From: Divneil Wadhawan divneil.wadha...@st.com Date: Mon, 7 Jul 2014 12:38:06 +0530 Subject: [PATCH] v4l2: vb2: replace VIDEO_MAX_FRAME with VB2_MAX_FRAME - vb2 drivers to rely on VB2_MAX_FRAME. - VB2_MAX_FRAME bumps the value to 64 from current 32 Change-Id: I3d7998898df43553486166c44b54524aac449deb Signed-off-by: Divneil Wadhawan divneil.wadha...@st.com --- drivers/media/pci/saa7134/saa7134-ts.c|4 ++-- drivers/media/pci/saa7134/saa7134-vbi.c |4 ++-- drivers/media/pci/saa7134/saa7134-video.c |2 +- drivers/media/platform/mem2mem_testdev.c |2 +- drivers/media/platform/ti-vpe/vpe.c |2 +- drivers/media/v4l2-core/videobuf2-core.c |8 include/media/videobuf2-core.h|4 +++- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/media/pci/saa7134/saa7134-ts.c b/drivers/media/pci/saa7134/saa7134-ts.c index bd25323..0d04995 100644 --- a/drivers/media/pci/saa7134/saa7134-ts.c +++ b/drivers/media/pci/saa7134/saa7134-ts.c @@ -227,8 +227,8 @@ int saa7134_ts_init1(struct saa7134_dev *dev) /* sanitycheck insmod options */ if (tsbufs 2) tsbufs = 2; - if (tsbufs VIDEO_MAX_FRAME) - tsbufs = VIDEO_MAX_FRAME; + if (tsbufs VB2_MAX_FRAME) + tsbufs = VB2_MAX_FRAME; if (ts_nr_packets 4) ts_nr_packets = 4; if (ts_nr_packets 312) diff --git a/drivers/media/pci/saa7134/saa7134-vbi.c b/drivers/media/pci/saa7134/saa7134-vbi.c index c06dbe1..15b5860 100644 --- a/drivers/media/pci/saa7134/saa7134-vbi.c +++ b/drivers/media/pci/saa7134/saa7134-vbi.c @@ -203,8 +203,8 @@ int saa7134_vbi_init1(struct saa7134_dev *dev) if (vbibufs 2) vbibufs = 2; - if (vbibufs VIDEO_MAX_FRAME) - vbibufs = VIDEO_MAX_FRAME; + if (vbibufs VB2_MAX_FRAME) + vbibufs = VB2_MAX_FRAME; return 0; } diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index d375999..47dda6c 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c @@ -2032,7 +2032,7 @@ int saa7134_video_init1(struct saa7134_dev *dev) int ret; /* sanitycheck insmod options */ - if (gbuffers 2 || gbuffers VIDEO_MAX_FRAME) + if (gbuffers 2 || gbuffers VB2_MAX_FRAME) gbuffers = 2; if (gbufsize gbufsize_max) gbufsize = gbufsize_max; diff --git a/drivers/media/platform/mem2mem_testdev.c b/drivers/media/platform/mem2mem_testdev.c index 0714070..fe3235d 100644 --- a/drivers/media/platform/mem2mem_testdev.c +++ b/drivers/media/platform/mem2mem_testdev.c @@ -55,7 +55,7 @@ MODULE_PARM_DESC(debug, activates debug info); #define MEM2MEM_NAME m2m-testdev /* Per queue */ -#define MEM2MEM_DEF_NUM_BUFS VIDEO_MAX_FRAME +#define MEM2MEM_DEF_NUM_BUFS VB2_MAX_FRAME /* In bytes, per queue */ #define MEM2MEM_VID_MEM_LIMIT (16 * 1024 * 1024) diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c index 972f43f..6b370ed 100644 --- a/drivers/media/platform/ti-vpe/vpe.c +++ b/drivers/media/platform/ti-vpe/vpe.c @@ -1970,7 +1970,7 @@ static const struct v4l2_ctrl_config vpe_bufs_per_job = { .type = V4L2_CTRL_TYPE_INTEGER, .def = VPE_DEF_BUFS_PER_JOB, .min = 1, - .max = VIDEO_MAX_FRAME, + .max = VB2_MAX_FRAME, .step = 1, }; diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 7c4489c..09bc9bb 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -904,7 +904,7 @@ static int __reqbufs(struct vb2_queue
[PATCH 1/3] s5p-mfc: Fix selective sclk_mfc init
fc906b6d Remove special clock usage in driver removed initialization of MFC special clock, arguing that there's no need to do it explicitly, since it's one of MFC gate clock's dependencies and gets enabled along with it. However, there's no promise of keeping this hierarchy across Exynos SoC releases, therefore this approach fails to provide a stable, portable solution. Out of all MFC versions, only v6 doesn't use special clock at all. Signed-off-by: Mateusz Zalega m.zal...@samsung.com Signed-off-by: Seung-Woo Kim sw0312@samsung.com Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c index 11d5f1d..cc562fc 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c @@ -21,6 +21,8 @@ #include s5p_mfc_pm.h #define MFC_GATE_CLK_NAME mfc +#define MFC_CLK_NAME sclk-mfc +#define MFC_CLK_RATE (200 * 100) #define CLK_DEBUG @@ -50,6 +52,23 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev) goto err_p_ip_clk; } + if (dev-variant-version != MFC_VERSION_V6) { + pm-clock = clk_get(dev-plat_dev-dev, MFC_CLK_NAME); + if (IS_ERR(pm-clock)) { + mfc_err(Failed to get gating clock control\n); + ret = PTR_ERR(pm-clock); + goto err_s_clk; + } + + clk_set_rate(pm-clock, MFC_CLK_RATE); + ret = clk_prepare_enable(pm-clock); + if (ret) { + mfc_err(Failed to enable MFC core operating clock\n); + ret = PTR_ERR(pm-clock); + goto err_s_clk; + } + } + atomic_set(pm-power, 0); #ifdef CONFIG_PM_RUNTIME pm-device = dev-plat_dev-dev; @@ -59,6 +78,9 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev) atomic_set(clk_ref, 0); #endif return 0; + +err_s_clk: + clk_put(pm-clock); err_p_ip_clk: clk_put(pm-clock_gate); err_g_ip_clk: @@ -67,6 +89,10 @@ err_g_ip_clk: void s5p_mfc_final_pm(struct s5p_mfc_dev *dev) { + if (dev-variant-version != MFC_VERSION_V6) { + clk_disable_unprepare(pm-clock); + clk_put(pm-clock); + } clk_unprepare(pm-clock_gate); clk_put(pm-clock_gate); #ifdef CONFIG_PM_RUNTIME -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] ARM: dts: exynos3250 add MFC codec device node
Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Cc: Rob Herring robh...@kernel.org Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Ian Campbell ijc+devicet...@hellion.org.uk Cc: Kumar Gala ga...@codeaurora.org Cc: devicet...@vger.kernel.org --- arch/arm/boot/dts/exynos3250.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi index 351871a..01bf5fa 100644 --- a/arch/arm/boot/dts/exynos3250.dtsi +++ b/arch/arm/boot/dts/exynos3250.dtsi @@ -283,6 +283,17 @@ status = disabled; }; + codec@1340 { + compatible = samsung,mfc-v7; + reg = 0x1340 0x1; + interrupts = 0 102 0; + clock-names = mfc, sclk-mfc; + clocks = cmu CLK_MFC, cmu CLK_SCLK_MFC; + #address-cells = 1; + #size-cells = 0; + samsung,power-domain = pd_mfc; + }; + serial_0: serial@1380 { compatible = samsung,exynos4210-uart; reg = 0x1380 0x100; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] Documentation: devicetree: Document exynos3250 SoC related settings
Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Cc: Rob Herring robh...@kernel.org Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Ian Campbell ijc+devicet...@hellion.org.uk Cc: Kumar Gala ga...@codeaurora.org Cc: devicet...@vger.kernel.org --- .../devicetree/bindings/media/s5p-mfc.txt | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt index 3e3c5f3..ee9604b 100644 --- a/Documentation/devicetree/bindings/media/s5p-mfc.txt +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt @@ -10,16 +10,20 @@ Required properties: - compatible : value should be either one among the following (a) samsung,mfc-v5 for MFC v5 present in Exynos4 SoCs (b) samsung,mfc-v6 for MFC v6 present in Exynos5 SoCs - (c) samsung,mfc-v7 for MFC v7 present in Exynos5420 SoC + (c) samsung,mfc-v7 for MFC v7 present in Exynos3250 and Exynos5420 SoC (d) samsung,mfc-v8 for MFC v8 present in Exynos5800 SoC - reg : Physical base address of the IP registers and length of memory mapped region. - interrupts : MFC interrupt number to the CPU. - - clocks : from common clock binding: handle to mfc clock. + - clocks : from common clock binding: handle to mfc clock and for +Exynos3250 SoC special clock gate should be defined +as the second element of the clocks array + - clock-names : from common clock binding: must contain mfc, - corresponding to entry in the clocks property. + corresponding to entry in the clocks property and + additionally sclk-mfc entry for Exynos3250 SoC - samsung,mfc-r : Base address of the first memory bank used by MFC for DMA contiguous memory allocation and its size. -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 0/9] Updated fence patch series
On Mon, Jul 07, 2014 at 10:30:52AM -0700, Greg KH wrote: On Mon, Jul 07, 2014 at 03:23:17PM +0200, Daniel Vetter wrote: On Wed, Jul 2, 2014 at 7:37 AM, Greg KH gre...@linuxfoundation.org wrote: Android can expose fences to userspace. It's possible to make the new fence mechanism expose the same fences to userspace by changing sync_fence_create to take a struct fence instead of a struct sync_pt. No other change is needed, because only the fence parts of struct sync_pt are used. But because the userspace fences are a separate problem and I haven't really looked at it yet I feel it should stay in staging, for now. Ok, that's reasonable. At first glance, this all looks sane to me, any objection from anyone if I merge this through my driver-core tree for 3.17? Ack from my side fwiw. Thanks, I'll queue it up later today. btw should we add you as a (co)maintainer for driver/core/dma-buf since you seem to want to keep a closer tab on what the insane gfx folks are up to in there? -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: fix PCTV 461e tuner I2C binding
Moikka Antti, On 07/07/2014 09:45 PM, Antti Palosaari wrote: Moikka Shuah Why are we unregistering i2c devices and dvb in this resume path? Looks incorrect to me. I don't know. Original patch I send was a bit different and tuner was removed only during em28xx_dvb_fini() https://patchwork.linuxtv.org/patch/22275/ Yes. That's what I suspected. My patch and yours got munged somehow. I will send a fix in. btw: thanks for teaching me how to say hello in Finnish -- Shuah -- Shuah Khan Senior Linux Kernel Developer - Open Source Group Samsung Research America(Silicon Valley) shuah...@samsung.com | (970) 672-0658 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [media] davinci-vpfe: Fix retcode check
Use signed type to check correctly for negative error code. The issue was reported with static analyser: [linux-3.13/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:270]: (style) A pointer can not be negative so it is either pointless or an error to check if it is. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=69071 Reported-by: David Binderman dcb...@hotmail.com Signed-off-by: Andrey Utkin andrey.krieger.ut...@gmail.com --- drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c index b2daf5e..e326032 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c @@ -254,7 +254,7 @@ int config_ipipe_hw(struct vpfe_ipipe_device *ipipe) void __iomem *ipipe_base = ipipe-base_addr; struct v4l2_mbus_framefmt *outformat; u32 color_pat; - u32 ipipe_mode; + int ipipe_mode; u32 data_path; /* enable clock to IPIPE */ -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] solo6x10: expose encoder quantization setting as V4L2 control
solo6*10 boards have configurable quantization parameter which takes values from 0 to 31, inclusively. This change enables setting it with ioctl VIDIOC_S_CTRL with id V4L2_CID_MPEG_VIDEO_H264_MIN_QP. --- drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c index b8ff113..bf6eb06 100644 --- a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c +++ b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c @@ -,6 +,9 @@ static int solo_s_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_VIDEO_GOP_SIZE: solo_enc-gop = ctrl-val; return 0; + case V4L2_CID_MPEG_VIDEO_H264_MIN_QP: + solo_enc-qp = ctrl-val; + return 0; case V4L2_CID_MOTION_THRESHOLD: solo_enc-motion_thresh = ctrl-val; if (!solo_enc-motion_global || !solo_enc-motion_enabled) @@ -1260,6 +1263,8 @@ static struct solo_enc_dev *solo_enc_alloc(struct solo_dev *solo_dev, V4L2_CID_SHARPNESS, 0, 15, 1, 0); v4l2_ctrl_new_std(hdl, solo_ctrl_ops, V4L2_CID_MPEG_VIDEO_GOP_SIZE, 1, 255, 1, solo_dev-fps); + v4l2_ctrl_new_std(hdl, solo_ctrl_ops, + V4L2_CID_MPEG_VIDEO_H264_MIN_QP, 0, 31, 1, SOLO_DEFAULT_QP); v4l2_ctrl_new_custom(hdl, solo_motion_threshold_ctrl, NULL); v4l2_ctrl_new_custom(hdl, solo_motion_enable_ctrl, NULL); v4l2_ctrl_new_custom(hdl, solo_osd_text_ctrl, NULL); -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] solo6x10: update GOP size, QP immediately
Previously, it was needed to reopen device to update GOP size and quantization parameter. Now we update device registers with new values immediately. --- drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c index bf6eb06..14f933f 100644 --- a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c +++ b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c @@ -1110,9 +1110,13 @@ static int solo_s_ctrl(struct v4l2_ctrl *ctrl) ctrl-val); case V4L2_CID_MPEG_VIDEO_GOP_SIZE: solo_enc-gop = ctrl-val; + solo_reg_write(solo_dev, SOLO_VE_CH_GOP(solo_enc-ch), solo_enc-gop); + solo_reg_write(solo_dev, SOLO_VE_CH_GOP_E(solo_enc-ch), solo_enc-gop); return 0; case V4L2_CID_MPEG_VIDEO_H264_MIN_QP: solo_enc-qp = ctrl-val; + solo_reg_write(solo_dev, SOLO_VE_CH_QP(solo_enc-ch), solo_enc-qp); + solo_reg_write(solo_dev, SOLO_VE_CH_QP_E(solo_enc-ch), solo_enc-qp); return 0; case V4L2_CID_MOTION_THRESHOLD: solo_enc-motion_thresh = ctrl-val; -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] davinci-vpfe: Fix retcode check
2014-07-08 16:08 GMT+02:00 Andrey Utkin andrey.krieger.ut...@gmail.com: Use signed type to check correctly for negative error code. The issue was reported with static analyser: [linux-3.13/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:270]: (style) A pointer can not be negative so it is either pointless or an error to check if it is. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=69071 Reported-by: David Binderman dcb...@hotmail.com Signed-off-by: Andrey Utkin andrey.krieger.ut...@gmail.com Hmm, while it is true that get_ipipe_mode returns an int, but the consequent call to regw_ip takes an u32 as its second argument. Did it cause a build warning for you? (Can't really check since I don't have ARM cross compilers close-by) If not, then: Reviewed-by: Levente Kurusa lkur...@redhat.com Thanks, Levente Kurusa -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 0/9] Updated fence patch series
On Tue, Jul 08, 2014 at 03:44:27PM +0200, Daniel Vetter wrote: On Mon, Jul 07, 2014 at 10:30:52AM -0700, Greg KH wrote: On Mon, Jul 07, 2014 at 03:23:17PM +0200, Daniel Vetter wrote: On Wed, Jul 2, 2014 at 7:37 AM, Greg KH gre...@linuxfoundation.org wrote: Android can expose fences to userspace. It's possible to make the new fence mechanism expose the same fences to userspace by changing sync_fence_create to take a struct fence instead of a struct sync_pt. No other change is needed, because only the fence parts of struct sync_pt are used. But because the userspace fences are a separate problem and I haven't really looked at it yet I feel it should stay in staging, for now. Ok, that's reasonable. At first glance, this all looks sane to me, any objection from anyone if I merge this through my driver-core tree for 3.17? Ack from my side fwiw. Thanks, I'll queue it up later today. btw should we add you as a (co)maintainer for driver/core/dma-buf since you seem to want to keep a closer tab on what the insane gfx folks are up to in there? Sure, why not, what's one more maintainership... Oh, does that mean you want me to be the one collecting the patches and forwarding them on to Linus? If so, that's fine, I can easily do that as well due to my infrastructure being set up for it. thanks, greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 0/9] Updated fence patch series
On 8 July 2014 20:09, Greg KH gre...@linuxfoundation.org wrote: On Tue, Jul 08, 2014 at 03:44:27PM +0200, Daniel Vetter wrote: On Mon, Jul 07, 2014 at 10:30:52AM -0700, Greg KH wrote: On Mon, Jul 07, 2014 at 03:23:17PM +0200, Daniel Vetter wrote: On Wed, Jul 2, 2014 at 7:37 AM, Greg KH gre...@linuxfoundation.org wrote: Android can expose fences to userspace. It's possible to make the new fence mechanism expose the same fences to userspace by changing sync_fence_create to take a struct fence instead of a struct sync_pt. No other change is needed, because only the fence parts of struct sync_pt are used. But because the userspace fences are a separate problem and I haven't really looked at it yet I feel it should stay in staging, for now. Ok, that's reasonable. At first glance, this all looks sane to me, any objection from anyone if I merge this through my driver-core tree for 3.17? Ack from my side fwiw. Thanks, I'll queue it up later today. btw should we add you as a (co)maintainer for driver/core/dma-buf since you seem to want to keep a closer tab on what the insane gfx folks are up to in there? Sure, why not, what's one more maintainership... Oh, does that mean you want me to be the one collecting the patches and forwarding them on to Linus? If so, that's fine, I can easily do that as well due to my infrastructure being set up for it. If you're ok, I could continue to do the collecting / forwarding business - I guess Daniel meant more from the 'not miss patches that need review'! Upto you! thanks, greg k-h Thanks and best regards, ~Sumit -- Thanks and regards, Sumit Semwal Graphics Engineer - Graphics working group Linaro.org │ Open source software for ARM SoCs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] davinci-vpfe: Fix retcode check
2014-07-08 17:32 GMT+03:00 Levente Kurusa lkur...@redhat.com: Hmm, while it is true that get_ipipe_mode returns an int, but the consequent call to regw_ip takes an u32 as its second argument. Did it cause a build warning for you? (Can't really check since I don't have ARM cross compilers close-by) If not, then: Cannot say for sure would compiler complain. I also haven't really checked it, and unfortunately even haven't succeeded to make a config that would build that code. But i believe that warning is still better than misbehaviour. -- Andrey Utkin -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] davinci-vpfe: Fix retcode check
On Tue, Jul 08, 2014 at 04:32:57PM +0200, Levente Kurusa wrote: 2014-07-08 16:08 GMT+02:00 Andrey Utkin andrey.krieger.ut...@gmail.com: Use signed type to check correctly for negative error code. The issue was reported with static analyser: [linux-3.13/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:270]: (style) A pointer can not be negative so it is either pointless or an error to check if it is. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=69071 Reported-by: David Binderman dcb...@hotmail.com Signed-off-by: Andrey Utkin andrey.krieger.ut...@gmail.com Hmm, while it is true that get_ipipe_mode returns an int, but the consequent call to regw_ip takes an u32 as its second argument. Did it cause a build warning for you? It won't cause a compile warning. (Can't really check since I don't have ARM cross compilers close-by) Make a small test program and test. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
DVB-T Freecom 14aa:0160 don't work
Sorry I'm mistake sending this bug, and is assigned to a bad mail. https://bugzilla.kernel.org/show_bug.cgi?id=79121 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] s5p-mfc: Fix selective sclk_mfc init
Hi Jacek, On Tue, Jul 8, 2014 at 6:33 PM, Jacek Anaszewski j.anaszew...@samsung.com wrote: fc906b6d Remove special clock usage in driver removed initialization of MFC special clock, arguing that there's no need to do it explicitly, since it's one of MFC gate clock's dependencies and gets enabled along with it. However, there's no promise of keeping this hierarchy across Exynos SoC releases, therefore this approach fails to provide a stable, portable solution. Out of all MFC versions, only v6 doesn't use special clock at all. Signed-off-by: Mateusz Zalega m.zal...@samsung.com Signed-off-by: Seung-Woo Kim sw0312@samsung.com Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c index 11d5f1d..cc562fc 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c @@ -21,6 +21,8 @@ #include s5p_mfc_pm.h #define MFC_GATE_CLK_NAME mfc +#define MFC_CLK_NAME sclk-mfc +#define MFC_CLK_RATE (200 * 100) #define CLK_DEBUG @@ -50,6 +52,23 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev) goto err_p_ip_clk; } + if (dev-variant-version != MFC_VERSION_V6) { + pm-clock = clk_get(dev-plat_dev-dev, MFC_CLK_NAME); + if (IS_ERR(pm-clock)) { + mfc_err(Failed to get gating clock control\n); + ret = PTR_ERR(pm-clock); + goto err_s_clk; Shouldn't this be err_p_ip_clk? + } + + clk_set_rate(pm-clock, MFC_CLK_RATE); + ret = clk_prepare_enable(pm-clock); + if (ret) { + mfc_err(Failed to enable MFC core operating clock\n); + ret = PTR_ERR(pm-clock); Why are you doing this (re-assigning)? + goto err_s_clk; + } + } + atomic_set(pm-power, 0); #ifdef CONFIG_PM_RUNTIME pm-device = dev-plat_dev-dev; @@ -59,6 +78,9 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev) atomic_set(clk_ref, 0); #endif return 0; + +err_s_clk: + clk_put(pm-clock); err_p_ip_clk: clk_put(pm-clock_gate); err_g_ip_clk: @@ -67,6 +89,10 @@ err_g_ip_clk: void s5p_mfc_final_pm(struct s5p_mfc_dev *dev) { + if (dev-variant-version != MFC_VERSION_V6) { + clk_disable_unprepare(pm-clock); + clk_put(pm-clock); + } clk_unprepare(pm-clock_gate); clk_put(pm-clock_gate); #ifdef CONFIG_PM_RUNTIME -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Regards, Sachin. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] solo6x10: expose encoder quantization setting as V4L2 control
On Tue, Jul 08, 2014 at 05:30:33PM +0300, Andrey Utkin wrote: solo6*10 boards have configurable quantization parameter which takes values from 0 to 31, inclusively. This change enables setting it with ioctl VIDIOC_S_CTRL with id V4L2_CID_MPEG_VIDEO_H264_MIN_QP. Both of these two need signed-off-by lines. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] solo6x10: expose encoder quantization setting as V4L2 control
solo6*10 boards have configurable quantization parameter which takes values from 0 to 31, inclusively. This change enables setting it with ioctl VIDIOC_S_CTRL with id V4L2_CID_MPEG_VIDEO_H264_MIN_QP. Signed-off-by: Andrey Utkin andrey.ut...@corp.bluecherry.net --- drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c index b8ff113..bf6eb06 100644 --- a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c +++ b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c @@ -,6 +,9 @@ static int solo_s_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_VIDEO_GOP_SIZE: solo_enc-gop = ctrl-val; return 0; + case V4L2_CID_MPEG_VIDEO_H264_MIN_QP: + solo_enc-qp = ctrl-val; + return 0; case V4L2_CID_MOTION_THRESHOLD: solo_enc-motion_thresh = ctrl-val; if (!solo_enc-motion_global || !solo_enc-motion_enabled) @@ -1260,6 +1263,8 @@ static struct solo_enc_dev *solo_enc_alloc(struct solo_dev *solo_dev, V4L2_CID_SHARPNESS, 0, 15, 1, 0); v4l2_ctrl_new_std(hdl, solo_ctrl_ops, V4L2_CID_MPEG_VIDEO_GOP_SIZE, 1, 255, 1, solo_dev-fps); + v4l2_ctrl_new_std(hdl, solo_ctrl_ops, + V4L2_CID_MPEG_VIDEO_H264_MIN_QP, 0, 31, 1, SOLO_DEFAULT_QP); v4l2_ctrl_new_custom(hdl, solo_motion_threshold_ctrl, NULL); v4l2_ctrl_new_custom(hdl, solo_motion_enable_ctrl, NULL); v4l2_ctrl_new_custom(hdl, solo_osd_text_ctrl, NULL); -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] solo6x10: update GOP size, QP immediately
Previously, it was needed to reopen device to update GOP size and quantization parameter. Now we update device registers with new values immediately. Signed-off-by: Andrey Utkin andrey.ut...@corp.bluecherry.net --- drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c index bf6eb06..14f933f 100644 --- a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c +++ b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c @@ -1110,9 +1110,13 @@ static int solo_s_ctrl(struct v4l2_ctrl *ctrl) ctrl-val); case V4L2_CID_MPEG_VIDEO_GOP_SIZE: solo_enc-gop = ctrl-val; + solo_reg_write(solo_dev, SOLO_VE_CH_GOP(solo_enc-ch), solo_enc-gop); + solo_reg_write(solo_dev, SOLO_VE_CH_GOP_E(solo_enc-ch), solo_enc-gop); return 0; case V4L2_CID_MPEG_VIDEO_H264_MIN_QP: solo_enc-qp = ctrl-val; + solo_reg_write(solo_dev, SOLO_VE_CH_QP(solo_enc-ch), solo_enc-qp); + solo_reg_write(solo_dev, SOLO_VE_CH_QP_E(solo_enc-ch), solo_enc-qp); return 0; case V4L2_CID_MOTION_THRESHOLD: solo_enc-motion_thresh = ctrl-val; -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] davinci-vpfe: Fix retcode check
Hi Andrey, Thanks for the patch! On Tue, Jul 8, 2014 at 3:58 PM, Andrey Utkin andrey.krieger.ut...@gmail.com wrote: 2014-07-08 17:32 GMT+03:00 Levente Kurusa lkur...@redhat.com: Hmm, while it is true that get_ipipe_mode returns an int, but the consequent call to regw_ip takes an u32 as its second argument. Did it cause a build warning for you? (Can't really check since I don't have ARM cross compilers close-by) If not, then: Cannot say for sure would compiler complain. I also haven't really checked it, and unfortunately even haven't succeeded to make a config that would build that code. But i believe that warning is still better than misbehaviour. It wont cause any compile warning. Applied for v3.17 Thanks, --Prabhakar Lad -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/4] media: rcar_vin: Fix race condition terminating stream
Hello. On 07/08/2014 01:41 PM, Ian Molton wrote: This patch fixes a race condition whereby a frame being captured may generate an interrupt between requesting capture to halt and freeing buffers. This condition is exposed by the earlier patch that explicitly calls vb2_buffer_done() during stop streaming. The solution is to wait for capture to finish prior to finalising these buffers. Hm, my spell checker trips on finalising... Signed-off-by: Ian Molton ian.mol...@codethink.co.uk Signed-off-by: William Towle william.to...@codethink.co.uk --- drivers/media/platform/soc_camera/rcar_vin.c | 43 ++-- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 06ce705..aeda4e2 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c [...] @@ -462,7 +485,6 @@ static void rcar_vin_videobuf_release(struct vb2_buffer *vb) struct rcar_vin_priv *priv = ici-priv; unsigned int i; int buf_in_use = 0; - spin_lock_irq(priv-lock); This seems like a random whitespace change. This empty should be present. [...] @@ -517,12 +527,15 @@ static void rcar_vin_stop_streaming(struct vb2_queue *vq) spin_lock_irq(priv-lock); + rcar_vin_wait_stop_streaming(priv); + for (i = 0; i vq-num_buffers; ++i) if (vq-bufs[i]-state == VB2_BUF_STATE_ACTIVE) vb2_buffer_done(vq-bufs[i], VB2_BUF_STATE_ERROR); list_for_each_safe(buf_head, tmp, priv-capture) list_del_init(buf_head); + Also quite a random drove-by change. spin_unlock_irq(priv-lock); } WBR, Sergei -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/8] vivi, the next generation
Hi all, This patch series replaces the current vivi driver by an almost completely rewritten version that provides a huge number of features. By default the driver has four inputs: Input 0 emulates a webcam, input 1 emulates a TV capture device, input 2 emulates an S-Video capture device and input 3 emulates an HDMI capture device. These inputs act exactly as a real hardware device would behave. This allows you to use this driver as a test input for application development, since you can test the various features without requiring special hardware. A quick overview of the features implemented by this driver: - A large list of test patterns and variations thereof - Working brightness, contrast, saturation and hue controls - Support for the alpha color component - Full colorspace support, including limited/full RGB range - All possible control types are present - Support for various pixel aspect ratios and video aspect ratios - Error injection to test what happens if errors occur - Supports crop/compose/scale in any combination - Can emulate up to 4K resolutions - All Field settings are supported for testing interlaced capturing - Supports all standard YUV and RGB formats, including two multiplanar YUV formats - Overlay support I demonstrated an earlier version of this driver in San Jose, and as discussed there this is a replacement for the old vivi driver, not an incremental patch series. The first 6 patches are small improvements to the v4l2 core code that I found while developing this driver. The 7th patch adds the driver and the last patch the documentation. There is a final patch that I didn't include here: that only removes the vivi.c source. When I do the pull request I will merge that with patch 7, but that would have made that patch really large. I hope that patch 7 comes through anyway. If not, then this series can be found here as well: http://git.linuxtv.org/cgit.cgi/hverkuil/media_tree.git/log/?h=vivi-ok For best results try it out with the latest qv4l2 code from v4l-utils! My goal is to get this in for 3.17: there are still more improvements to be done (more comments w.r.t. the colorspace handling for one), but it is vastly superior to the old vivi. BTW, the test pattern generation code (vivi-colors.[ch] and vivi-tpg.[ch]) has been written in such a way that the code can easily be shared between other kernel drivers or by v4l-utils.git (make sync-with-kernel). I'm currently using it in v4l2-ctl, and I plan to use it in qv4l2 as well for testing video output devices. Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/8] v4l2-ioctl: clips, clipcount and bitmap should not be zeroed.
From: Hans Verkuil hans.verk...@cisco.com Otherwise you cannot get the current clip and bitmap information from an overlay. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/v4l2-core/v4l2-ioctl.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index f81b9aa..0e90349 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1090,6 +1090,30 @@ static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops, bool is_rx = vfd-vfl_dir != VFL_DIR_TX; bool is_tx = vfd-vfl_dir != VFL_DIR_RX; + /* +* fmt can't be cleared for these overlay types due to the 'clips' +* 'clipcount' and 'bitmap' pointers in struct v4l2_window. +* Those are provided by the user. So handle these two overlay types +* first, and then just do a simple memset for the other types. +*/ + switch (p-type) { + case V4L2_BUF_TYPE_VIDEO_OVERLAY: + case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: { + struct v4l2_clip *clips = p-fmt.win.clips; + u32 clipcount = p-fmt.win.clipcount; + void *bitmap = p-fmt.win.bitmap; + + memset(p-fmt, 0, sizeof(p-fmt)); + p-fmt.win.clips = clips; + p-fmt.win.clipcount = clipcount; + p-fmt.win.bitmap = bitmap; + break; + } + default: + memset(p-fmt, 0, sizeof(p-fmt)); + break; + } + switch (p-type) { case V4L2_BUF_TYPE_VIDEO_CAPTURE: if (unlikely(!is_rx || !is_vid || !ops-vidioc_g_fmt_vid_cap)) @@ -2046,7 +2070,7 @@ struct v4l2_ioctl_info { static struct v4l2_ioctl_info v4l2_ioctls[] = { IOCTL_INFO_FNC(VIDIOC_QUERYCAP, v4l_querycap, v4l_print_querycap, 0), IOCTL_INFO_FNC(VIDIOC_ENUM_FMT, v4l_enum_fmt, v4l_print_fmtdesc, INFO_FL_CLEAR(v4l2_fmtdesc, type)), - IOCTL_INFO_FNC(VIDIOC_G_FMT, v4l_g_fmt, v4l_print_format, INFO_FL_CLEAR(v4l2_format, type)), + IOCTL_INFO_FNC(VIDIOC_G_FMT, v4l_g_fmt, v4l_print_format, 0), IOCTL_INFO_FNC(VIDIOC_S_FMT, v4l_s_fmt, v4l_print_format, INFO_FL_PRIO), IOCTL_INFO_FNC(VIDIOC_REQBUFS, v4l_reqbufs, v4l_print_requestbuffers, INFO_FL_PRIO | INFO_FL_QUEUE), IOCTL_INFO_FNC(VIDIOC_QUERYBUF, v4l_querybuf, v4l_print_buffer, INFO_FL_QUEUE | INFO_FL_CLEAR(v4l2_buffer, length)), -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/8] v4l2-ioctl: clear reserved field of G/S_SELECTION.
From: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/v4l2-core/v4l2-ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 0e90349..ede9b03 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -2112,8 +2112,8 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = { IOCTL_INFO_FNC(VIDIOC_CROPCAP, v4l_cropcap, v4l_print_cropcap, INFO_FL_CLEAR(v4l2_cropcap, type)), IOCTL_INFO_FNC(VIDIOC_G_CROP, v4l_g_crop, v4l_print_crop, INFO_FL_CLEAR(v4l2_crop, type)), IOCTL_INFO_FNC(VIDIOC_S_CROP, v4l_s_crop, v4l_print_crop, INFO_FL_PRIO), - IOCTL_INFO_STD(VIDIOC_G_SELECTION, vidioc_g_selection, v4l_print_selection, 0), - IOCTL_INFO_STD(VIDIOC_S_SELECTION, vidioc_s_selection, v4l_print_selection, INFO_FL_PRIO), + IOCTL_INFO_STD(VIDIOC_G_SELECTION, vidioc_g_selection, v4l_print_selection, INFO_FL_CLEAR(v4l2_selection, r)), + IOCTL_INFO_STD(VIDIOC_S_SELECTION, vidioc_s_selection, v4l_print_selection, INFO_FL_PRIO | INFO_FL_CLEAR(v4l2_selection, r)), IOCTL_INFO_STD(VIDIOC_G_JPEGCOMP, vidioc_g_jpegcomp, v4l_print_jpegcompression, 0), IOCTL_INFO_STD(VIDIOC_S_JPEGCOMP, vidioc_s_jpegcomp, v4l_print_jpegcompression, INFO_FL_PRIO), IOCTL_INFO_FNC(VIDIOC_QUERYSTD, v4l_querystd, v4l_print_std, 0), -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/8] v4l2-ioctl: remove pointless INFO_FL_CLEAR.
From: Hans Verkuil hans.verk...@cisco.com The edid field is the last field of the struct, so there is nothing to clear. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/v4l2-core/v4l2-ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index ede9b03..45e2ffa 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -2098,8 +2098,8 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = { IOCTL_INFO_FNC(VIDIOC_QUERYMENU, v4l_querymenu, v4l_print_querymenu, INFO_FL_CTRL | INFO_FL_CLEAR(v4l2_querymenu, index)), IOCTL_INFO_STD(VIDIOC_G_INPUT, vidioc_g_input, v4l_print_u32, 0), IOCTL_INFO_FNC(VIDIOC_S_INPUT, v4l_s_input, v4l_print_u32, INFO_FL_PRIO), - IOCTL_INFO_STD(VIDIOC_G_EDID, vidioc_g_edid, v4l_print_edid, INFO_FL_CLEAR(v4l2_edid, edid)), - IOCTL_INFO_STD(VIDIOC_S_EDID, vidioc_s_edid, v4l_print_edid, INFO_FL_PRIO | INFO_FL_CLEAR(v4l2_edid, edid)), + IOCTL_INFO_STD(VIDIOC_G_EDID, vidioc_g_edid, v4l_print_edid, 0), + IOCTL_INFO_STD(VIDIOC_S_EDID, vidioc_s_edid, v4l_print_edid, INFO_FL_PRIO), IOCTL_INFO_STD(VIDIOC_G_OUTPUT, vidioc_g_output, v4l_print_u32, 0), IOCTL_INFO_FNC(VIDIOC_S_OUTPUT, v4l_s_output, v4l_print_u32, INFO_FL_PRIO), IOCTL_INFO_FNC(VIDIOC_ENUMOUTPUT, v4l_enumoutput, v4l_print_enumoutput, INFO_FL_CLEAR(v4l2_output, index)), -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/8] v4l2-ioctl: call g_selection before calling cropcap
From: Hans Verkuil hans.verk...@cisco.com If the vidioc_cropcap op is implemented by the driver then the v4l2 core will call that directly. If g_selection is available, then the core cropcap implementation uses g_selection to fill in the bounds and defrect and it sets the pixelaspect to 1x1. But if both are available, then I would like to use g_selection to fill in defrect and bounds before calling cropcap. That way the driver's cropcap implementation doesn't have to set defrect or bounds. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/v4l2-core/v4l2-ioctl.c | 48 +++- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 8d4a25d..f81b9aa 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1751,37 +1751,41 @@ static int v4l_cropcap(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) { struct v4l2_cropcap *p = arg; - struct v4l2_selection s = { .type = p-type }; - int ret; - if (ops-vidioc_cropcap) - return ops-vidioc_cropcap(file, fh, p); + if (ops-vidioc_g_selection) { + struct v4l2_selection s = { .type = p-type }; + int ret; - /* obtaining bounds */ - if (V4L2_TYPE_IS_OUTPUT(p-type)) - s.target = V4L2_SEL_TGT_COMPOSE_BOUNDS; - else - s.target = V4L2_SEL_TGT_CROP_BOUNDS; + /* obtaining bounds */ + if (V4L2_TYPE_IS_OUTPUT(p-type)) + s.target = V4L2_SEL_TGT_COMPOSE_BOUNDS; + else + s.target = V4L2_SEL_TGT_CROP_BOUNDS; - ret = ops-vidioc_g_selection(file, fh, s); - if (ret) - return ret; - p-bounds = s.r; + ret = ops-vidioc_g_selection(file, fh, s); + if (ret) + return ret; + p-bounds = s.r; - /* obtaining defrect */ - if (V4L2_TYPE_IS_OUTPUT(p-type)) - s.target = V4L2_SEL_TGT_COMPOSE_DEFAULT; - else - s.target = V4L2_SEL_TGT_CROP_DEFAULT; + /* obtaining defrect */ + if (V4L2_TYPE_IS_OUTPUT(p-type)) + s.target = V4L2_SEL_TGT_COMPOSE_DEFAULT; + else + s.target = V4L2_SEL_TGT_CROP_DEFAULT; - ret = ops-vidioc_g_selection(file, fh, s); - if (ret) - return ret; - p-defrect = s.r; + ret = ops-vidioc_g_selection(file, fh, s); + if (ret) + return ret; + p-defrect = s.r; + } /* setting trivial pixelaspect */ p-pixelaspect.numerator = 1; p-pixelaspect.denominator = 1; + + if (ops-vidioc_cropcap) + return ops-vidioc_cropcap(file, fh, p); + return 0; } -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/8] v4l2-dev: don't debug poll unless the debug level 2
From: Hans Verkuil hans.verk...@cisco.com Some applications poll a lot, so prevent the poll message from flooding the log. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/v4l2-core/v4l2-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index 35698aa..72bea04 100644 --- a/drivers/media/v4l2-core/v4l2-dev.c +++ b/drivers/media/v4l2-core/v4l2-dev.c @@ -335,7 +335,7 @@ static unsigned int v4l2_poll(struct file *filp, struct poll_table_struct *poll) return DEFAULT_POLLMASK; if (video_is_registered(vdev)) res = vdev-fops-poll(filp, poll); - if (vdev-debug) + if (vdev-debug 2) printk(KERN_DEBUG %s: poll: %08x\n, video_device_node_name(vdev), res); return res; -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 8/8] vivi.txt: add a document describing the features of this driver.
From: Hans Verkuil hans.verk...@cisco.com The vivi driver emulates various types of video capture hardware and is ideal for testing applications. This document describes in detail all the features that this driver implements. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- Documentation/video4linux/vivi.txt | 460 + 1 file changed, 460 insertions(+) create mode 100644 Documentation/video4linux/vivi.txt diff --git a/Documentation/video4linux/vivi.txt b/Documentation/video4linux/vivi.txt new file mode 100644 index 000..7bb61c4 --- /dev/null +++ b/Documentation/video4linux/vivi.txt @@ -0,0 +1,460 @@ +vivi: Virtual Video Capture Driver +== + +This driver emulates a capture device that supports four inputs by default: + +Input 0 emulates a webcam, input 1 emulates a TV capture device, input 2 emulates +an S-Video capture device and input 3 emulates an HDMI capture device. + +These inputs act exactly as a real hardware device would behave. This allows +you to use this driver as a test input for application development, since you +can test the various features without requiring special hardware. + +This document describes the features implemented by this driver: + +- A large list of test patterns and variations thereof +- Working brightness, contrast, saturation and hue controls +- Support for the alpha color component +- Full colorspace support, including limited/full RGB range +- All possible control types are present +- Support for various pixel aspect ratios and video aspect ratios +- Error injection to test what happens if errors occur +- Supports crop/compose/scale in any combination +- Can emulate up to 4K resolutions +- All Field settings are supported for testing interlaced capturing +- Supports all standard YUV and RGB formats, including two multiplanar YUV formats +- Overlay support + +These features will be described in more detail below. + + +Section 1: Controls + +This driver implements User Controls, Image Processing Controls and Digital +Video Controls. + + +Section 1.1: User Controls + +The Brightness, Contrast, Saturation and Hue controls actually work and are +standard. There is one special feature with the Brightness control: each +video input has its own brightness value, so changing input will restore +the brightness for that input. In addition, each video input uses a different +brightness range (minimum and maximum control values). Switching inputs will +cause a control event to be sent with the V4L2_EVENT_CTRL_CH_RANGE flag set. +This allows you to test controls that can change their range. + +The 'Gain, Automatic' and Gain controls can be used to test volatile controls: +if 'Gain, Automatic' is set, then the Gain control is volatile and changes +constantly. If 'Gain, Automatic' is cleared, then the Gain control is a normal +control. + +The 'Horizontal Flip' and 'Vertical Flip' controls can be used to flip the +image. These combine with the 'Sensor Flipped Horizontally/Vertically' Image +Processing controls. + +The 'Alpha Component' control can be used to set the alpha component for +formats containing an alpha channel. + +The remaining controls represent all possible control types. The Menu control +and the Integer Menu control both have 'holes' in their menu list, meaning that +one or more menu items return EINVAL when VIDIOC_QUERYMENU is called. Both menu +controls also have a non-zero minimum control value. These features allow you +to check if your application can handle such things correctly. + + +Section 1.2: Image Processing Controls + +These controls control the image generation, error injection, etc. All of these +are specific to the vivi driver. + + +Section 1.2.1: Test Pattern Controls + +Test Pattern: selects which test pattern to use. Use the CSC Colorbar for + testing colorspace conversions: the colors used in that test pattern + map to valid colors in all colorspaces. The colorspace conversion + is disabled for the other test patterns. + +OSD Text Mode: selects whether the text superimposed on the + test pattern should be show, and if so, whether only counters should + be displayed or the full text. + +Horizontal Movement: selects whether the test pattern should + move to the left or right and with what speed. + +Vertical Movement: does the same for the vertical direction. + +Fill Percentage of Frame: can be used to draw only the top X percent + of the image. Since each frame has to be drawn by the driver, this + demands a lot of the CPU. For large resolutions this becomes + problematic. By drawing only part of the image this CPU load can + be reduced. + +Show Border: show a two-pixel wide border at the edge of the actual image, + excluding letter or pillarboxing. + +Show Square: show a square in the middle of the image. If the image is + displayed with the correct pixel and image aspect ratio corrections, +
[PATCH 6/8] videodev2.h: add V4L2_FIELD_HAS_T_OR_B macro
From: Hans Verkuil hans.verk...@cisco.com Add a macro to test if the field consists of a single top or bottom field. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- include/uapi/linux/videodev2.h | 4 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 168ff50..6d4659a 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -124,6 +124,10 @@ enum v4l2_field { (field) == V4L2_FIELD_INTERLACED_BT ||\ (field) == V4L2_FIELD_SEQ_TB ||\ (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_T_OR_B(field) \ + ((field) == V4L2_FIELD_BOTTOM ||\ +(field) == V4L2_FIELD_TOP ||\ +(field) == V4L2_FIELD_ALTERNATE) enum v4l2_buf_type { V4L2_BUF_TYPE_VIDEO_CAPTURE= 1, -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] r820t: remove unnecessary break after goto
Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Antti Palosaari cr...@iki.fi Cc: Michael Krufky mkru...@linuxtv.org Cc: linux-media@vger.kernel.org Signed-off-by: Fabian Frederick f...@skynet.be --- drivers/media/tuners/r820t.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c index 96ccfeb..6906b16 100644 --- a/drivers/media/tuners/r820t.c +++ b/drivers/media/tuners/r820t.c @@ -2300,7 +2300,6 @@ struct dvb_frontend *r820t_attach(struct dvb_frontend *fe, case 0: /* memory allocation failure */ goto err_no_gate; - break; case 1: /* new tuner instance */ priv-cfg = cfg; -- 1.8.4.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] dvb-frontends: remove unnecessary break after goto
Cc: Antti Palosaari cr...@iki.fi Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Signed-off-by: Fabian Frederick f...@skynet.be --- drivers/media/dvb-frontends/af9013.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/dvb-frontends/af9013.c b/drivers/media/dvb-frontends/af9013.c index fb504f1..ecf6388 100644 --- a/drivers/media/dvb-frontends/af9013.c +++ b/drivers/media/dvb-frontends/af9013.c @@ -470,7 +470,6 @@ static int af9013_statistics_snr_result(struct dvb_frontend *fe) break; default: goto err; - break; } for (i = 0; i len; i++) { -- 1.8.4.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] xc2028: remove unnecessary break after goto
Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Signed-off-by: Fabian Frederick f...@skynet.be --- drivers/media/tuners/tuner-xc2028.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/tuners/tuner-xc2028.c b/drivers/media/tuners/tuner-xc2028.c index 6ef93ee..565eeeb 100644 --- a/drivers/media/tuners/tuner-xc2028.c +++ b/drivers/media/tuners/tuner-xc2028.c @@ -1489,7 +1489,6 @@ struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe, case 0: /* memory allocation failure */ goto fail; - break; case 1: /* new tuner instance */ priv-ctrl.max_len = 13; -- 1.8.4.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 0/9] Updated fence patch series
On Tue, Jul 08, 2014 at 08:22:11PM +0530, Sumit Semwal wrote: On 8 July 2014 20:09, Greg KH gre...@linuxfoundation.org wrote: On Tue, Jul 08, 2014 at 03:44:27PM +0200, Daniel Vetter wrote: On Mon, Jul 07, 2014 at 10:30:52AM -0700, Greg KH wrote: On Mon, Jul 07, 2014 at 03:23:17PM +0200, Daniel Vetter wrote: On Wed, Jul 2, 2014 at 7:37 AM, Greg KH gre...@linuxfoundation.org wrote: Android can expose fences to userspace. It's possible to make the new fence mechanism expose the same fences to userspace by changing sync_fence_create to take a struct fence instead of a struct sync_pt. No other change is needed, because only the fence parts of struct sync_pt are used. But because the userspace fences are a separate problem and I haven't really looked at it yet I feel it should stay in staging, for now. Ok, that's reasonable. At first glance, this all looks sane to me, any objection from anyone if I merge this through my driver-core tree for 3.17? Ack from my side fwiw. Thanks, I'll queue it up later today. btw should we add you as a (co)maintainer for driver/core/dma-buf since you seem to want to keep a closer tab on what the insane gfx folks are up to in there? Sure, why not, what's one more maintainership... Oh, does that mean you want me to be the one collecting the patches and forwarding them on to Linus? If so, that's fine, I can easily do that as well due to my infrastructure being set up for it. If you're ok, I could continue to do the collecting / forwarding business - I guess Daniel meant more from the 'not miss patches that need review'! Hey, I'm more than willing to have other people do the real work of collecting / forwarding :) I'll just review stuff as it floats by, that's not enough of a role to put me in MAINTAINERS at all. thanks, greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: New v4l2 driver does not allow brightness/contrast control
Am 07.07.2014 19:58, schrieb Rafael Coutinho: I have a v4l2 video capture board that using kernel 2.6 with v4l2 em28xx driver 3.0.36 allows me to control brightness, contrast etc... However in kernel 3.2 with v4l2 em28xx driver version 3.2.0 it does not. This is what I get from the latest driver: root@android:/ # v4l2-ctl --info Driver Info (not using libv4l2): Driver name : em28xx Card type : EM2860/SAA711X Reference Design Bus info : usb-musb-hdrc.1-1 Driver version: 3.2.0 Capabilities : 0x05020051 Video Capture VBI Capture Sliced VBI Capture Audio Read/Write Streaming root@android:/ # v4l2-ctl -d 0 -l volume (int): min=0 max=31 step=1 default=31 value=31 flags=slider mute (bool) : default=1 value=1 What could be wrong? Before kernel 3.10, the brightness (contrast, ...) controls are provided by the subdevice drivers. With kernel 3.10 I have introduced bridge level image controls, but they are currently only used/activated if the subdevice doesn't already provide them (as suggested by Mauro). Hth, Frank Schäfer -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] xc4000: remove unnecessary break after goto
Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Signed-off-by: Fabian Frederick f...@skynet.be --- drivers/media/tuners/xc4000.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/tuners/xc4000.c b/drivers/media/tuners/xc4000.c index 2018bef..d2ee5df 100644 --- a/drivers/media/tuners/xc4000.c +++ b/drivers/media/tuners/xc4000.c @@ -1668,7 +1668,6 @@ struct dvb_frontend *xc4000_attach(struct dvb_frontend *fe, switch (instance) { case 0: goto fail; - break; case 1: /* new tuner instance */ priv-bandwidth = 600; -- 1.8.4.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] xc5000: remove unnecessary break after goto
Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Signed-off-by: Fabian Frederick f...@skynet.be --- drivers/media/tuners/xc5000.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/tuners/xc5000.c b/drivers/media/tuners/xc5000.c index 2b3d514..f059ba2 100644 --- a/drivers/media/tuners/xc5000.c +++ b/drivers/media/tuners/xc5000.c @@ -1302,7 +1302,6 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, switch (instance) { case 0: goto fail; - break; case 1: /* new tuner instance */ priv-bandwidth = 600; -- 1.8.4.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] dvb-frontends: remove unnecessary break after goto
Moikka Fabian! I have no reason to decline that patch (I will apply it) even it has hardly meaning. But is there now some new tool which warns that kind of issues? regards Atnti On 07/08/2014 08:23 PM, Fabian Frederick wrote: Cc: Antti Palosaari cr...@iki.fi Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Signed-off-by: Fabian Frederick f...@skynet.be --- drivers/media/dvb-frontends/af9013.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/dvb-frontends/af9013.c b/drivers/media/dvb-frontends/af9013.c index fb504f1..ecf6388 100644 --- a/drivers/media/dvb-frontends/af9013.c +++ b/drivers/media/dvb-frontends/af9013.c @@ -470,7 +470,6 @@ static int af9013_statistics_snr_result(struct dvb_frontend *fe) break; default: goto err; - break; } for (i = 0; i len; i++) { -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: fix PCTV 461e tuner I2C binding
On 07/08/2014 04:55 PM, Shuah Khan wrote: Moikka Antti, On 07/07/2014 09:45 PM, Antti Palosaari wrote: Moikka Shuah Why are we unregistering i2c devices and dvb in this resume path? Looks incorrect to me. I don't know. Original patch I send was a bit different and tuner was removed only during em28xx_dvb_fini() https://patchwork.linuxtv.org/patch/22275/ Yes. That's what I suspected. My patch and yours got munged somehow. I will send a fix in. There has been merge conflict and that is end result. None has reported that bug so far. Likely it is very rare users suspend/resume these devices as DVB suspend/resume has been largely broken always... btw: thanks for teaching me how to say hello in Finnish :=) regards Antti -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] dvb-frontends: remove unnecessary break after goto
On Tue, 08 Jul 2014 21:35:58 +0300 Antti Palosaari cr...@iki.fi wrote: Moikka Fabian! I have no reason to decline that patch (I will apply it) even it has hardly meaning. But is there now some new tool which warns that kind of issues? Hello Antti, Thanks :) AFAIK there's still no automatic detection of those cases. Regards, Fabian regards Atnti On 07/08/2014 08:23 PM, Fabian Frederick wrote: Cc: Antti Palosaari cr...@iki.fi Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Signed-off-by: Fabian Frederick f...@skynet.be --- drivers/media/dvb-frontends/af9013.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/dvb-frontends/af9013.c b/drivers/media/dvb-frontends/af9013.c index fb504f1..ecf6388 100644 --- a/drivers/media/dvb-frontends/af9013.c +++ b/drivers/media/dvb-frontends/af9013.c @@ -470,7 +470,6 @@ static int af9013_statistics_snr_result(struct dvb_frontend *fe) break; default: goto err; - break; } for (i = 0; i len; i++) { -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] checkpatch: Warn on break after goto or return with same tab indentation
Using break; after a goto or return is unnecessary so emit a warning when the break is at the same indent level. So this emits a warning on: switch (foo) { case 1: goto err; break; } but not on: switch (foo) { case 1: if (bar()) goto err; break; } Signed-off-by: Joe Perches j...@perches.com --- AFAIK there's still no automatic detection of those cases. There can be now... scripts/checkpatch.pl | 10 ++ 1 file changed, 10 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 496f9ab..fc22f22 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2439,6 +2439,16 @@ sub process { } } +# check indentation of a line with a break; +# if the previous line is a goto or return and is indented the same # of tabs + if ($sline =~ /^\+([\t]+)break\s*;\s*$/) { + my $tabs = $1; + if ($prevline =~ /^\+$tabs(?:goto|return)\b/) { + WARN(UNNECESSARY_BREAK, +break is not useful after a goto or return\n . $hereprev); + } + } + # discourage the addition of CONFIG_EXPERIMENTAL in #if(def). if ($line =~ /^\+\s*\#\s*if.*\bCONFIG_EXPERIMENTAL\b/) { WARN(CONFIG_EXPERIMENTAL, -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 0/9] Updated fence patch series
On Wed, Jul 02, 2014 at 11:12:32AM +0200, Maarten Lankhorst wrote: op 02-07-14 07:37, Greg KH schreef: On Tue, Jul 01, 2014 at 12:57:02PM +0200, Maarten Lankhorst wrote: So after some more hacking I've moved dma-buf to its own subdirectory, drivers/dma-buf and applied the fence patches to its new place. I believe that the first patch should be applied regardless, and the rest should be ready now. :-) Changes to the fence api: - release_fence - fence_release etc. - __fence_init - fence_init - __fence_signal - fence_signal_locked - __fence_is_signaled - fence_is_signaled_locked - Changing BUG_ON to WARN_ON in fence_later, and return NULL if it triggers. Android can expose fences to userspace. It's possible to make the new fence mechanism expose the same fences to userspace by changing sync_fence_create to take a struct fence instead of a struct sync_pt. No other change is needed, because only the fence parts of struct sync_pt are used. But because the userspace fences are a separate problem and I haven't really looked at it yet I feel it should stay in staging, for now. Ok, that's reasonable. At first glance, this all looks sane to me, any objection from anyone if I merge this through my driver-core tree for 3.17? Sounds good to me, let me know when you pull it in, so I can rebase my drm conversion on top of it. :-) All are now queued up and in my driver-core tree in the driver-core-next branch, you should have gotten the emails about it. thanks, greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: fix PCTV 461e tuner I2C binding
On 07/08/2014 12:51 PM, Antti Palosaari wrote: On 07/08/2014 04:55 PM, Shuah Khan wrote: Moikka Antti, On 07/07/2014 09:45 PM, Antti Palosaari wrote: Moikka Shuah Why are we unregistering i2c devices and dvb in this resume path? Looks incorrect to me. I don't know. Original patch I send was a bit different and tuner was removed only during em28xx_dvb_fini() https://patchwork.linuxtv.org/patch/22275/ Yes. That's what I suspected. My patch and yours got munged somehow. I will send a fix in. There has been merge conflict and that is end result. None has reported that bug so far. Likely it is very rare users suspend/resume these devices as DVB suspend/resume has been largely broken always... Somebody reported last week on v4l2 irc that suspend/resume not working starting 3.15. That's what got me started on looking at the code closely. It should be fixed anyways. :) -- Shuah -- Shuah Khan Senior Linux Kernel Developer - Open Source Group Samsung Research America(Silicon Valley) shuah...@samsung.com | (970) 672-0658 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] V4L: uvcvideo: Add support for relative pan/tilt controls
On Wed, Jun 25, 2014 at 2:54 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Pawel, On Wednesday 25 June 2014 11:46:24 Pawel Osciak wrote: On Tue, Jun 17, 2014 at 11:45 PM, Vincent Palatin wrote: Map V4L2_CID_TILT_RELATIVE and V4L2_CID_PAN_RELATIVE to the standard UVC CT_PANTILT_RELATIVE_CONTROL terminal control request. Tested by plugging a Logitech ConferenceCam C3000e USB camera and controlling pan/tilt from the userspace using the VIDIOC_S_CTRL ioctl. Verified that it can pan and tilt at the same time in both directions. Signed-off-by: Vincent Palatin vpala...@chromium.org Change-Id: I7b70b228e5c0126683f5f0be34ffd2807f5783dc --- Changes v2: fix control request name in description. The patch looks good, but I have a more general comment for everyone to consider. This doesn't match the expected functionality of controls V4L2_CID_PAN/TILT_RELATIVE. This is basically an on/off switch for pan/tilt, which once enabled will keep going until turned off (or I'm guessing until the maximum pan/tilt is reached), while the controls are supposed to expose an ability to turn the camera by a specified amount. Here the amount will also be ignored... I agree with you here, and this mismatch between the V4L and UVC controls is the reason why I haven't implemented relative pan/tilt support. Given that this is a standard UVC control, perhaps we need new V4L2 controls for it, as I'm assuming we can't change the meaning of existing controls? We could extend the meaning of the controls to cover the UVC behaviour in a device-specific fashion, but that would be confusing for applications, so new controls might be a better idea. Ok, I will add another patch to create new V4L2_CID_PAN_SPEED / V4L2_CID_TILT_SPEED controls. -- Vincent -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] V4L: uvcvideo: Add support for pan/tilt speed controls
Map V4L2_CID_TILT_SPEED and V4L2_CID_PAN_SPEED to the standard UVC CT_PANTILT_RELATIVE_CONTROL terminal control request. Tested by plugging a Logitech ConferenceCam C3000e USB camera and controlling pan/tilt from the userspace using the VIDIOC_S_CTRL ioctl. Verified that it can pan and tilt at the same time in both directions. Signed-off-by: Vincent Palatin vpala...@chromium.org Change-Id: I7b70b228e5c0126683f5f0be34ffd2807f5783dc --- drivers/media/usb/uvc/uvc_ctrl.c | 58 +--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index 0eb82106..d703cb0 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -309,9 +309,8 @@ static struct uvc_control_info uvc_ctrls[] = { .selector = UVC_CT_PANTILT_RELATIVE_CONTROL, .index = 12, .size = 4, - .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_MIN - | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES - | UVC_CTRL_FLAG_GET_DEF + .flags = UVC_CTRL_FLAG_SET_CUR + | UVC_CTRL_FLAG_GET_RANGE | UVC_CTRL_FLAG_AUTO_UPDATE, }, { @@ -391,6 +390,35 @@ static void uvc_ctrl_set_zoom(struct uvc_control_mapping *mapping, data[2] = min((int)abs(value), 0xff); } +static __s32 uvc_ctrl_get_rel_speed(struct uvc_control_mapping *mapping, + __u8 query, const __u8 *data) +{ + int first = mapping-offset / 8; + __s8 rel = (__s8)data[first]; + + switch (query) { + case UVC_GET_CUR: + return (rel == 0) ? 0 : (rel 0 ? data[first+1] +: -data[first+1]); + case UVC_GET_MIN: + return -data[first+1]; + case UVC_GET_MAX: + case UVC_GET_RES: + case UVC_GET_DEF: + default: + return data[first+1]; + } +} + +static void uvc_ctrl_set_rel_speed(struct uvc_control_mapping *mapping, + __s32 value, __u8 *data) +{ + int first = mapping-offset / 8; + + data[first] = value == 0 ? 0 : (value 0) ? 1 : 0xff; + data[first+1] = min_t(int, abs(value), 0xff); +} + static struct uvc_control_mapping uvc_ctrl_mappings[] = { { .id = V4L2_CID_BRIGHTNESS, @@ -677,6 +705,30 @@ static struct uvc_control_mapping uvc_ctrl_mappings[] = { .data_type = UVC_CTRL_DATA_TYPE_SIGNED, }, { + .id = V4L2_CID_PAN_SPEED, + .name = Pan (Speed), + .entity = UVC_GUID_UVC_CAMERA, + .selector = UVC_CT_PANTILT_RELATIVE_CONTROL, + .size = 16, + .offset = 0, + .v4l2_type = V4L2_CTRL_TYPE_INTEGER, + .data_type = UVC_CTRL_DATA_TYPE_SIGNED, + .get= uvc_ctrl_get_rel_speed, + .set= uvc_ctrl_set_rel_speed, + }, + { + .id = V4L2_CID_TILT_SPEED, + .name = Tilt (Speed), + .entity = UVC_GUID_UVC_CAMERA, + .selector = UVC_CT_PANTILT_RELATIVE_CONTROL, + .size = 16, + .offset = 16, + .v4l2_type = V4L2_CTRL_TYPE_INTEGER, + .data_type = UVC_CTRL_DATA_TYPE_SIGNED, + .get= uvc_ctrl_get_rel_speed, + .set= uvc_ctrl_set_rel_speed, + }, + { .id = V4L2_CID_PRIVACY, .name = Privacy, .entity = UVC_GUID_UVC_CAMERA, -- 2.0.0.526.g5318336 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] [media] V4L: Add camera pan/tilt speed controls
The V4L2_CID_PAN_SPEED and V4L2_CID_TILT_SPEED controls allow to move the camera by setting its rotation speed around its axis. Signed-off-by: Vincent Palatin vpala...@chromium.org --- Documentation/DocBook/media/v4l/compat.xml | 10 ++ Documentation/DocBook/media/v4l/controls.xml | 21 + drivers/media/v4l2-core/v4l2-ctrls.c | 2 ++ include/uapi/linux/v4l2-controls.h | 2 ++ 4 files changed, 35 insertions(+) diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index eee6f0f..21910e9 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml @@ -2545,6 +2545,16 @@ fields changed from _s32 to _u32. /orderedlist /section +section + titleV4L2 in Linux 3.17/title + orderedlist + listitem + paraAdded constantV4L2_CID_PAN_SPEED/constant and + constantV4L2_CID_TILT_SPEED/constant camera controls./para + /listitem + /orderedlist +/section + section id=other titleRelation of V4L2 to other Linux multimedia APIs/title diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 47198ee..cdf97f0 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -3914,6 +3914,27 @@ by exposure, white balance or focus controls./entry /row rowentry/entry/row + row + entry spanname=idconstantV4L2_CID_PAN_SPEED/constantnbsp;/entry + entryinteger/entry + /rowrowentry spanname=descrThis control turns the +camera horizontally at the specific speed. The unit is undefined. A +positive value moves the camera to the right (clockwise when viewed +from above), a negative value to the left. A value of zero does not +cause or stop the motion./entry + /row + rowentry/entry/row + + row + entry spanname=idconstantV4L2_CID_TILT_SPEED/constantnbsp;/entry + entryinteger/entry + /rowrowentry spanname=descrThis control turns the +camera vertically at the specified speed. The unit is undefined. A +positive value moves the camera up, a negative value down. A value of +zero does not cause or stop the motion./entry + /row + rowentry/entry/row + /tbody /tgroup /table diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 55c6832..57ddaf4 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -787,6 +787,8 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_AUTO_FOCUS_STOP: return Auto Focus, Stop; case V4L2_CID_AUTO_FOCUS_STATUS:return Auto Focus, Status; case V4L2_CID_AUTO_FOCUS_RANGE: return Auto Focus, Range; + case V4L2_CID_PAN_SPEED:return Pan, Speed; + case V4L2_CID_TILT_SPEED: return Tilt, Speed; /* FM Radio Modulator control */ /* Keep the order of the 'case's the same as in videodev2.h! */ diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 2ac5597..5576044 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -745,6 +745,8 @@ enum v4l2_auto_focus_range { V4L2_AUTO_FOCUS_RANGE_INFINITY = 3, }; +#define V4L2_CID_PAN_SPEED (V4L2_CID_CAMERA_CLASS_BASE+32) +#define V4L2_CID_TILT_SPEED(V4L2_CID_CAMERA_CLASS_BASE+33) /* FM Modulator class control IDs */ -- 2.0.0.526.g5318336 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
cron job: media_tree daily build: OK
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Wed Jul 9 04:00:21 CEST 2014 git branch: test git hash: 3c0d394ea7022bb9666d9df97a5776c4bcc3045c gcc version:i686-linux-gcc (GCC) 4.8.2 sparse version: v0.5.0-14-gf11dd94 host hardware: x86_64 host os:3.14-5.slh.5-amd64 linux-git-arm-at91: OK linux-git-arm-davinci: OK linux-git-arm-exynos: OK linux-git-arm-mx: OK linux-git-arm-omap: OK linux-git-arm-omap1: OK linux-git-arm-pxa: OK linux-git-blackfin: OK linux-git-i686: OK linux-git-m32r: OK linux-git-mips: OK linux-git-powerpc64: OK linux-git-sh: OK linux-git-x86_64: OK linux-2.6.31.14-i686: OK linux-2.6.32.27-i686: OK linux-2.6.33.7-i686: OK linux-2.6.34.7-i686: OK linux-2.6.35.9-i686: OK linux-2.6.36.4-i686: OK linux-2.6.37.6-i686: OK linux-2.6.38.8-i686: OK linux-2.6.39.4-i686: OK linux-3.0.60-i686: OK linux-3.1.10-i686: OK linux-3.2.37-i686: OK linux-3.3.8-i686: OK linux-3.4.27-i686: OK linux-3.5.7-i686: OK linux-3.6.11-i686: OK linux-3.7.4-i686: OK linux-3.8-i686: OK linux-3.9.2-i686: OK linux-3.10.1-i686: OK linux-3.11.1-i686: OK linux-3.12.23-i686: OK linux-3.13.11-i686: OK linux-3.14.9-i686: OK linux-3.15.2-i686: OK linux-3.16-rc1-i686: OK linux-2.6.31.14-x86_64: OK linux-2.6.32.27-x86_64: OK linux-2.6.33.7-x86_64: OK linux-2.6.34.7-x86_64: OK linux-2.6.35.9-x86_64: OK linux-2.6.36.4-x86_64: OK linux-2.6.37.6-x86_64: OK linux-2.6.38.8-x86_64: OK linux-2.6.39.4-x86_64: OK linux-3.0.60-x86_64: OK linux-3.1.10-x86_64: OK linux-3.2.37-x86_64: OK linux-3.3.8-x86_64: OK linux-3.4.27-x86_64: OK linux-3.5.7-x86_64: OK linux-3.6.11-x86_64: OK linux-3.7.4-x86_64: OK linux-3.8-x86_64: OK linux-3.9.2-x86_64: OK linux-3.10.1-x86_64: OK linux-3.11.1-x86_64: OK linux-3.12.23-x86_64: OK linux-3.13.11-x86_64: OK linux-3.14.9-x86_64: OK linux-3.15.2-x86_64: OK linux-3.16-rc1-x86_64: OK apps: OK spec-git: OK sparse: WARNINGS Detailed results are available here: http://www.xs4all.nl/~hverkuil/logs/Wednesday.log Full logs are available here: http://www.xs4all.nl/~hverkuil/logs/Wednesday.tar.bz2 The Media Infrastructure API from this daily build is here: http://www.xs4all.nl/~hverkuil/spec/media.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] s5p-mfc: Fix selective sclk_mfc init
Hi Jacek, On Tue, Jul 8, 2014 at 6:33 PM, Jacek Anaszewski j.anaszew...@samsung.com wrote: fc906b6d Remove special clock usage in driver removed initialization of MFC special clock, arguing that there's no need to do it explicitly, since it's one of MFC gate clock's dependencies and gets enabled along with it. However, there's no promise of keeping this hierarchy across Exynos SoC releases, therefore this approach fails to provide a stable, portable solution. Out of all MFC versions, only v6 doesn't use special clock at all. Signed-off-by: Mateusz Zalega m.zal...@samsung.com Signed-off-by: Seung-Woo Kim sw0312@samsung.com Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c index 11d5f1d..cc562fc 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c @@ -21,6 +21,8 @@ #include s5p_mfc_pm.h #define MFC_GATE_CLK_NAME mfc +#define MFC_CLK_NAME sclk-mfc +#define MFC_CLK_RATE (200 * 100) #define CLK_DEBUG @@ -50,6 +52,23 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev) goto err_p_ip_clk; } + if (dev-variant-version != MFC_VERSION_V6) { + pm-clock = clk_get(dev-plat_dev-dev, MFC_CLK_NAME); + if (IS_ERR(pm-clock)) { + mfc_err(Failed to get gating clock control\n); + ret = PTR_ERR(pm-clock); + goto err_s_clk; + } + Agree to your point above that some SoCs may have different hierarchy which needs to enable this clock explicitly. But other SoCs using v5, v7 and v8 still works fine without this special clock and those DT nodes doesnt provide this clock now. So I would suggest not to error return if the clock is not provided and keep it as an optional parameter to maintain backward compatibility. With this current patch all the working SoCs like 5420, 5800 etc will fail in probe. Regards Arun + clk_set_rate(pm-clock, MFC_CLK_RATE); + ret = clk_prepare_enable(pm-clock); + if (ret) { + mfc_err(Failed to enable MFC core operating clock\n); + ret = PTR_ERR(pm-clock); + goto err_s_clk; + } + } + atomic_set(pm-power, 0); #ifdef CONFIG_PM_RUNTIME pm-device = dev-plat_dev-dev; @@ -59,6 +78,9 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev) atomic_set(clk_ref, 0); #endif return 0; + +err_s_clk: + clk_put(pm-clock); err_p_ip_clk: clk_put(pm-clock_gate); err_g_ip_clk: @@ -67,6 +89,10 @@ err_g_ip_clk: void s5p_mfc_final_pm(struct s5p_mfc_dev *dev) { + if (dev-variant-version != MFC_VERSION_V6) { + clk_disable_unprepare(pm-clock); + clk_put(pm-clock); + } clk_unprepare(pm-clock_gate); clk_put(pm-clock_gate); #ifdef CONFIG_PM_RUNTIME -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html