summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vsp1/vsp1_lif.c
diff options
context:
space:
mode:
authorLaurent Pinchart2017-06-21 15:10:18 +0200
committerLaurent Pinchart2017-08-03 15:17:20 +0200
commit3be0bf9734a0c1a8e2c1d4249d09f23b3f874d3c (patch)
treee480a3adce9cfd99224968d5eee5991ff5d2d7fe /drivers/media/platform/vsp1/vsp1_lif.c
parentv4l: vsp1: Add support for new VSP2-BS, VSP2-DL and VSP2-D instances (diff)
downloadkernel-qcow2-linux-3be0bf9734a0c1a8e2c1d4249d09f23b3f874d3c.tar.gz
kernel-qcow2-linux-3be0bf9734a0c1a8e2c1d4249d09f23b3f874d3c.tar.xz
kernel-qcow2-linux-3be0bf9734a0c1a8e2c1d4249d09f23b3f874d3c.zip
v4l: vsp1: Add support for multiple LIF instances
The VSP2-DL instance (present in the H3 ES2.0 and M3-N SoCs) has two LIF instances. Adapt the driver infrastructure to support multiple LIFs. Support for multiple display pipelines will be added separately. The change to the entity routing table removes the ability to connect the LIF output to the HGO or HGT histogram generators. This feature is only available on Gen2 hardware, isn't supported by the rest of the driver, and has no known use case, so this isn't an issue. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_lif.c')
-rw-r--r--drivers/media/platform/vsp1/vsp1_lif.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_lif.c b/drivers/media/platform/vsp1/vsp1_lif.c
index 702487f895b3..e6fa16d7fda8 100644
--- a/drivers/media/platform/vsp1/vsp1_lif.c
+++ b/drivers/media/platform/vsp1/vsp1_lif.c
@@ -30,7 +30,7 @@
static inline void vsp1_lif_write(struct vsp1_lif *lif, struct vsp1_dl_list *dl,
u32 reg, u32 data)
{
- vsp1_dl_list_write(dl, reg, data);
+ vsp1_dl_list_write(dl, reg + lif->entity.index * VI6_LIF_OFFSET, data);
}
/* -----------------------------------------------------------------------------
@@ -165,7 +165,7 @@ static const struct vsp1_entity_operations lif_entity_ops = {
* Initialization and Cleanup
*/
-struct vsp1_lif *vsp1_lif_create(struct vsp1_device *vsp1)
+struct vsp1_lif *vsp1_lif_create(struct vsp1_device *vsp1, unsigned int index)
{
struct vsp1_lif *lif;
int ret;
@@ -176,6 +176,7 @@ struct vsp1_lif *vsp1_lif_create(struct vsp1_device *vsp1)
lif->entity.ops = &lif_entity_ops;
lif->entity.type = VSP1_ENTITY_LIF;
+ lif->entity.index = index;
/*
* The LIF is never exposed to userspace, but media entity registration