diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-20 00:10:27 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-20 00:10:27 -0300 |
commit | d0b2f91bede3bd5e3d24dd6803e56eee959c1797 (patch) | |
tree | 7fee4ab0509879c373c4f2cbd5b8a5be5b4041ee /drivers/media/platform/xilinx | |
parent | e914f8eb445e8f74b00303c19c2ffceaedd16a05 (diff) |
Linux-libre 4.8.2-gnupck-4.8.2-gnu
Diffstat (limited to 'drivers/media/platform/xilinx')
-rw-r--r-- | drivers/media/platform/xilinx/xilinx-dma.c | 13 | ||||
-rw-r--r-- | drivers/media/platform/xilinx/xilinx-dma.h | 2 |
2 files changed, 2 insertions, 13 deletions
diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c index 7f6898b13..7ae1a134b 100644 --- a/drivers/media/platform/xilinx/xilinx-dma.c +++ b/drivers/media/platform/xilinx/xilinx-dma.c @@ -318,11 +318,10 @@ static void xvip_dma_complete(void *param) static int xvip_dma_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsigned int *nplanes, - unsigned int sizes[], void *alloc_ctxs[]) + unsigned int sizes[], struct device *alloc_devs[]) { struct xvip_dma *dma = vb2_get_drv_priv(vq); - alloc_ctxs[0] = dma->alloc_ctx; /* Make sure the image size is large enough. */ if (*nplanes) return sizes[0] < dma->format.sizeimage ? -EINVAL : 0; @@ -706,12 +705,6 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma, video_set_drvdata(&dma->video, dma); /* ... and the buffers queue... */ - dma->alloc_ctx = vb2_dma_contig_init_ctx(dma->xdev->dev); - if (IS_ERR(dma->alloc_ctx)) { - ret = PTR_ERR(dma->alloc_ctx); - goto error; - } - /* Don't enable VB2_READ and VB2_WRITE, as using the read() and write() * V4L2 APIs would be inefficient. Testing on the command line with a * 'cat /dev/video?' thus won't be possible, but given that the driver @@ -728,6 +721,7 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma, dma->queue.mem_ops = &vb2_dma_contig_memops; dma->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC | V4L2_BUF_FLAG_TSTAMP_SRC_EOF; + dma->queue.dev = dma->xdev->dev; ret = vb2_queue_init(&dma->queue); if (ret < 0) { dev_err(dma->xdev->dev, "failed to initialize VB2 queue\n"); @@ -766,9 +760,6 @@ void xvip_dma_cleanup(struct xvip_dma *dma) if (dma->dma) dma_release_channel(dma->dma); - if (!IS_ERR_OR_NULL(dma->alloc_ctx)) - vb2_dma_contig_cleanup_ctx(dma->alloc_ctx); - media_entity_cleanup(&dma->video.entity); mutex_destroy(&dma->lock); diff --git a/drivers/media/platform/xilinx/xilinx-dma.h b/drivers/media/platform/xilinx/xilinx-dma.h index 7a1621a2e..e95d136c1 100644 --- a/drivers/media/platform/xilinx/xilinx-dma.h +++ b/drivers/media/platform/xilinx/xilinx-dma.h @@ -65,7 +65,6 @@ static inline struct xvip_pipeline *to_xvip_pipeline(struct media_entity *e) * @format: active V4L2 pixel format * @fmtinfo: format information corresponding to the active @format * @queue: vb2 buffers queue - * @alloc_ctx: allocation context for the vb2 @queue * @sequence: V4L2 buffers sequence number * @queued_bufs: list of queued buffers * @queued_lock: protects the buf_queued list @@ -88,7 +87,6 @@ struct xvip_dma { const struct xvip_video_format *fmtinfo; struct vb2_queue queue; - void *alloc_ctx; unsigned int sequence; struct list_head queued_bufs; |