瀏覽代碼

drm/vmwgfx: Fix incorrect command header offset at restart

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>
Thomas Hellstrom 8 年之前
父節點
當前提交
1f1a36cc4d
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c

+ 1 - 0
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c

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