drm/vmwgfx: (Re)bind shaders to MOBs with the correct offset
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 2 Dec 2014 11:41:01 +0000 (03:41 -0800)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 3 Dec 2014 08:48:14 +0000 (00:48 -0800)
This codepath is mostly hit when rebinding after a backup buffer swapout. It's
amazing that this error hasn't been more obvious but probably the shaders are
not reread from guest memory that often..

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_shader.c

index 8719fb3cccc93fb8b282c5022f9cdd669dc3e270..6a4584a43aa6cec2d29d35471e6c25559897b3a6 100644 (file)
@@ -198,7 +198,7 @@ static int vmw_gb_shader_bind(struct vmw_resource *res,
        cmd->header.size = sizeof(cmd->body);
        cmd->body.shid = res->id;
        cmd->body.mobid = bo->mem.start;
-       cmd->body.offsetInBytes = 0;
+       cmd->body.offsetInBytes = res->backup_offset;
        res->backup_dirty = false;
        vmw_fifo_commit(dev_priv, sizeof(*cmd));