media: v4l: vsp1: Assign BRU and BRS to pipelines dynamically
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 22 Feb 2018 19:26:21 +0000 (14:26 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 4 May 2018 12:04:54 +0000 (08:04 -0400)
commitf81f9adc4ee1e94a38a9059f6291feea74f184e5
tree56d7818808ca7a1abe181d4550c0795fde08334e
parent1dd72ee923b7ed96abe15b2cb09aa5d85315871e
media: v4l: vsp1: Assign BRU and BRS to pipelines dynamically

The VSPDL variant drives two DU channels through two LIF and two
blenders, BRU and BRS. The DU channels thus share the five available
VSPDL inputs and expose them as five KMS planes.

The current implementation assigns the BRS to the second LIF and thus
artificially limits the number of planes for the second display channel
to two at most.

Lift this artificial limitation by assigning the BRU and BRS to the
display pipelines on demand based on the number of planes used by each
pipeline. When a display pipeline needs more than two inputs and the BRU
is already in use by the other pipeline, this requires reconfiguring the
other pipeline to free the BRU before processing, which can result in
frame drop on both pipelines.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vsp1/vsp1_drm.c
drivers/media/platform/vsp1/vsp1_drm.h