]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: callback move_notify any time bo placement change v4
authorJerome Glisse <jglisse@redhat.com>
Fri, 18 Nov 2011 16:47:03 +0000 (11:47 -0500)
committerDave Airlie <airlied@redhat.com>
Tue, 6 Dec 2011 10:40:23 +0000 (10:40 +0000)
commit1a68868079c6bf73431002438a49903eaea9da34
treeafad2825ec463545dda7477be40ddb437686b58d
parent05b2b813712aff42f5b714b8dc90b557d92b8065
drm/ttm: callback move_notify any time bo placement change v4

Previously we were calling back move_notify in error path when the
bo is returned to it's original position or when destroy the bo.
When destroying the bo set the new mem placement as NULL when calling
back in the driver.

Updating nouveau to deal with NULL placement properly.

v2: reserve the object before calling move_notify in bo destroy path
    at that point ttm should be the only piece of code interacting
    with the object so atomic_set is safe here.
v3: callback move notify only once the bo is in its new position
    call move notify want swaping out the buffer
v4:- don't call move_notify when swapin out bo, assume driver should
     do what is appropriate in swap notify
   - move move_notify call back to ttm_bo_cleanup_memtype_use for
     destroy path

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/ttm/ttm_bo.c