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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull media fixes from Mauro Carvalho Chehab:
"For a some fixes for Kernel 3.9:
- subsystem build fix when VIDEO_DEV=y, VIDEO_V4L2=m and I2C=m
- compilation fix for arm multiarch preventing IR_RX51 to be selected
- regression fix at bttv crop logic
- s5p-mfc/m5mols/exynos: a few fixes for cameras on exynos hardware"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] [REGRESSION] bt8xx: Fix too large height in cropcap
[media] fix compilation with both V4L2 and I2C as 'm'
[media] m5mols: Fix bug in stream on handler
[media] s5p-fimc: Do not attempt to disable not enabled media pipeline
[media] s5p-mfc: Fix encoder control 15 issue
[media] s5p-mfc: Fix frame skip bug
[media] s5p-fimc: send valid m2m ctx to fimc_m2m_job_finish
[media] exynos-gsc: send valid m2m ctx to gsc_m2m_job_finish
[media] fimc-lite: Fix the variable type to avoid possible crash
[media] fimc-lite: Initialize 'step' field in fimc_lite_ctrl structure
[media] ir: IR_RX51 only works on OMAP2

+53 -38
+1 -1
drivers/media/i2c/m5mols/m5mols_core.c
··· 724 724 if (enable) { 725 725 if (is_code(code, M5MOLS_RESTYPE_MONITOR)) 726 726 ret = m5mols_start_monitor(info); 727 - if (is_code(code, M5MOLS_RESTYPE_CAPTURE)) 727 + else if (is_code(code, M5MOLS_RESTYPE_CAPTURE)) 728 728 ret = m5mols_start_capture(info); 729 729 else 730 730 ret = -EINVAL;
+15 -5
drivers/media/pci/bt8xx/bttv-driver.c
··· 250 250 vdelay start of active video in 2 * field lines relative to 251 251 trailing edge of /VRESET pulse (VDELAY register). 252 252 sheight height of active video in 2 * field lines. 253 + extraheight Added to sheight for cropcap.bounds.height only 253 254 videostart0 ITU-R frame line number of the line corresponding 254 255 to vdelay in the first field. */ 255 256 #define CROPCAP(minhdelayx1, hdelayx1, swidth, totalwidth, sqwidth, \ 256 - vdelay, sheight, videostart0) \ 257 + vdelay, sheight, extraheight, videostart0) \ 257 258 .cropcap.bounds.left = minhdelayx1, \ 258 259 /* * 2 because vertically we count field lines times two, */ \ 259 260 /* e.g. 23 * 2 to 23 * 2 + 576 in PAL-BGHI defrect. */ \ 260 261 .cropcap.bounds.top = (videostart0) * 2 - (vdelay) + MIN_VDELAY, \ 261 262 /* 4 is a safety margin at the end of the line. */ \ 262 263 .cropcap.bounds.width = (totalwidth) - (minhdelayx1) - 4, \ 263 - .cropcap.bounds.height = (sheight) + (vdelay) - MIN_VDELAY, \ 264 + .cropcap.bounds.height = (sheight) + (extraheight) + (vdelay) - \ 265 + MIN_VDELAY, \ 264 266 .cropcap.defrect.left = hdelayx1, \ 265 267 .cropcap.defrect.top = (videostart0) * 2, \ 266 268 .cropcap.defrect.width = swidth, \ ··· 303 301 /* totalwidth */ 1135, 304 302 /* sqwidth */ 944, 305 303 /* vdelay */ 0x20, 306 - /* bt878 (and bt848?) can capture another 307 - line below active video. */ 308 - /* sheight */ (576 + 2) + 0x20 - 2, 304 + /* sheight */ 576, 305 + /* bt878 (and bt848?) can capture another 306 + line below active video. */ 307 + /* extraheight */ 2, 309 308 /* videostart0 */ 23) 310 309 },{ 311 310 .v4l2_id = V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_KR, ··· 333 330 /* sqwidth */ 780, 334 331 /* vdelay */ 0x1a, 335 332 /* sheight */ 480, 333 + /* extraheight */ 0, 336 334 /* videostart0 */ 23) 337 335 },{ 338 336 .v4l2_id = V4L2_STD_SECAM, ··· 359 355 /* sqwidth */ 944, 360 356 /* vdelay */ 0x20, 361 357 /* sheight */ 576, 358 + /* extraheight */ 0, 362 359 /* videostart0 */ 23) 363 360 },{ 364 361 .v4l2_id = V4L2_STD_PAL_Nc, ··· 385 380 /* sqwidth */ 780, 386 381 /* vdelay */ 0x1a, 387 382 /* sheight */ 576, 383 + /* extraheight */ 0, 388 384 /* videostart0 */ 23) 389 385 },{ 390 386 .v4l2_id = V4L2_STD_PAL_M, ··· 411 405 /* sqwidth */ 780, 412 406 /* vdelay */ 0x1a, 413 407 /* sheight */ 480, 408 + /* extraheight */ 0, 414 409 /* videostart0 */ 23) 415 410 },{ 416 411 .v4l2_id = V4L2_STD_PAL_N, ··· 437 430 /* sqwidth */ 944, 438 431 /* vdelay */ 0x20, 439 432 /* sheight */ 576, 433 + /* extraheight */ 0, 440 434 /* videostart0 */ 23) 441 435 },{ 442 436 .v4l2_id = V4L2_STD_NTSC_M_JP, ··· 463 455 /* sqwidth */ 780, 464 456 /* vdelay */ 0x16, 465 457 /* sheight */ 480, 458 + /* extraheight */ 0, 466 459 /* videostart0 */ 23) 467 460 },{ 468 461 /* that one hopefully works with the strange timing ··· 493 484 /* sqwidth */ 944, 494 485 /* vdelay */ 0x1a, 495 486 /* sheight */ 480, 487 + /* extraheight */ 0, 496 488 /* videostart0 */ 23) 497 489 } 498 490 };
+5 -3
drivers/media/platform/exynos-gsc/gsc-core.c
··· 1054 1054 1055 1055 static int gsc_m2m_resume(struct gsc_dev *gsc) 1056 1056 { 1057 + struct gsc_ctx *ctx; 1057 1058 unsigned long flags; 1058 1059 1059 1060 spin_lock_irqsave(&gsc->slock, flags); 1060 1061 /* Clear for full H/W setup in first run after resume */ 1062 + ctx = gsc->m2m.ctx; 1061 1063 gsc->m2m.ctx = NULL; 1062 1064 spin_unlock_irqrestore(&gsc->slock, flags); 1063 1065 1064 1066 if (test_and_clear_bit(ST_M2M_SUSPENDED, &gsc->state)) 1065 - gsc_m2m_job_finish(gsc->m2m.ctx, 1066 - VB2_BUF_STATE_ERROR); 1067 + gsc_m2m_job_finish(ctx, VB2_BUF_STATE_ERROR); 1068 + 1067 1069 return 0; 1068 1070 } 1069 1071 ··· 1206 1204 /* Do not resume if the device was idle before system suspend */ 1207 1205 spin_lock_irqsave(&gsc->slock, flags); 1208 1206 if (!test_and_clear_bit(ST_SUSPEND, &gsc->state) || 1209 - !gsc_m2m_active(gsc)) { 1207 + !gsc_m2m_opened(gsc)) { 1210 1208 spin_unlock_irqrestore(&gsc->slock, flags); 1211 1209 return 0; 1212 1210 }
+4 -2
drivers/media/platform/s5p-fimc/fimc-core.c
··· 850 850 851 851 static int fimc_m2m_resume(struct fimc_dev *fimc) 852 852 { 853 + struct fimc_ctx *ctx; 853 854 unsigned long flags; 854 855 855 856 spin_lock_irqsave(&fimc->slock, flags); 856 857 /* Clear for full H/W setup in first run after resume */ 858 + ctx = fimc->m2m.ctx; 857 859 fimc->m2m.ctx = NULL; 858 860 spin_unlock_irqrestore(&fimc->slock, flags); 859 861 860 862 if (test_and_clear_bit(ST_M2M_SUSPENDED, &fimc->state)) 861 - fimc_m2m_job_finish(fimc->m2m.ctx, 862 - VB2_BUF_STATE_ERROR); 863 + fimc_m2m_job_finish(ctx, VB2_BUF_STATE_ERROR); 864 + 863 865 return 0; 864 866 } 865 867
+4 -4
drivers/media/platform/s5p-fimc/fimc-lite-reg.c
··· 128 128 void flite_hw_set_source_format(struct fimc_lite *dev, struct flite_frame *f) 129 129 { 130 130 enum v4l2_mbus_pixelcode pixelcode = dev->fmt->mbus_code; 131 - unsigned int i = ARRAY_SIZE(src_pixfmt_map); 131 + int i = ARRAY_SIZE(src_pixfmt_map); 132 132 u32 cfg; 133 133 134 - while (i-- >= 0) { 134 + while (--i >= 0) { 135 135 if (src_pixfmt_map[i][0] == pixelcode) 136 136 break; 137 137 } ··· 224 224 { V4L2_MBUS_FMT_VYUY8_2X8, FLITE_REG_CIODMAFMT_CRYCBY }, 225 225 }; 226 226 u32 cfg = readl(dev->regs + FLITE_REG_CIODMAFMT); 227 - unsigned int i = ARRAY_SIZE(pixcode); 227 + int i = ARRAY_SIZE(pixcode); 228 228 229 - while (i-- >= 0) 229 + while (--i >= 0) 230 230 if (pixcode[i][0] == dev->fmt->mbus_code) 231 231 break; 232 232 cfg &= ~FLITE_REG_CIODMAFMT_YCBCR_ORDER_MASK;
+1
drivers/media/platform/s5p-fimc/fimc-lite.c
··· 1408 1408 .id = V4L2_CTRL_CLASS_USER | 0x1001, 1409 1409 .type = V4L2_CTRL_TYPE_BOOLEAN, 1410 1410 .name = "Test Pattern 640x480", 1411 + .step = 1, 1411 1412 }; 1412 1413 1413 1414 static int fimc_lite_create_capture_subdev(struct fimc_lite *fimc)
+19 -20
drivers/media/platform/s5p-fimc/fimc-mdevice.c
··· 827 827 struct fimc_pipeline *pipeline; 828 828 struct v4l2_subdev *sd; 829 829 struct mutex *lock; 830 - int ret = 0; 830 + int i, ret = 0; 831 831 int ref_count; 832 832 833 833 if (media_entity_type(sink->entity) != MEDIA_ENT_T_V4L2_SUBDEV) ··· 854 854 return 0; 855 855 } 856 856 857 + mutex_lock(lock); 858 + ref_count = fimc ? fimc->vid_cap.refcnt : fimc_lite->ref_count; 859 + 857 860 if (!(flags & MEDIA_LNK_FL_ENABLED)) { 858 - int i; 859 - mutex_lock(lock); 860 - ret = __fimc_pipeline_close(pipeline); 861 + if (ref_count > 0) { 862 + ret = __fimc_pipeline_close(pipeline); 863 + if (!ret && fimc) 864 + fimc_ctrls_delete(fimc->vid_cap.ctx); 865 + } 861 866 for (i = 0; i < IDX_MAX; i++) 862 867 pipeline->subdevs[i] = NULL; 863 - if (fimc) 864 - fimc_ctrls_delete(fimc->vid_cap.ctx); 865 - mutex_unlock(lock); 866 - return ret; 868 + } else if (ref_count > 0) { 869 + /* 870 + * Link activation. Enable power of pipeline elements only if 871 + * the pipeline is already in use, i.e. its video node is open. 872 + * Recreate the controls destroyed during the link deactivation. 873 + */ 874 + ret = __fimc_pipeline_open(pipeline, 875 + source->entity, true); 876 + if (!ret && fimc) 877 + ret = fimc_capture_ctrls_create(fimc); 867 878 } 868 - /* 869 - * Link activation. Enable power of pipeline elements only if the 870 - * pipeline is already in use, i.e. its video node is opened. 871 - * Recreate the controls destroyed during the link deactivation. 872 - */ 873 - mutex_lock(lock); 874 - 875 - ref_count = fimc ? fimc->vid_cap.refcnt : fimc_lite->ref_count; 876 - if (ref_count > 0) 877 - ret = __fimc_pipeline_open(pipeline, source->entity, true); 878 - if (!ret && fimc) 879 - ret = fimc_capture_ctrls_create(fimc); 880 879 881 880 mutex_unlock(lock); 882 881 return ret ? -EPIPE : ret;
+1 -1
drivers/media/platform/s5p-mfc/s5p_mfc.c
··· 276 276 unsigned int frame_type; 277 277 278 278 dspl_y_addr = s5p_mfc_hw_call(dev->mfc_ops, get_dspl_y_adr, dev); 279 - frame_type = s5p_mfc_hw_call(dev->mfc_ops, get_dec_frame_type, dev); 279 + frame_type = s5p_mfc_hw_call(dev->mfc_ops, get_disp_frame_type, ctx); 280 280 281 281 /* If frame is same as previous then skip and do not dequeue */ 282 282 if (frame_type == S5P_FIMV_DECODE_FRAME_SKIPPED) {
+1
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
··· 232 232 .minimum = 0, 233 233 .maximum = 1, 234 234 .default_value = 0, 235 + .step = 1, 235 236 .menu_skip_mask = 0, 236 237 }, 237 238 {
+1 -1
drivers/media/rc/Kconfig
··· 291 291 292 292 config IR_RX51 293 293 tristate "Nokia N900 IR transmitter diode" 294 - depends on OMAP_DM_TIMER && LIRC && !ARCH_MULTIPLATFORM 294 + depends on OMAP_DM_TIMER && ARCH_OMAP2PLUS && LIRC && !ARCH_MULTIPLATFORM 295 295 ---help--- 296 296 Say Y or M here if you want to enable support for the IR 297 297 transmitter diode built in the Nokia N900 (RX51) device.
+1 -1
drivers/media/v4l2-core/Makefile
··· 10 10 videodev-objs += v4l2-compat-ioctl32.o 11 11 endif 12 12 13 - obj-$(CONFIG_VIDEO_DEV) += videodev.o 13 + obj-$(CONFIG_VIDEO_V4L2) += videodev.o 14 14 obj-$(CONFIG_VIDEO_V4L2_INT_DEVICE) += v4l2-int-device.o 15 15 obj-$(CONFIG_VIDEO_V4L2) += v4l2-common.o 16 16