drm/vmwgfx: Fix incorrect command header offset at restart
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 24 Aug 2017 06:06:31 +0000 (08:06 +0200)
committerSinclair Yeh <syeh@vmware.com>
Mon, 28 Aug 2017 15:40:51 +0000 (17:40 +0200)
Sometimes it appears like the device modifies the command header offset
member. So explicitly clear it when restarting after an error.

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

index 847490bbb2e2c6020d2a35cc2b9e9b930914ea1b..c706ad30411bb2688498c0177cfd2731c0b2ae19 100644 (file)
@@ -563,6 +563,7 @@ static void vmw_cmdbuf_work_func(struct work_struct *work)
                entry->cmd += new_start_offset;
                cb_hdr->length -= new_start_offset;
                cb_hdr->errorOffset = 0;
+               cb_hdr->offset = 0;
                list_add_tail(&entry->list, &restart_head[entry->cb_context]);
                man->ctx[entry->cb_context].block_submission = true;
        }