OSDN Git Service

drm/etnaviv: don't flush workqueue in etnaviv_gpu_wait_obj_inactive
authorLucas Stach <l.stach@pengutronix.de>
Fri, 17 Nov 2017 15:35:32 +0000 (16:35 +0100)
committerLucas Stach <l.stach@pengutronix.de>
Tue, 2 Jan 2018 16:17:07 +0000 (17:17 +0100)
commitfa67ac84a33eeb5a3702970fe75083be79f460f9
treece470f4d6cbce2bc20d05a1dfa85ce5bb46b6e66
parent3057e3f74516bd61d0aa3a44e169714b76616cfd
drm/etnaviv: don't flush workqueue in etnaviv_gpu_wait_obj_inactive

There is no need to synchronize with oustanding retire jobs if the object
has gone idle. Retire jobs only ever change the object state from active to
idle, not the other way around.

The IOVA put race is uncritical, as the GEM_WAIT ioctl itself is holding
a reference to the GEM object, so the retire worker will not pull the
object into the CPU domain, which is the thing we are trying to guard
against with etnaviv_gpu_wait_obj_inactive. The ordering of the various
counts and waits may change a bit, but the userspace visible behavior at
the bounds of the syscall are unchanged.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_gpu.c