]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: Clear the ghost cpu_writers flag on ttm_buffer_object_transfer.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 21 Sep 2010 00:15:15 +0000 (02:15 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 22 Sep 2010 02:40:38 +0000 (12:40 +1000)
commit86ac58a47c159c89d883f26208d046eff3db9c17
tree05a45af49f8d0bc0619aa3453fa74568ffcbf78e
parentbb42a5b897ad6ae976fa25347e98384d12154698
drm/ttm: Clear the ghost cpu_writers flag on ttm_buffer_object_transfer.

It makes sense for a BO to move after a process has requested
exclusive RW access on it (e.g. because the BO used to be located in
unmappable VRAM and we intercepted the CPU access from the fault
handler).

If we let the ghost object inherit cpu_writers from the original
object, ttm_bo_release_list() will raise a kernel BUG when the ghost
object is destroyed. This can be reproduced with the nouveau driver on
nv5x.

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Tested-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ttm/ttm_bo_util.c