summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vsp1/vsp1_entity.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2017-05-25 00:16:57 +0300
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2017-07-29 23:46:56 +0300
commit6134148f609810cdd8a16c80151fd19d4ba96720 (patch)
tree2c5a16412debe9c64aa8b3addb86670ef6847b41 /drivers/media/platform/vsp1/vsp1_entity.c
parentcebd8c532fb925311764098b382e1a1ee9ecda78 (diff)
v4l: vsp1: Add support for the BRS entity
The Blend/ROP Sub Unit (BRS) is a stripped-down version of the BRU found in several VSP2 instances. Compared to a regular BRU, it supports two inputs only, and thus has no ROP unit. Add support for the BRS by modelling it as a new entity type, but reuse the vsp1_bru object underneath. Chaining the BRU and BRS entities seems to be supported by the hardware but isn't implemented yet as it isn't the primary use case for the BRS. 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_entity.c')
-rw-r--r--drivers/media/platform/vsp1/vsp1_entity.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_entity.c b/drivers/media/platform/vsp1/vsp1_entity.c
index 71dd903263ad..c06f7db093db 100644
--- a/drivers/media/platform/vsp1/vsp1_entity.c
+++ b/drivers/media/platform/vsp1/vsp1_entity.c
@@ -29,6 +29,7 @@ void vsp1_entity_route_setup(struct vsp1_entity *entity,
struct vsp1_dl_list *dl)
{
struct vsp1_entity *source;
+ u32 route;
if (entity->type == VSP1_ENTITY_HGO) {
u32 smppt;
@@ -62,8 +63,14 @@ void vsp1_entity_route_setup(struct vsp1_entity *entity,
if (source->route->reg == 0)
return;
- vsp1_dl_list_write(dl, source->route->reg,
- source->sink->route->inputs[source->sink_pad]);
+ route = source->sink->route->inputs[source->sink_pad];
+ /*
+ * The ILV and BRS share the same data path route. The extra BRSSEL bit
+ * selects between the ILV and BRS.
+ */
+ if (source->type == VSP1_ENTITY_BRS)
+ route |= VI6_DPR_ROUTE_BRSSEL;
+ vsp1_dl_list_write(dl, source->route->reg, route);
}
/* -----------------------------------------------------------------------------
@@ -450,6 +457,8 @@ struct media_pad *vsp1_entity_remote_pad(struct media_pad *pad)
{ VI6_DPR_NODE_WPF(idx) }, VI6_DPR_NODE_WPF(idx) }
static const struct vsp1_route vsp1_routes[] = {
+ { VSP1_ENTITY_BRS, 0, VI6_DPR_ILV_BRS_ROUTE,
+ { VI6_DPR_NODE_BRS_IN(0), VI6_DPR_NODE_BRS_IN(1) }, 0 },
{ VSP1_ENTITY_BRU, 0, VI6_DPR_BRU_ROUTE,
{ VI6_DPR_NODE_BRU_IN(0), VI6_DPR_NODE_BRU_IN(1),
VI6_DPR_NODE_BRU_IN(2), VI6_DPR_NODE_BRU_IN(3),