Commit 7b43b473 authored by Linus Torvalds's avatar Linus Torvalds

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()
parents f22e6e84 b18042a6
...@@ -1240,7 +1240,7 @@ static int rtl2832_probe(struct i2c_client *client, ...@@ -1240,7 +1240,7 @@ static int rtl2832_probe(struct i2c_client *client,
dev->regmap_config.max_register = 5 * 0x100, dev->regmap_config.max_register = 5 * 0x100,
dev->regmap_config.ranges = regmap_range_cfg, dev->regmap_config.ranges = regmap_range_cfg,
dev->regmap_config.num_ranges = ARRAY_SIZE(regmap_range_cfg), dev->regmap_config.num_ranges = ARRAY_SIZE(regmap_range_cfg),
dev->regmap_config.cache_type = REGCACHE_RBTREE, dev->regmap_config.cache_type = REGCACHE_NONE,
dev->regmap = regmap_init(&client->dev, &regmap_bus, client, dev->regmap = regmap_init(&client->dev, &regmap_bus, client,
&dev->regmap_config); &dev->regmap_config);
if (IS_ERR(dev->regmap)) { if (IS_ERR(dev->regmap)) {
......
...@@ -1339,14 +1339,13 @@ static int vidioc_querycap(struct file *file, void *priv, ...@@ -1339,14 +1339,13 @@ static int vidioc_querycap(struct file *file, void *priv,
strlcpy(cap->driver, dev->name, sizeof(cap->driver)); strlcpy(cap->driver, dev->name, sizeof(cap->driver));
strlcpy(cap->card, cx23885_boards[tsport->dev->board].name, strlcpy(cap->card, cx23885_boards[tsport->dev->board].name,
sizeof(cap->card)); sizeof(cap->card));
sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci)); sprintf(cap->bus_info, "PCIe:%s", pci_name(dev->pci));
cap->capabilities = cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
V4L2_CAP_READWRITE |
V4L2_CAP_STREAMING |
0;
if (dev->tuner_type != TUNER_ABSENT) if (dev->tuner_type != TUNER_ABSENT)
cap->capabilities |= V4L2_CAP_TUNER; cap->device_caps |= V4L2_CAP_TUNER;
cap->capabilities = cap->device_caps | V4L2_CAP_VBI_CAPTURE |
V4L2_CAP_AUDIO | V4L2_CAP_DEVICE_CAPS;
return 0; return 0;
} }
......
...@@ -1845,6 +1845,9 @@ static void exynos4_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx) ...@@ -1845,6 +1845,9 @@ static void exynos4_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
struct s5p_jpeg_addr jpeg_addr; struct s5p_jpeg_addr jpeg_addr;
u32 pix_size, padding_bytes = 0; u32 pix_size, padding_bytes = 0;
jpeg_addr.cb = 0;
jpeg_addr.cr = 0;
pix_size = ctx->cap_q.w * ctx->cap_q.h; pix_size = ctx->cap_q.w * ctx->cap_q.h;
if (ctx->mode == S5P_JPEG_ENCODE) { if (ctx->mode == S5P_JPEG_ENCODE) {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
void exynos3250_jpeg_reset(void __iomem *regs) void exynos3250_jpeg_reset(void __iomem *regs)
{ {
u32 reg = 0; u32 reg = 1;
int count = 1000; int count = 1000;
writel(1, regs + EXYNOS3250_SW_RESET); writel(1, regs + EXYNOS3250_SW_RESET);
......
...@@ -833,6 +833,7 @@ static int s5p_mfc_open(struct file *file) ...@@ -833,6 +833,7 @@ static int s5p_mfc_open(struct file *file)
q->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; q->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
q->io_modes = VB2_MMAP; q->io_modes = VB2_MMAP;
q->drv_priv = &ctx->fh; q->drv_priv = &ctx->fh;
q->lock = &dev->mfc_mutex;
if (vdev == dev->vfd_dec) { if (vdev == dev->vfd_dec) {
q->io_modes = VB2_MMAP; q->io_modes = VB2_MMAP;
q->ops = get_dec_queue_ops(); q->ops = get_dec_queue_ops();
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
/* Offset base used to differentiate between CAPTURE and OUTPUT /* Offset base used to differentiate between CAPTURE and OUTPUT
* while mmaping */ * while mmaping */
#define DST_QUEUE_OFF_BASE (TASK_SIZE / 2) #define DST_QUEUE_OFF_BASE (1 << 30)
#define MFC_BANK1_ALLOC_CTX 0 #define MFC_BANK1_ALLOC_CTX 0
#define MFC_BANK2_ALLOC_CTX 1 #define MFC_BANK2_ALLOC_CTX 1
......
...@@ -302,7 +302,7 @@ struct s5p_mfc_hw_ops { ...@@ -302,7 +302,7 @@ struct s5p_mfc_hw_ops {
void (*write_info)(struct s5p_mfc_ctx *ctx, unsigned int data, void (*write_info)(struct s5p_mfc_ctx *ctx, unsigned int data,
unsigned int ofs); unsigned int ofs);
unsigned int (*read_info)(struct s5p_mfc_ctx *ctx, unsigned int (*read_info)(struct s5p_mfc_ctx *ctx,
unsigned int ofs); unsigned long ofs);
int (*get_dspl_y_adr)(struct s5p_mfc_dev *dev); int (*get_dspl_y_adr)(struct s5p_mfc_dev *dev);
int (*get_dec_y_adr)(struct s5p_mfc_dev *dev); int (*get_dec_y_adr)(struct s5p_mfc_dev *dev);
int (*get_dspl_status)(struct s5p_mfc_dev *dev); int (*get_dspl_status)(struct s5p_mfc_dev *dev);
......
...@@ -263,15 +263,15 @@ static void s5p_mfc_release_dev_context_buffer_v5(struct s5p_mfc_dev *dev) ...@@ -263,15 +263,15 @@ static void s5p_mfc_release_dev_context_buffer_v5(struct s5p_mfc_dev *dev)
static void s5p_mfc_write_info_v5(struct s5p_mfc_ctx *ctx, unsigned int data, static void s5p_mfc_write_info_v5(struct s5p_mfc_ctx *ctx, unsigned int data,
unsigned int ofs) unsigned int ofs)
{ {
writel(data, (volatile void __iomem *)(ctx->shm.virt + ofs)); writel(data, (void *)(ctx->shm.virt + ofs));
wmb(); wmb();
} }
static unsigned int s5p_mfc_read_info_v5(struct s5p_mfc_ctx *ctx, static unsigned int s5p_mfc_read_info_v5(struct s5p_mfc_ctx *ctx,
unsigned int ofs) unsigned long ofs)
{ {
rmb(); rmb();
return readl((volatile void __iomem *)(ctx->shm.virt + ofs)); return readl((void *)(ctx->shm.virt + ofs));
} }
static void s5p_mfc_dec_calc_dpb_size_v5(struct s5p_mfc_ctx *ctx) static void s5p_mfc_dec_calc_dpb_size_v5(struct s5p_mfc_ctx *ctx)
......
...@@ -1852,17 +1852,17 @@ static void s5p_mfc_write_info_v6(struct s5p_mfc_ctx *ctx, unsigned int data, ...@@ -1852,17 +1852,17 @@ static void s5p_mfc_write_info_v6(struct s5p_mfc_ctx *ctx, unsigned int data,
unsigned int ofs) unsigned int ofs)
{ {
s5p_mfc_clock_on(); s5p_mfc_clock_on();
writel(data, (volatile void __iomem *)((unsigned long)ofs)); writel(data, (void *)((unsigned long)ofs));
s5p_mfc_clock_off(); s5p_mfc_clock_off();
} }
static unsigned int static unsigned int
s5p_mfc_read_info_v6(struct s5p_mfc_ctx *ctx, unsigned int ofs) s5p_mfc_read_info_v6(struct s5p_mfc_ctx *ctx, unsigned long ofs)
{ {
int ret; int ret;
s5p_mfc_clock_on(); s5p_mfc_clock_on();
ret = readl((volatile void __iomem *)((unsigned long)ofs)); ret = readl((void *)ofs);
s5p_mfc_clock_off(); s5p_mfc_clock_off();
return ret; return ret;
......
...@@ -20,6 +20,7 @@ if VIDEO_SAMSUNG_S5P_TV ...@@ -20,6 +20,7 @@ if VIDEO_SAMSUNG_S5P_TV
config VIDEO_SAMSUNG_S5P_HDMI config VIDEO_SAMSUNG_S5P_HDMI
tristate "Samsung HDMI Driver" tristate "Samsung HDMI Driver"
depends on VIDEO_V4L2 depends on VIDEO_V4L2
depends on I2C
depends on VIDEO_SAMSUNG_S5P_TV depends on VIDEO_SAMSUNG_S5P_TV
select VIDEO_SAMSUNG_S5P_HDMIPHY select VIDEO_SAMSUNG_S5P_HDMIPHY
help help
......
...@@ -1158,6 +1158,7 @@ static int sh_veu_probe(struct platform_device *pdev) ...@@ -1158,6 +1158,7 @@ static int sh_veu_probe(struct platform_device *pdev)
} }
*vdev = sh_veu_videodev; *vdev = sh_veu_videodev;
vdev->v4l2_dev = &veu->v4l2_dev;
spin_lock_init(&veu->lock); spin_lock_init(&veu->lock);
mutex_init(&veu->fop_lock); mutex_init(&veu->fop_lock);
vdev->lock = &veu->fop_lock; vdev->lock = &veu->fop_lock;
......
...@@ -843,6 +843,8 @@ static int isi_camera_set_bus_param(struct soc_camera_device *icd) ...@@ -843,6 +843,8 @@ static int isi_camera_set_bus_param(struct soc_camera_device *icd)
if (isi->pdata.full_mode) if (isi->pdata.full_mode)
cfg1 |= ISI_CFG1_FULL_MODE; cfg1 |= ISI_CFG1_FULL_MODE;
cfg1 |= ISI_CFG1_THMASK_BEATS_16;
isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS); isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS);
isi_writel(isi, ISI_CFG1, cfg1); isi_writel(isi, ISI_CFG1, cfg1);
......
...@@ -1665,7 +1665,7 @@ static int soc_of_bind(struct soc_camera_host *ici, ...@@ -1665,7 +1665,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
eaddpdev: eaddpdev:
platform_device_put(sasc->pdev); platform_device_put(sasc->pdev);
eallocpdev: eallocpdev:
devm_kfree(ici->v4l2_dev.dev, sasc); devm_kfree(ici->v4l2_dev.dev, info);
dev_err(ici->v4l2_dev.dev, "group probe failed: %d\n", ret); dev_err(ici->v4l2_dev.dev, "group probe failed: %d\n", ret);
return ret; return ret;
......
...@@ -780,8 +780,6 @@ static int rtl2832u_frontend_callback(void *adapter_priv, int component, ...@@ -780,8 +780,6 @@ static int rtl2832u_frontend_callback(void *adapter_priv, int component,
case TUNER_RTL2832_TUA9001: case TUNER_RTL2832_TUA9001:
return rtl2832u_tua9001_tuner_callback(d, cmd, arg); return rtl2832u_tua9001_tuner_callback(d, cmd, arg);
} }
default:
return -EINVAL;
} }
return 0; return 0;
......
menuconfig USB_GSPCA menuconfig USB_GSPCA
tristate "GSPCA based webcams" tristate "GSPCA based webcams"
depends on VIDEO_V4L2 depends on VIDEO_V4L2
depends on INPUT || INPUT=n
default m default m
---help--- ---help---
Say Y here if you want to enable selecting webcams based Say Y here if you want to enable selecting webcams based
......
...@@ -3230,18 +3230,13 @@ int vb2_thread_stop(struct vb2_queue *q) ...@@ -3230,18 +3230,13 @@ int vb2_thread_stop(struct vb2_queue *q)
if (threadio == NULL) if (threadio == NULL)
return 0; return 0;
call_void_qop(q, wait_finish, q);
threadio->stop = true; threadio->stop = true;
vb2_internal_streamoff(q, q->type); /* Wake up all pending sleeps in the thread */
call_void_qop(q, wait_prepare, q); vb2_queue_error(q);
err = kthread_stop(threadio->thread); err = kthread_stop(threadio->thread);
q->fileio = NULL; __vb2_cleanup_fileio(q);
fileio->req.count = 0;
vb2_reqbufs(q, &fileio->req);
kfree(fileio);
threadio->thread = NULL; threadio->thread = NULL;
kfree(threadio); kfree(threadio);
q->fileio = NULL;
q->threadio = NULL; q->threadio = NULL;
return err; return err;
} }
......
...@@ -632,8 +632,7 @@ static void *vb2_dc_get_userptr(void *alloc_ctx, unsigned long vaddr, ...@@ -632,8 +632,7 @@ static void *vb2_dc_get_userptr(void *alloc_ctx, unsigned long vaddr,
} }
/* extract page list from userspace mapping */ /* extract page list from userspace mapping */
ret = vb2_dc_get_user_pages(start, pages, n_pages, vma, ret = vb2_dc_get_user_pages(start, pages, n_pages, vma, dma_dir);
dma_dir == DMA_FROM_DEVICE);
if (ret) { if (ret) {
unsigned long pfn; unsigned long pfn;
if (vb2_dc_get_user_pfn(start, n_pages, vma, &pfn) == 0) { if (vb2_dc_get_user_pfn(start, n_pages, vma, &pfn) == 0) {
......
...@@ -59,6 +59,10 @@ ...@@ -59,6 +59,10 @@
#define ISI_CFG1_FRATE_DIV_MASK (7 << 8) #define ISI_CFG1_FRATE_DIV_MASK (7 << 8)
#define ISI_CFG1_DISCR (1 << 11) #define ISI_CFG1_DISCR (1 << 11)
#define ISI_CFG1_FULL_MODE (1 << 12) #define ISI_CFG1_FULL_MODE (1 << 12)
/* Definition for THMASK(ISI_V2) */
#define ISI_CFG1_THMASK_BEATS_4 (0 << 13)
#define ISI_CFG1_THMASK_BEATS_8 (1 << 13)
#define ISI_CFG1_THMASK_BEATS_16 (2 << 13)
/* Bitfields in CFG2 */ /* Bitfields in CFG2 */
#define ISI_CFG2_GRAYSCALE (1 << 13) #define ISI_CFG2_GRAYSCALE (1 << 13)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment