summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/ti-vpe/vpdma.h
diff options
context:
space:
mode:
authorNikhil Devshatwar <nikhil.nd@ti.com>2016-11-18 21:20:23 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-22 07:49:16 -0200
commit4e4676d250efbc81c70e699fc1c805d3ab370e70 (patch)
tree6cd4f9809f512e21a69b2a59ef80ddef1d1fecdb /drivers/media/platform/ti-vpe/vpdma.h
parentdc12b124353b2b4d8d46b2d0826f4f7905d44612 (diff)
downloadblackbird-obmc-linux-4e4676d250efbc81c70e699fc1c805d3ab370e70.tar.gz
blackbird-obmc-linux-4e4676d250efbc81c70e699fc1c805d3ab370e70.zip
[media] media: ti-vpe: vpdma: Make list post atomic operation
Writing to the "VPDMA list attribute" register is considered as a list post. This informs the VPDMA firmware to load the list from the address which should be taken from the "VPDMA list address" register. As these two register writes are dependent, it is important that the two writes happen in atomic manner. This ensures multiple slices (which share same VPDMA) can post lists asynchronously and all of them point to the correct addresses. Slightly modified to implementation for the original patch to use spin_lock instead of mutex as the list post is also called from interrupt context. Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com> Signed-off-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/ti-vpe/vpdma.h')
-rw-r--r--drivers/media/platform/ti-vpe/vpdma.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/ti-vpe/vpdma.h b/drivers/media/platform/ti-vpe/vpdma.h
index 4dafc1bcf116..f08f4370ce4a 100644
--- a/drivers/media/platform/ti-vpe/vpdma.h
+++ b/drivers/media/platform/ti-vpe/vpdma.h
@@ -35,6 +35,7 @@ struct vpdma_data {
struct platform_device *pdev;
+ spinlock_t lock;
/* callback to VPE driver when the firmware is loaded */
void (*cb)(struct platform_device *pdev);
};
OpenPOWER on IntegriCloud