]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/commit
drm/omap: gem sync: wait on correct events
authorArchit Taneja <archit@ti.com>
Fri, 11 Apr 2014 07:23:31 +0000 (12:53 +0530)
committerDan Murphy <DMurphy@ti.com>
Sat, 7 Jun 2014 20:59:55 +0000 (15:59 -0500)
commit9b0771d105c219697714203e0c46631a90b56450
tree9cb2e5e454d8763730b26372b513383b628635fa
parent7492e7c95dd176a9cd357f69fbcd8a81b31f402d
drm/omap: gem sync: wait on correct events

[ Upstream commit f2cff0f34ff2c51f703880a2b883ea0c9de4a5ac ]

A waiter of the type OMAP_GEM_READ should wait for a buffer to be completely
written, and only then proceed with reading it. A similar logic applies for
waiters with OMAP_GEM_WRITE flag.

Currently the function is_waiting() waits on the read_complete/read_target
counts in the sync object.

This should be the other way round, as a reader should wait for users who are
'writing' to this buffer, and vice versa.

Make readers of the buffer(OMAP_GEM_READ) wait on the write counters, and
writers to the buffer(OMAP_GEM_WRITE) wait on the read counters in is_waiting()

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
drivers/gpu/drm/omapdrm/omap_gem.c