]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: Add a swap_notify callback.
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 13 Jan 2010 21:28:40 +0000 (22:28 +0100)
committerDave Airlie <airlied@redhat.com>
Thu, 14 Jan 2010 02:18:54 +0000 (12:18 +1000)
commitc08ae4b19db8c54e0631e1dfa17a09f4f2bb8c62
tree445e4519b2e8a39136f611f07db670d1e10ace6e
parentdd6b9403ba7e59d1a1c8936a05d2953cd041799d
drm/ttm: Add a swap_notify callback.

This is needed for a bugfix in the vmwgfx driver.
Drivers may have GPU bindings on buffers that core TTM is not aware of,
and TTM may view those buffers as ordinary system memory buffers.
Add a notifier to such drivers when TTM is about to move the buffer
contents out to swappable memory. The driver must then release any
private GPU bindings on those buffers.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ttm/ttm_bo.c
include/drm/ttm/ttm_bo_driver.h