diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-11-22 20:29:25 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-04-13 18:58:36 -0300 |
commit | 5e8dbbf372fc187de564a8aab635e2da2f7c2153 (patch) | |
tree | 0bbfc85b81f7c49c18d9bc14b6739589cb97b5f9 /drivers/media/platform/vsp1/vsp1_bru.c | |
parent | b911605dcce9f7ebfea2e8f8833fb73782f55c22 (diff) | |
download | linux-5e8dbbf372fc187de564a8aab635e2da2f7c2153.tar.bz2 |
[media] v4l: vsp1: Pass display list explicitly to configure functions
Modules write register values to the active display list pointed to by
the pipeline. In order to support preparing display lists ahead of time,
pass them explicitly to all configuration functions.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_bru.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_bru.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_bru.c b/drivers/media/platform/vsp1/vsp1_bru.c index 4ab0a805d4b2..9795e621eb8e 100644 --- a/drivers/media/platform/vsp1/vsp1_bru.c +++ b/drivers/media/platform/vsp1/vsp1_bru.c @@ -18,6 +18,7 @@ #include "vsp1.h" #include "vsp1_bru.h" +#include "vsp1_dl.h" #include "vsp1_rwpf.h" #include "vsp1_video.h" @@ -28,9 +29,10 @@ * Device Access */ -static inline void vsp1_bru_write(struct vsp1_bru *bru, u32 reg, u32 data) +static inline void vsp1_bru_write(struct vsp1_bru *bru, struct vsp1_dl_list *dl, + u32 reg, u32 data) { - vsp1_mod_write(&bru->entity, reg, data); + vsp1_dl_list_write(dl, reg, data); } /* ----------------------------------------------------------------------------- @@ -303,7 +305,7 @@ static struct v4l2_subdev_ops bru_ops = { * VSP1 Entity Operations */ -static void bru_configure(struct vsp1_entity *entity) +static void bru_configure(struct vsp1_entity *entity, struct vsp1_dl_list *dl) { struct vsp1_pipeline *pipe = to_vsp1_pipeline(&entity->subdev.entity); struct vsp1_bru *bru = to_bru(&entity->subdev); @@ -324,26 +326,26 @@ static void bru_configure(struct vsp1_entity *entity) * format at the pipeline output is premultiplied. */ flags = pipe->output ? pipe->output->format.flags : 0; - vsp1_bru_write(bru, VI6_BRU_INCTRL, + vsp1_bru_write(bru, dl, VI6_BRU_INCTRL, flags & V4L2_PIX_FMT_FLAG_PREMUL_ALPHA ? 0 : VI6_BRU_INCTRL_NRM); /* Set the background position to cover the whole output image and * configure its color. */ - vsp1_bru_write(bru, VI6_BRU_VIRRPF_SIZE, + vsp1_bru_write(bru, dl, VI6_BRU_VIRRPF_SIZE, (format->width << VI6_BRU_VIRRPF_SIZE_HSIZE_SHIFT) | (format->height << VI6_BRU_VIRRPF_SIZE_VSIZE_SHIFT)); - vsp1_bru_write(bru, VI6_BRU_VIRRPF_LOC, 0); + vsp1_bru_write(bru, dl, VI6_BRU_VIRRPF_LOC, 0); - vsp1_bru_write(bru, VI6_BRU_VIRRPF_COL, bru->bgcolor | + vsp1_bru_write(bru, dl, VI6_BRU_VIRRPF_COL, bru->bgcolor | (0xff << VI6_BRU_VIRRPF_COL_A_SHIFT)); /* Route BRU input 1 as SRC input to the ROP unit and configure the ROP * unit with a NOP operation to make BRU input 1 available as the * Blend/ROP unit B SRC input. */ - vsp1_bru_write(bru, VI6_BRU_ROP, VI6_BRU_ROP_DSTSEL_BRUIN(1) | + vsp1_bru_write(bru, dl, VI6_BRU_ROP, VI6_BRU_ROP_DSTSEL_BRUIN(1) | VI6_BRU_ROP_CROP(VI6_ROP_NOP) | VI6_BRU_ROP_AROP(VI6_ROP_NOP)); @@ -380,7 +382,7 @@ static void bru_configure(struct vsp1_entity *entity) if (i != 1) ctrl |= VI6_BRU_CTRL_SRCSEL_BRUIN(i); - vsp1_bru_write(bru, VI6_BRU_CTRL(i), ctrl); + vsp1_bru_write(bru, dl, VI6_BRU_CTRL(i), ctrl); /* Harcode the blending formula to * @@ -394,7 +396,7 @@ static void bru_configure(struct vsp1_entity *entity) * * otherwise. */ - vsp1_bru_write(bru, VI6_BRU_BLD(i), + vsp1_bru_write(bru, dl, VI6_BRU_BLD(i), VI6_BRU_BLD_CCMDX_255_SRC_A | (premultiplied ? VI6_BRU_BLD_CCMDY_COEFY : VI6_BRU_BLD_CCMDY_SRC_A) | |