aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/ti-vpe/vpdma_priv.h
diff options
context:
space:
mode:
authorBenoit Parrot <bparrot@ti.com>2016-11-18 21:20:14 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-22 06:27:30 -0200
commit4f36178188e0b33ea594e3d4849f407e40f8149d (patch)
tree9b3d742e6b6edc861175463ebfe08978b6558262 /drivers/media/platform/ti-vpe/vpdma_priv.h
parent[media] media: ti-vpe: vpdma: Add helper to set a background color (diff)
downloadlinux-dev-4f36178188e0b33ea594e3d4849f407e40f8149d.tar.xz
linux-dev-4f36178188e0b33ea594e3d4849f407e40f8149d.zip
[media] media: ti-vpe: vpdma: Fix bus error when vpdma is writing a descriptor
On DRA7 since l3_noc event are being reported it was found that when the write descriptor was being written it was consistently causing bus error events. The write address was improperly programmed. 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_priv.h')
-rw-r--r--drivers/media/platform/ti-vpe/vpdma_priv.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/ti-vpe/vpdma_priv.h b/drivers/media/platform/ti-vpe/vpdma_priv.h
index 65f0c067bed1..aeade5edc8ac 100644
--- a/drivers/media/platform/ti-vpe/vpdma_priv.h
+++ b/drivers/media/platform/ti-vpe/vpdma_priv.h
@@ -212,6 +212,7 @@ struct vpdma_dtd {
#define DTD_V_START_MASK 0xffff
#define DTD_V_START_SHFT 0
+#define DTD_DESC_START_MASK 0xffffffe0
#define DTD_DESC_START_SHIFT 5
#define DTD_WRITE_DESC_MASK 0x01
#define DTD_WRITE_DESC_SHIFT 2
@@ -294,7 +295,7 @@ static inline u32 dtd_frame_width_height(int width, int height)
static inline u32 dtd_desc_write_addr(unsigned int addr, bool write_desc,
bool drop_data, bool use_desc)
{
- return (addr << DTD_DESC_START_SHIFT) |
+ return (addr & DTD_DESC_START_MASK) |
(write_desc << DTD_WRITE_DESC_SHIFT) |
(drop_data << DTD_DROP_DATA_SHIFT) |
use_desc;
@@ -399,7 +400,7 @@ static inline int dtd_get_frame_height(struct vpdma_dtd *dtd)
static inline int dtd_get_desc_write_addr(struct vpdma_dtd *dtd)
{
- return dtd->desc_write_addr >> DTD_DESC_START_SHIFT;
+ return dtd->desc_write_addr & DTD_DESC_START_MASK;
}
static inline bool dtd_get_write_desc(struct vpdma_dtd *dtd)