drm/vmwgfx: Fix multiple command buffer context use
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 22 Mar 2018 09:15:23 +0000 (10:15 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 22 Mar 2018 11:08:23 +0000 (12:08 +0100)
commitdc366364c4ef809dccd063919314301f8ba01ac2
tree08090face26346c75e35b37d53d175d7c95ff9b4
parentef86cfee7d74baf2e3b883871087a684acecb595
drm/vmwgfx: Fix multiple command buffer context use

The start / stop and preempt commands don't honor the context argument
but rather acts on all available contexts.

Also add detection for context 1 availability.

Note that currently there's no driver interface for submitting buffers
using the high-priority command queue (context 1).

Testing done:
Change the default context for command submission to 1 instead of 0,
verify basic desktop functionality including faulty command injection and
recovery.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
drivers/gpu/drm/vmwgfx/device_include/svga_reg.h
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c