aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2016-08-18 09:16:17 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-09 10:32:19 -0400
commitbffba4737bf39542c4cb4d276f4bf18cfa0ffa21 (patch)
treee94f4316bac500da4eea426a1427645fd1aa9110
parent47b4bafd2c510726fd653e7f165634f774e36fb0 (diff)
[media] v4l: vsp1: Fix tri-planar format support through DRM API
The vsp1 driver supports tri-planar formats, but the DRM API only passes two memory addresses. Add a third one. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/media/platform/vsp1/vsp1_drm.c6
-rw-r--r--include/media/vsp1.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_drm.c b/drivers/media/platform/vsp1/vsp1_drm.c
index fe9665e57b3b..06972f612263 100644
--- a/drivers/media/platform/vsp1/vsp1_drm.c
+++ b/drivers/media/platform/vsp1/vsp1_drm.c
@@ -276,12 +276,12 @@ int vsp1_du_atomic_update(struct device *dev, unsigned int rpf_index,
276 } 276 }
277 277
278 dev_dbg(vsp1->dev, 278 dev_dbg(vsp1->dev,
279 "%s: RPF%u: (%u,%u)/%ux%u -> (%u,%u)/%ux%u (%08x), pitch %u dma { %pad, %pad } zpos %u\n", 279 "%s: RPF%u: (%u,%u)/%ux%u -> (%u,%u)/%ux%u (%08x), pitch %u dma { %pad, %pad, %pad } zpos %u\n",
280 __func__, rpf_index, 280 __func__, rpf_index,
281 cfg->src.left, cfg->src.top, cfg->src.width, cfg->src.height, 281 cfg->src.left, cfg->src.top, cfg->src.width, cfg->src.height,
282 cfg->dst.left, cfg->dst.top, cfg->dst.width, cfg->dst.height, 282 cfg->dst.left, cfg->dst.top, cfg->dst.width, cfg->dst.height,
283 cfg->pixelformat, cfg->pitch, &cfg->mem[0], &cfg->mem[1], 283 cfg->pixelformat, cfg->pitch, &cfg->mem[0], &cfg->mem[1],
284 cfg->zpos); 284 &cfg->mem[2], cfg->zpos);
285 285
286 /* Store the format, stride, memory buffer address, crop and compose 286 /* Store the format, stride, memory buffer address, crop and compose
287 * rectangles and Z-order position and for the input. 287 * rectangles and Z-order position and for the input.
@@ -301,7 +301,7 @@ int vsp1_du_atomic_update(struct device *dev, unsigned int rpf_index,
301 301
302 rpf->mem.addr[0] = cfg->mem[0]; 302 rpf->mem.addr[0] = cfg->mem[0];
303 rpf->mem.addr[1] = cfg->mem[1]; 303 rpf->mem.addr[1] = cfg->mem[1];
304 rpf->mem.addr[2] = 0; 304 rpf->mem.addr[2] = cfg->mem[2];
305 305
306 vsp1->drm->inputs[rpf_index].crop = cfg->src; 306 vsp1->drm->inputs[rpf_index].crop = cfg->src;
307 vsp1->drm->inputs[rpf_index].compose = cfg->dst; 307 vsp1->drm->inputs[rpf_index].compose = cfg->dst;
diff --git a/include/media/vsp1.h b/include/media/vsp1.h
index 9322d9775fb7..458b400373d4 100644
--- a/include/media/vsp1.h
+++ b/include/media/vsp1.h
@@ -26,7 +26,7 @@ int vsp1_du_setup_lif(struct device *dev, unsigned int width,
26struct vsp1_du_atomic_config { 26struct vsp1_du_atomic_config {
27 u32 pixelformat; 27 u32 pixelformat;
28 unsigned int pitch; 28 unsigned int pitch;
29 dma_addr_t mem[2]; 29 dma_addr_t mem[3];
30 struct v4l2_rect src; 30 struct v4l2_rect src;
31 struct v4l2_rect dst; 31 struct v4l2_rect dst;
32 unsigned int alpha; 32 unsigned int alpha;