Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] v4l2-ctrl: Send change events to all fh for auto cluster slave controls
[media] v4l2-event: Don't set sev->fh to NULL on unsubscribe
[media] v4l2-event: Remove pending events from fh event queue when unsubscribing
[media] v4l2-event: Deny subscribing with a type of V4L2_EVENT_ALL
[media] MAINTAINERS: add a maintainer for s5p-mfc driver
[media] v4l: s5p-mfc: fix reported capabilities
[media] media: vb2: reset queued list on REQBUFS(0) call
[media] media: vb2: set buffer length correctly for all buffer types
[media] media: vb2: add a check for uninitialized buffer
[media] mxl111sf: fix build warning
[media] mxl111sf: remove pointless if condition in mxl111sf_config_spi
[media] mxl111sf: check for errors after mxl111sf_write_reg in mxl111sf_idac_config
[media] mxl111sf: fix return value of mxl111sf_idac_config
[media] uvcvideo: GET_RES should only be checked for BITMAP type menu controls

+30 -16
+1
MAINTAINERS
··· 1106 1106 ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT 1107 1107 M: Kyungmin Park <kyungmin.park@samsung.com> 1108 1108 M: Kamil Debski <k.debski@samsung.com> 1109 + M: Jeongtae Park <jtp.park@samsung.com> 1109 1110 L: linux-arm-kernel@lists.infradead.org 1110 1111 L: linux-media@vger.kernel.org 1111 1112 S: Maintained
+1 -2
drivers/media/dvb/dvb-usb/mxl111sf-i2c.c
··· 398 398 u8 i2c_r_data[24]; 399 399 u8 i = 0; 400 400 u8 fifo_status = 0; 401 - int ret; 402 401 int status = 0; 403 402 404 403 mxl_i2c("read %d bytes", count); ··· 417 418 i2c_w_data[4+(i*3)] = 0x00; 418 419 } 419 420 420 - ret = mxl111sf_i2c_get_data(state, 0, i2c_w_data, i2c_r_data); 421 + mxl111sf_i2c_get_data(state, 0, i2c_w_data, i2c_r_data); 421 422 422 423 /* Check for I2C NACK status */ 423 424 if (mxl111sf_i2c_check_status(state) == 1) {
+4 -3
drivers/media/dvb/dvb-usb/mxl111sf-phy.c
··· 296 296 goto fail; 297 297 298 298 ret = mxl111sf_write_reg(state, 0x00, 0x00); 299 - if (mxl_fail(ret)) 300 - goto fail; 299 + mxl_fail(ret); 301 300 fail: 302 301 return ret; 303 302 } ··· 327 328 /* set hysteresis value reg: 0x0B<5:0> */ 328 329 ret = mxl111sf_write_reg(state, V6_IDAC_HYSTERESIS_REG, 329 330 (hysteresis_value & 0x3F)); 331 + mxl_fail(ret); 330 332 } 331 333 332 334 ret = mxl111sf_write_reg(state, V6_IDAC_SETTINGS_REG, val); 335 + mxl_fail(ret); 333 336 334 - return val; 337 + return ret; 335 338 } 336 339 337 340 /*
+2 -2
drivers/media/video/s5p-mfc/s5p_mfc_dec.c
··· 220 220 strncpy(cap->card, dev->plat_dev->name, sizeof(cap->card) - 1); 221 221 cap->bus_info[0] = 0; 222 222 cap->version = KERNEL_VERSION(1, 0, 0); 223 - cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT 224 - | V4L2_CAP_STREAMING; 223 + cap->capabilities = V4L2_CAP_VIDEO_CAPTURE_MPLANE | 224 + V4L2_CAP_VIDEO_OUTPUT_MPLANE | V4L2_CAP_STREAMING; 225 225 return 0; 226 226 } 227 227
+2 -2
drivers/media/video/s5p-mfc/s5p_mfc_enc.c
··· 785 785 strncpy(cap->card, dev->plat_dev->name, sizeof(cap->card) - 1); 786 786 cap->bus_info[0] = 0; 787 787 cap->version = KERNEL_VERSION(1, 0, 0); 788 - cap->capabilities = V4L2_CAP_VIDEO_CAPTURE 789 - | V4L2_CAP_VIDEO_OUTPUT 788 + cap->capabilities = V4L2_CAP_VIDEO_CAPTURE_MPLANE 789 + | V4L2_CAP_VIDEO_OUTPUT_MPLANE 790 790 | V4L2_CAP_STREAMING; 791 791 return 0; 792 792 }
+4 -2
drivers/media/video/uvc/uvc_ctrl.c
··· 1016 1016 1017 1017 menu_info = &mapping->menu_info[query_menu->index]; 1018 1018 1019 - if (ctrl->info.flags & UVC_CTRL_FLAG_GET_RES) { 1019 + if (mapping->data_type == UVC_CTRL_DATA_TYPE_BITMASK && 1020 + (ctrl->info.flags & UVC_CTRL_FLAG_GET_RES)) { 1020 1021 s32 bitmap; 1021 1022 1022 1023 if (!ctrl->cached) { ··· 1226 1225 /* Valid menu indices are reported by the GET_RES request for 1227 1226 * UVC controls that support it. 1228 1227 */ 1229 - if (ctrl->info.flags & UVC_CTRL_FLAG_GET_RES) { 1228 + if (mapping->data_type == UVC_CTRL_DATA_TYPE_BITMASK && 1229 + (ctrl->info.flags & UVC_CTRL_FLAG_GET_RES)) { 1230 1230 if (!ctrl->cached) { 1231 1231 ret = uvc_ctrl_populate_cache(chain, ctrl); 1232 1232 if (ret < 0)
+3 -2
drivers/media/video/v4l2-ctrls.c
··· 821 821 fill_event(&ev, ctrl, changes); 822 822 823 823 list_for_each_entry(sev, &ctrl->ev_subs, node) 824 - if (sev->fh && (sev->fh != fh || 825 - (sev->flags & V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK))) 824 + if (sev->fh != fh || 825 + (sev->flags & V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK)) 826 826 v4l2_event_queue_fh(sev->fh, &ev); 827 827 } 828 828 ··· 947 947 if (ctrl->cluster[0]->has_volatiles) 948 948 ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE; 949 949 } 950 + fh = NULL; 950 951 } 951 952 if (changed || update_inactive) { 952 953 /* If a control was changed that was not one of the controls
+9 -1
drivers/media/video/v4l2-event.c
··· 216 216 unsigned long flags; 217 217 unsigned i; 218 218 219 + if (sub->type == V4L2_EVENT_ALL) 220 + return -EINVAL; 221 + 219 222 if (elems < 1) 220 223 elems = 1; 221 224 if (sub->type == V4L2_EVENT_CTRL) { ··· 286 283 { 287 284 struct v4l2_subscribed_event *sev; 288 285 unsigned long flags; 286 + int i; 289 287 290 288 if (sub->type == V4L2_EVENT_ALL) { 291 289 v4l2_event_unsubscribe_all(fh); ··· 297 293 298 294 sev = v4l2_event_subscribed(fh, sub->type, sub->id); 299 295 if (sev != NULL) { 296 + /* Remove any pending events for this subscription */ 297 + for (i = 0; i < sev->in_use; i++) { 298 + list_del(&sev->events[sev_pos(sev, i)].list); 299 + fh->navailable--; 300 + } 300 301 list_del(&sev->list); 301 - sev->fh = NULL; 302 302 } 303 303 304 304 spin_unlock_irqrestore(&fh->vdev->fh_lock, flags);
+4 -2
drivers/media/video/videobuf2-core.c
··· 131 131 continue; 132 132 133 133 for (plane = 0; plane < vb->num_planes; ++plane) { 134 + vb->v4l2_planes[plane].length = q->plane_sizes[plane]; 134 135 vb->v4l2_planes[plane].m.mem_offset = off; 135 136 136 137 dprintk(3, "Buffer %d, plane %d offset 0x%08lx\n", ··· 265 264 q->num_buffers -= buffers; 266 265 if (!q->num_buffers) 267 266 q->memory = 0; 267 + INIT_LIST_HEAD(&q->queued_list); 268 268 } 269 269 270 270 /** ··· 298 296 { 299 297 unsigned int plane; 300 298 for (plane = 0; plane < vb->num_planes; ++plane) { 299 + void *mem_priv = vb->planes[plane].mem_priv; 301 300 /* 302 301 * If num_users() has not been provided, call_memop 303 302 * will return 0, apparently nobody cares about this 304 303 * case anyway. If num_users() returns more than 1, 305 304 * we are not the only user of the plane's memory. 306 305 */ 307 - if (call_memop(q, plane, num_users, 308 - vb->planes[plane].mem_priv) > 1) 306 + if (mem_priv && call_memop(q, plane, num_users, mem_priv) > 1) 309 307 return true; 310 308 } 311 309 return false;