summaryrefslogtreecommitdiff
path: root/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-05 20:05:15 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-05 20:05:15 (GMT)
commitb0378657549bbc73ac0ec6e9332fcf3c53362365 (patch)
tree61aecdd60c34f06085a29fc6cbb0b4209484585e /drivers/media/platform/sti/bdisp/bdisp-v4l2.c
parent66339fdacb63fc7908e7eb755b9fffa672ffbb10 (diff)
parent79f5b6ae960d380c829fb67d5dadcd1d025d2775 (diff)
downloadlinux-b0378657549bbc73ac0ec6e9332fcf3c53362365.tar.xz
Merge tag 'media/v4.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: "Media updates, including: - Lots of improvements at the kABI documentation - Split of Videobuf2 into a common part and a V4L2 specific one - Split of the VB2 tracing events into a separate header file - s5p-mfc got support for Exynos 5433 - v4l2 fixes for 64-bits alignment when running 32 bits userspace on ARM - Added support for SDR radio transmitter at core, vivid and hackrf drivers - Some y2038 fixups - Some improvements at V4L2 colorspace support - saa7164 converted to use the V4L2 core control framework - several new boards additions, cleanups and fixups PS: There are two patches for scripts/kernel-doc that are needed by the documentation patches on Media. Jon is OK on merging those via my tree" * tag 'media/v4.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (146 commits) [media] c8sectpfe: Remove select on CONFIG_FW_LOADER_USER_HELPER_FALLBACK [media] DocBook media: update copyright/version numbers [media] ivtv: Convert to get_user_pages_unlocked() [media] media/v4l2-ctrls: fix setting autocluster to manual with VIDIOC_S_CTRL [media] DocBook media: Fix a typo in encoder cmd [media] DocBook: add SDR specific info to G_MODULATOR / S_MODULATOR [media] DocBook: add SDR specific info to G_TUNER / S_TUNER [media] hackrf: do not set human readable name for formats [media] hackrf: add support for transmitter [media] hackrf: switch to single function which configures everything [media] hackrf: add control for RF amplifier [media] DocBook: add modulator type field [media] v4l: add type field to v4l2_modulator struct [media] DocBook: document SDR transmitter [media] v4l2: add support for SDR transmitter [media] DocBook: document tuner RF gain control [media] v4l2: add RF gain control [media] v4l2: rename V4L2_TUNER_ADC to V4L2_TUNER_SDR [media] media/vivid-osd: fix info leak in ioctl [media] media: videobuf2: Move v4l2-specific stuff to videobuf2-v4l2 ...
Diffstat (limited to 'drivers/media/platform/sti/bdisp/bdisp-v4l2.c')
-rw-r--r--drivers/media/platform/sti/bdisp/bdisp-v4l2.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
index df61355..a0d267e 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
@@ -180,7 +180,7 @@ static struct bdisp_frame *ctx_get_frame(struct bdisp_ctx *ctx,
static void bdisp_job_finish(struct bdisp_ctx *ctx, int vb_state)
{
- struct vb2_buffer *src_vb, *dst_vb;
+ struct vb2_v4l2_buffer *src_vb, *dst_vb;
if (WARN(!ctx || !ctx->fh.m2m_ctx, "Null hardware context\n"))
return;
@@ -191,10 +191,10 @@ static void bdisp_job_finish(struct bdisp_ctx *ctx, int vb_state)
dst_vb = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);
if (src_vb && dst_vb) {
- dst_vb->v4l2_buf.timestamp = src_vb->v4l2_buf.timestamp;
- dst_vb->v4l2_buf.timecode = src_vb->v4l2_buf.timecode;
- dst_vb->v4l2_buf.flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
- dst_vb->v4l2_buf.flags |= src_vb->v4l2_buf.flags &
+ dst_vb->timestamp = src_vb->timestamp;
+ dst_vb->timecode = src_vb->timecode;
+ dst_vb->flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
+ dst_vb->flags |= src_vb->flags &
V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
v4l2_m2m_buf_done(src_vb, vb_state);
@@ -281,23 +281,23 @@ static int bdisp_get_addr(struct bdisp_ctx *ctx, struct vb2_buffer *vb,
static int bdisp_get_bufs(struct bdisp_ctx *ctx)
{
struct bdisp_frame *src, *dst;
- struct vb2_buffer *src_vb, *dst_vb;
+ struct vb2_v4l2_buffer *src_vb, *dst_vb;
int ret;
src = &ctx->src;
dst = &ctx->dst;
src_vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
- ret = bdisp_get_addr(ctx, src_vb, src, src->paddr);
+ ret = bdisp_get_addr(ctx, &src_vb->vb2_buf, src, src->paddr);
if (ret)
return ret;
dst_vb = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
- ret = bdisp_get_addr(ctx, dst_vb, dst, dst->paddr);
+ ret = bdisp_get_addr(ctx, &dst_vb->vb2_buf, dst, dst->paddr);
if (ret)
return ret;
- dst_vb->v4l2_buf.timestamp = src_vb->v4l2_buf.timestamp;
+ dst_vb->timestamp = src_vb->timestamp;
return 0;
}
@@ -438,10 +438,11 @@ static void bdisp_ctrls_delete(struct bdisp_ctx *ctx)
}
static int bdisp_queue_setup(struct vb2_queue *vq,
- const struct v4l2_format *fmt,
+ const void *parg,
unsigned int *nb_buf, unsigned int *nb_planes,
unsigned int sizes[], void *allocators[])
{
+ const struct v4l2_format *fmt = parg;
struct bdisp_ctx *ctx = vb2_get_drv_priv(vq);
struct bdisp_frame *frame = ctx_get_frame(ctx, vq->type);
@@ -483,6 +484,7 @@ static int bdisp_buf_prepare(struct vb2_buffer *vb)
static void bdisp_buf_queue(struct vb2_buffer *vb)
{
+ struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
struct bdisp_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
/* return to V4L2 any 0-size buffer so it can be dequeued by user */
@@ -493,13 +495,13 @@ static void bdisp_buf_queue(struct vb2_buffer *vb)
}
if (ctx->fh.m2m_ctx)
- v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vb);
+ v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf);
}
static int bdisp_start_streaming(struct vb2_queue *q, unsigned int count)
{
struct bdisp_ctx *ctx = q->drv_priv;
- struct vb2_buffer *buf;
+ struct vb2_v4l2_buffer *buf;
int ret = pm_runtime_get_sync(ctx->bdisp_dev->dev);
if (ret < 0) {