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

Merge tag 'media/v3.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:
"A series of fixup patches for version 4.0:

- one VB2 core fixup, when stopping the stream;
- one VB2 core fixup for dma-contig memory type;
- driver fixes at rtl28xx, s5p (tv, jpeg, mfc, soc-camera, sh_veu,
cx23885, gspca"

* tag 'media/v3.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] rtl28xxu: return success for unimplemented FE callback
[media] rtl2832: disable regmap register cache
[media] vb2: Fix dma_dir setting for dma-contig mem type
[media] media: s5p-mfc: fix broken pointer cast on 64bit arch
[media] media: s5p-mfc: fix mmap support for 64bit arch
[media] cx23885: fix querycap
[media] sh_veu: v4l2_dev wasn't set
[media] s5p-mfc: Fix NULL pointer dereference caused by not set q->lock
[media] s5p-jpeg: exynos3250: fix erroneous reset procedure
[media] s5p-tv: hdmi needs I2C support
[media] s5p-jpeg: Initialize cb and cr to zero
[media] media: fix gspca drivers build dependencies
[media] soc-camera: Fix devm_kfree() in soc_of_bind()
[media] media: atmel-isi: increase the burst length to improve the performance
[media] vb2: fix 'UNBALANCED' warnings when calling vb2_thread_stop()

+34 -30
+1 -1
drivers/media/dvb-frontends/rtl2832.c
··· 1240 1240 dev->regmap_config.max_register = 5 * 0x100, 1241 1241 dev->regmap_config.ranges = regmap_range_cfg, 1242 1242 dev->regmap_config.num_ranges = ARRAY_SIZE(regmap_range_cfg), 1243 - dev->regmap_config.cache_type = REGCACHE_RBTREE, 1243 + dev->regmap_config.cache_type = REGCACHE_NONE, 1244 1244 dev->regmap = regmap_init(&client->dev, &regmap_bus, client, 1245 1245 &dev->regmap_config); 1246 1246 if (IS_ERR(dev->regmap)) {
+6 -7
drivers/media/pci/cx23885/cx23885-417.c
··· 1339 1339 strlcpy(cap->driver, dev->name, sizeof(cap->driver)); 1340 1340 strlcpy(cap->card, cx23885_boards[tsport->dev->board].name, 1341 1341 sizeof(cap->card)); 1342 - sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci)); 1343 - cap->capabilities = 1344 - V4L2_CAP_VIDEO_CAPTURE | 1345 - V4L2_CAP_READWRITE | 1346 - V4L2_CAP_STREAMING | 1347 - 0; 1342 + sprintf(cap->bus_info, "PCIe:%s", pci_name(dev->pci)); 1343 + cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | 1344 + V4L2_CAP_STREAMING; 1348 1345 if (dev->tuner_type != TUNER_ABSENT) 1349 - cap->capabilities |= V4L2_CAP_TUNER; 1346 + cap->device_caps |= V4L2_CAP_TUNER; 1347 + cap->capabilities = cap->device_caps | V4L2_CAP_VBI_CAPTURE | 1348 + V4L2_CAP_AUDIO | V4L2_CAP_DEVICE_CAPS; 1350 1349 1351 1350 return 0; 1352 1351 }
+3
drivers/media/platform/s5p-jpeg/jpeg-core.c
··· 1845 1845 struct s5p_jpeg_addr jpeg_addr; 1846 1846 u32 pix_size, padding_bytes = 0; 1847 1847 1848 + jpeg_addr.cb = 0; 1849 + jpeg_addr.cr = 0; 1850 + 1848 1851 pix_size = ctx->cap_q.w * ctx->cap_q.h; 1849 1852 1850 1853 if (ctx->mode == S5P_JPEG_ENCODE) {
+1 -1
drivers/media/platform/s5p-jpeg/jpeg-hw-exynos3250.c
··· 20 20 21 21 void exynos3250_jpeg_reset(void __iomem *regs) 22 22 { 23 - u32 reg = 0; 23 + u32 reg = 1; 24 24 int count = 1000; 25 25 26 26 writel(1, regs + EXYNOS3250_SW_RESET);
+1
drivers/media/platform/s5p-mfc/s5p_mfc.c
··· 833 833 q->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; 834 834 q->io_modes = VB2_MMAP; 835 835 q->drv_priv = &ctx->fh; 836 + q->lock = &dev->mfc_mutex; 836 837 if (vdev == dev->vfd_dec) { 837 838 q->io_modes = VB2_MMAP; 838 839 q->ops = get_dec_queue_ops();
+1 -1
drivers/media/platform/s5p-mfc/s5p_mfc_common.h
··· 29 29 30 30 /* Offset base used to differentiate between CAPTURE and OUTPUT 31 31 * while mmaping */ 32 - #define DST_QUEUE_OFF_BASE (TASK_SIZE / 2) 32 + #define DST_QUEUE_OFF_BASE (1 << 30) 33 33 34 34 #define MFC_BANK1_ALLOC_CTX 0 35 35 #define MFC_BANK2_ALLOC_CTX 1
+1 -1
drivers/media/platform/s5p-mfc/s5p_mfc_opr.h
··· 302 302 void (*write_info)(struct s5p_mfc_ctx *ctx, unsigned int data, 303 303 unsigned int ofs); 304 304 unsigned int (*read_info)(struct s5p_mfc_ctx *ctx, 305 - unsigned int ofs); 305 + unsigned long ofs); 306 306 int (*get_dspl_y_adr)(struct s5p_mfc_dev *dev); 307 307 int (*get_dec_y_adr)(struct s5p_mfc_dev *dev); 308 308 int (*get_dspl_status)(struct s5p_mfc_dev *dev);
+3 -3
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
··· 263 263 static void s5p_mfc_write_info_v5(struct s5p_mfc_ctx *ctx, unsigned int data, 264 264 unsigned int ofs) 265 265 { 266 - writel(data, (volatile void __iomem *)(ctx->shm.virt + ofs)); 266 + writel(data, (void *)(ctx->shm.virt + ofs)); 267 267 wmb(); 268 268 } 269 269 270 270 static unsigned int s5p_mfc_read_info_v5(struct s5p_mfc_ctx *ctx, 271 - unsigned int ofs) 271 + unsigned long ofs) 272 272 { 273 273 rmb(); 274 - return readl((volatile void __iomem *)(ctx->shm.virt + ofs)); 274 + return readl((void *)(ctx->shm.virt + ofs)); 275 275 } 276 276 277 277 static void s5p_mfc_dec_calc_dpb_size_v5(struct s5p_mfc_ctx *ctx)
+3 -3
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
··· 1852 1852 unsigned int ofs) 1853 1853 { 1854 1854 s5p_mfc_clock_on(); 1855 - writel(data, (volatile void __iomem *)((unsigned long)ofs)); 1855 + writel(data, (void *)((unsigned long)ofs)); 1856 1856 s5p_mfc_clock_off(); 1857 1857 } 1858 1858 1859 1859 static unsigned int 1860 - s5p_mfc_read_info_v6(struct s5p_mfc_ctx *ctx, unsigned int ofs) 1860 + s5p_mfc_read_info_v6(struct s5p_mfc_ctx *ctx, unsigned long ofs) 1861 1861 { 1862 1862 int ret; 1863 1863 1864 1864 s5p_mfc_clock_on(); 1865 - ret = readl((volatile void __iomem *)((unsigned long)ofs)); 1865 + ret = readl((void *)ofs); 1866 1866 s5p_mfc_clock_off(); 1867 1867 1868 1868 return ret;
+1
drivers/media/platform/s5p-tv/Kconfig
··· 20 20 config VIDEO_SAMSUNG_S5P_HDMI 21 21 tristate "Samsung HDMI Driver" 22 22 depends on VIDEO_V4L2 23 + depends on I2C 23 24 depends on VIDEO_SAMSUNG_S5P_TV 24 25 select VIDEO_SAMSUNG_S5P_HDMIPHY 25 26 help
+1
drivers/media/platform/sh_veu.c
··· 1158 1158 } 1159 1159 1160 1160 *vdev = sh_veu_videodev; 1161 + vdev->v4l2_dev = &veu->v4l2_dev; 1161 1162 spin_lock_init(&veu->lock); 1162 1163 mutex_init(&veu->fop_lock); 1163 1164 vdev->lock = &veu->fop_lock;
+2
drivers/media/platform/soc_camera/atmel-isi.c
··· 843 843 if (isi->pdata.full_mode) 844 844 cfg1 |= ISI_CFG1_FULL_MODE; 845 845 846 + cfg1 |= ISI_CFG1_THMASK_BEATS_16; 847 + 846 848 isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS); 847 849 isi_writel(isi, ISI_CFG1, cfg1); 848 850
+1 -1
drivers/media/platform/soc_camera/soc_camera.c
··· 1665 1665 eaddpdev: 1666 1666 platform_device_put(sasc->pdev); 1667 1667 eallocpdev: 1668 - devm_kfree(ici->v4l2_dev.dev, sasc); 1668 + devm_kfree(ici->v4l2_dev.dev, info); 1669 1669 dev_err(ici->v4l2_dev.dev, "group probe failed: %d\n", ret); 1670 1670 1671 1671 return ret;
-2
drivers/media/usb/dvb-usb-v2/rtl28xxu.c
··· 780 780 case TUNER_RTL2832_TUA9001: 781 781 return rtl2832u_tua9001_tuner_callback(d, cmd, arg); 782 782 } 783 - default: 784 - return -EINVAL; 785 783 } 786 784 787 785 return 0;
+1
drivers/media/usb/gspca/Kconfig
··· 1 1 menuconfig USB_GSPCA 2 2 tristate "GSPCA based webcams" 3 3 depends on VIDEO_V4L2 4 + depends on INPUT || INPUT=n 4 5 default m 5 6 ---help--- 6 7 Say Y here if you want to enable selecting webcams based
+3 -8
drivers/media/v4l2-core/videobuf2-core.c
··· 3230 3230 3231 3231 if (threadio == NULL) 3232 3232 return 0; 3233 - call_void_qop(q, wait_finish, q); 3234 3233 threadio->stop = true; 3235 - vb2_internal_streamoff(q, q->type); 3236 - call_void_qop(q, wait_prepare, q); 3234 + /* Wake up all pending sleeps in the thread */ 3235 + vb2_queue_error(q); 3237 3236 err = kthread_stop(threadio->thread); 3238 - q->fileio = NULL; 3239 - fileio->req.count = 0; 3240 - vb2_reqbufs(q, &fileio->req); 3241 - kfree(fileio); 3237 + __vb2_cleanup_fileio(q); 3242 3238 threadio->thread = NULL; 3243 3239 kfree(threadio); 3244 - q->fileio = NULL; 3245 3240 q->threadio = NULL; 3246 3241 return err; 3247 3242 }
+1 -2
drivers/media/v4l2-core/videobuf2-dma-contig.c
··· 632 632 } 633 633 634 634 /* extract page list from userspace mapping */ 635 - ret = vb2_dc_get_user_pages(start, pages, n_pages, vma, 636 - dma_dir == DMA_FROM_DEVICE); 635 + ret = vb2_dc_get_user_pages(start, pages, n_pages, vma, dma_dir); 637 636 if (ret) { 638 637 unsigned long pfn; 639 638 if (vb2_dc_get_user_pfn(start, n_pages, vma, &pfn) == 0) {
+4
include/media/atmel-isi.h
··· 59 59 #define ISI_CFG1_FRATE_DIV_MASK (7 << 8) 60 60 #define ISI_CFG1_DISCR (1 << 11) 61 61 #define ISI_CFG1_FULL_MODE (1 << 12) 62 + /* Definition for THMASK(ISI_V2) */ 63 + #define ISI_CFG1_THMASK_BEATS_4 (0 << 13) 64 + #define ISI_CFG1_THMASK_BEATS_8 (1 << 13) 65 + #define ISI_CFG1_THMASK_BEATS_16 (2 << 13) 62 66 63 67 /* Bitfields in CFG2 */ 64 68 #define ISI_CFG2_GRAYSCALE (1 << 13)