summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vsp1/vsp1_lut.c
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham+renesas@ideasonboard.com>2018-05-18 16:42:00 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-25 18:43:53 -0400
commit2d9445db0ee9d8695ab3dadb614829b70e43b61f (patch)
tree9fdee672155cd457e79c5b2b869f53be42780ae4 /drivers/media/platform/vsp1/vsp1_lut.c
parent5d7936b8e27dffb528bfb9e155136f2772c288f0 (diff)
downloadlinux-2d9445db0ee9d8695ab3dadb614829b70e43b61f.tar.bz2
media: vsp1: Use reference counting for bodies
Extend the display list body with a reference count, allowing bodies to be kept as long as a reference is maintained. This provides the ability to keep a cached copy of bodies which will not change, so that they can be re-applied to multiple display lists. Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_lut.c b/drivers/media/platform/vsp1/vsp1_lut.c
index 6b358617ce15..b3ea90172439 100644
--- a/drivers/media/platform/vsp1/vsp1_lut.c
+++ b/drivers/media/platform/vsp1/vsp1_lut.c
@@ -168,8 +168,13 @@ static void lut_configure(struct vsp1_entity *entity,
lut->lut = NULL;
spin_unlock_irqrestore(&lut->lock, flags);
- if (dlb)
+ if (dlb) {
vsp1_dl_list_add_body(dl, dlb);
+
+ /* Release our local reference. */
+ vsp1_dl_body_put(dlb);
+ }
+
break;
}
}