]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: return -EBUSY if bo still active
authorRob Clark <robdclark@gmail.com>
Wed, 11 Sep 2013 21:34:07 +0000 (17:34 -0400)
committerRob Clark <robdclark@gmail.com>
Wed, 11 Sep 2013 21:36:28 +0000 (17:36 -0400)
commit2563d70be52db9a05dd2c65928f649ae9c8449d4
tree60a194cabed7ef5f367865d62daa99a62f5f6cf4
parent81685ee5518bd3504b0f2fae5f83ceba8360b3ad
drm/msm: return -EBUSY if bo still active

When we CPU_PREP a bo with NOSYNC flag (for example, to implement
PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE), an -EBUSY return indicates to
userspace that the bo is still busy.  Previously it was incorrectly
returning 0 in this case.

And while we're in there throw in an bit of extra sanity checking in
case userspace tries to wait for a bogus fence.

Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/msm/msm_drv.h
drivers/gpu/drm/msm/msm_gem.c