vmwgfx: Handle device surface memory limit
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 4 Oct 2011 18:13:33 +0000 (20:13 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 5 Oct 2011 09:17:31 +0000 (10:17 +0100)
commit5bb39e818169783ee17ddbbefbd7bd16a4383fec
treea4af9f982e0c75e19b7e31bfdbaebc30e25b0bdc
parent90ff18bc3a1ff56e3948ccf7ae4031b8e9662981
vmwgfx: Handle device surface memory limit

Make surfaces swappable. Make sure we honor the maximum amount of surface
memory the device accepts. This is done by potentially reading back surface
contents not used by the current command submission and storing it
locally in buffer objects.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c