diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2010-03-29 10:38:23 +0530 |
---|---|---|
committer | David Sin <davidsin@ti.com> | 2010-08-17 10:17:09 -0500 |
commit | b31410867c892d755ae5b1a6d0a3a21c28618819 (patch) | |
tree | 509437f3b4ec2e59c85cd6fa475c85bb4f9e4f29 | |
parent | 489226010c758486f7b8037879fbdd2c563ff60a (diff) |
tiler: Ensure the pat refill has correct data before programming it
-rw-r--r-- | drivers/media/video/tiler/tiler.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/tiler/tiler.c b/drivers/media/video/tiler/tiler.c index a463d72050e0..fdf281cf0418 100644 --- a/drivers/media/video/tiler/tiler.c +++ b/drivers/media/video/tiler/tiler.c @@ -952,6 +952,9 @@ static s32 map_block(enum tiler_fmt fmt, u32 width, u32 height, u32 gid, } up_read(&mm->mmap_sem); + /* Ensure the data reaches to main memory before PAT refill */ + wmb(); + if (refill_pat(TMM(fmt), &mi->area, mem)) goto fault; @@ -1306,6 +1309,9 @@ s32 alloc_block(enum tiler_fmt fmt, u32 width, u32 height, if (!mi->mem) goto cleanup; + /* Ensure the data reaches to main memory before PAT refill */ + wmb(); + /* program PAT */ if (refill_pat(TMM(fmt), &mi->area, mi->mem)) goto cleanup; |