Currently the entities store their configurations into a display list.
Adapt this such that the code can be configured into a body directly,
allowing greater flexibility and control of the content.
All users of vsp1_dl_list_write() are removed in this process, thus it
too is removed.
A helper, vsp1_dl_list_get_body0() is provided to access the internal body0
from the display list.
Signed-off-by: Kieran Bingham
Reviewed-by: Laurent Pinchart
---
v9:
- Pass the DL through configure_partition() calls
v8:
- Fixed comment style and indentation
- Supported UIF
- Supported new configure_partition() functionality
v7:
- Rebase
- s/prepare/configure_stream/
- s/configure/configure_frame/
---
drivers/media/platform/vsp1/vsp1_brx.c| 22 ++--
drivers/media/platform/vsp1/vsp1_clu.c| 23 ++---
drivers/media/platform/vsp1/vsp1_dl.c | 12 ++-
drivers/media/platform/vsp1/vsp1_dl.h | 2 +-
drivers/media/platform/vsp1/vsp1_drm.c| 12 ---
drivers/media/platform/vsp1/vsp1_entity.c | 22 ++--
drivers/media/platform/vsp1/vsp1_entity.h | 18 ++
drivers/media/platform/vsp1/vsp1_hgo.c| 16 -
drivers/media/platform/vsp1/vsp1_hgt.c| 18 +-
drivers/media/platform/vsp1/vsp1_hsit.c | 10 ++---
drivers/media/platform/vsp1/vsp1_lif.c| 15
drivers/media/platform/vsp1/vsp1_lut.c| 23 ++---
drivers/media/platform/vsp1/vsp1_pipe.c | 4 +-
drivers/media/platform/vsp1/vsp1_pipe.h | 3 +-
drivers/media/platform/vsp1/vsp1_rpf.c| 44
drivers/media/platform/vsp1/vsp1_sru.c| 14
drivers/media/platform/vsp1/vsp1_uds.c| 25 +++---
drivers/media/platform/vsp1/vsp1_uds.h| 2 +-
drivers/media/platform/vsp1/vsp1_uif.c| 21 +--
drivers/media/platform/vsp1/vsp1_video.c | 16 ++---
drivers/media/platform/vsp1/vsp1_wpf.c| 42 ---
21 files changed, 194 insertions(+), 170 deletions(-)
diff --git a/drivers/media/platform/vsp1/vsp1_brx.c
b/drivers/media/platform/vsp1/vsp1_brx.c
index 011edac5ebc1..359917b5d842 100644
--- a/drivers/media/platform/vsp1/vsp1_brx.c
+++ b/drivers/media/platform/vsp1/vsp1_brx.c
@@ -26,10 +26,10 @@
* Device Access
*/
-static inline void vsp1_brx_write(struct vsp1_brx *brx, struct vsp1_dl_list
*dl,
- u32 reg, u32 data)
+static inline void vsp1_brx_write(struct vsp1_brx *brx,
+ struct vsp1_dl_body *dlb, u32 reg, u32 data)
{
- vsp1_dl_list_write(dl, brx->base + reg, data);
+ vsp1_dl_body_write(dlb, brx->base + reg, data);
}
/*
-
@@ -283,7 +283,7 @@ static const struct v4l2_subdev_ops brx_ops = {
static void brx_configure_stream(struct vsp1_entity *entity,
struct vsp1_pipeline *pipe,
-struct vsp1_dl_list *dl)
+struct vsp1_dl_body *dlb)
{
struct vsp1_brx *brx = to_brx(&entity->subdev);
struct v4l2_mbus_framefmt *format;
@@ -305,7 +305,7 @@ static void brx_configure_stream(struct vsp1_entity *entity,
* format at the pipeline output is premultiplied.
*/
flags = pipe->output ? pipe->output->format.flags : 0;
- vsp1_brx_write(brx, dl, VI6_BRU_INCTRL,
+ vsp1_brx_write(brx, dlb, VI6_BRU_INCTRL,
flags & V4L2_PIX_FMT_FLAG_PREMUL_ALPHA ?
0 : VI6_BRU_INCTRL_NRM);
@@ -313,12 +313,12 @@ static void brx_configure_stream(struct vsp1_entity
*entity,
* Set the background position to cover the whole output image and
* configure its color.
*/
- vsp1_brx_write(brx, dl, VI6_BRU_VIRRPF_SIZE,
+ vsp1_brx_write(brx, dlb, VI6_BRU_VIRRPF_SIZE,
(format->width << VI6_BRU_VIRRPF_SIZE_HSIZE_SHIFT) |
(format->height << VI6_BRU_VIRRPF_SIZE_VSIZE_SHIFT));
- vsp1_brx_write(brx, dl, VI6_BRU_VIRRPF_LOC, 0);
+ vsp1_brx_write(brx, dlb, VI6_BRU_VIRRPF_LOC, 0);
- vsp1_brx_write(brx, dl, VI6_BRU_VIRRPF_COL, brx->bgcolor |
+ vsp1_brx_write(brx, dlb, VI6_BRU_VIRRPF_COL, brx->bgcolor |
(0xff << VI6_BRU_VIRRPF_COL_A_SHIFT));
/*
@@ -328,7 +328,7 @@ static void brx_configure_stream(struct vsp1_entity *entity,
* unit.
*/
if (entity->type == VSP1_ENTITY_BRU)
- vsp1_brx_write(brx, dl, VI6_BRU_ROP,
+ vsp1_brx_write(brx, dlb, VI6_BRU_ROP,
VI6_BRU_ROP_DSTSEL_BRUIN(1) |
VI6_BRU_ROP_CROP(VI6_ROP_NOP) |
VI6_BRU_ROP_AROP(VI6_ROP_NOP));
@@ -370,7 +370,7 @@ static void brx_configure_stream(struct vsp1_entity *entity,
if (!(entity->type == VSP1_ENTITY_BRU && i == 1))
ctrl |= VI6_BRU_CT