diff options
author | Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> | 2018-05-18 23:42:02 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-05-26 02:04:35 +0300 |
commit | 12832dd9dde9241a3fcb38ab6ca40d13780476f4 (patch) | |
tree | 614cb0ac87a75e8dc625c5b932ce5da59f9ab7e1 /drivers/media/platform/vsp1/vsp1_lut.c | |
parent | 46ce3639a579c29dc3166a9a66522f72f11f560c (diff) | |
download | linux-12832dd9dde9241a3fcb38ab6ca40d13780476f4.tar.xz |
media: vsp1: Adapt entities to configure into a body
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.
[laurent.pinchart+renesas@ideasonboard.com: Don't remove blank line unnecessarily]
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_lut.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_lut.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_lut.c b/drivers/media/platform/vsp1/vsp1_lut.c index 1b62f54dc302..64c48d9459b0 100644 --- a/drivers/media/platform/vsp1/vsp1_lut.c +++ b/drivers/media/platform/vsp1/vsp1_lut.c @@ -25,10 +25,10 @@ * Device Access */ -static inline void vsp1_lut_write(struct vsp1_lut *lut, struct vsp1_dl_list *dl, - u32 reg, u32 data) +static inline void vsp1_lut_write(struct vsp1_lut *lut, + struct vsp1_dl_body *dlb, u32 reg, u32 data) { - vsp1_dl_list_write(dl, reg, data); + vsp1_dl_body_write(dlb, reg, data); } /* ----------------------------------------------------------------------------- @@ -147,31 +147,32 @@ static const struct v4l2_subdev_ops lut_ops = { static void lut_configure_stream(struct vsp1_entity *entity, struct vsp1_pipeline *pipe, - struct vsp1_dl_list *dl) + struct vsp1_dl_body *dlb) { struct vsp1_lut *lut = to_lut(&entity->subdev); - vsp1_lut_write(lut, dl, VI6_LUT_CTRL, VI6_LUT_CTRL_EN); + vsp1_lut_write(lut, dlb, VI6_LUT_CTRL, VI6_LUT_CTRL_EN); } static void lut_configure_frame(struct vsp1_entity *entity, struct vsp1_pipeline *pipe, - struct vsp1_dl_list *dl) + struct vsp1_dl_list *dl, + struct vsp1_dl_body *dlb) { struct vsp1_lut *lut = to_lut(&entity->subdev); - struct vsp1_dl_body *dlb; + struct vsp1_dl_body *lut_dlb; unsigned long flags; spin_lock_irqsave(&lut->lock, flags); - dlb = lut->lut; + lut_dlb = lut->lut; lut->lut = NULL; spin_unlock_irqrestore(&lut->lock, flags); - if (dlb) { - vsp1_dl_list_add_body(dl, dlb); + if (lut_dlb) { + vsp1_dl_list_add_body(dl, lut_dlb); /* Release our local reference. */ - vsp1_dl_body_put(dlb); + vsp1_dl_body_put(lut_dlb); } } |