diff options
| author | Thomas Hellstrom <thellstrom@vmware.com> | 2018-03-22 05:15:23 -0400 |
|---|---|---|
| committer | Thomas Hellstrom <thellstrom@vmware.com> | 2018-03-22 07:08:23 -0400 |
| commit | dc366364c4ef809dccd063919314301f8ba01ac2 (patch) | |
| tree | 08090face26346c75e35b37d53d175d7c95ff9b4 /drivers/gpu/drm/vmwgfx/device_include | |
| parent | ef86cfee7d74baf2e3b883871087a684acecb595 (diff) | |
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>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/device_include')
| -rw-r--r-- | drivers/gpu/drm/vmwgfx/device_include/svga_reg.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/device_include/svga_reg.h b/drivers/gpu/drm/vmwgfx/device_include/svga_reg.h index 6e0ccb70a700..88e72bf9a534 100644 --- a/drivers/gpu/drm/vmwgfx/device_include/svga_reg.h +++ b/drivers/gpu/drm/vmwgfx/device_include/svga_reg.h | |||
| @@ -372,6 +372,14 @@ SVGAGuestPtr; | |||
| 372 | * PA, not biased by the offset. When the command buffer is finished | 372 | * PA, not biased by the offset. When the command buffer is finished |
| 373 | * the guest should not read the offset field as there is no guarantee | 373 | * the guest should not read the offset field as there is no guarantee |
| 374 | * what it will set to. | 374 | * what it will set to. |
| 375 | * | ||
| 376 | * When the SVGA_CAP_HP_CMD_QUEUE cap bit is set a new command queue | ||
| 377 | * SVGA_CB_CONTEXT_1 is available. Commands submitted to this queue | ||
| 378 | * will be executed as quickly as possible by the SVGA device | ||
| 379 | * potentially before already queued commands on SVGA_CB_CONTEXT_0. | ||
| 380 | * The SVGA device guarantees that any command buffers submitted to | ||
| 381 | * SVGA_CB_CONTEXT_0 will be executed after any _already_ submitted | ||
| 382 | * command buffers to SVGA_CB_CONTEXT_1. | ||
| 375 | */ | 383 | */ |
| 376 | 384 | ||
| 377 | #define SVGA_CB_MAX_SIZE (512 * 1024) /* 512 KB */ | 385 | #define SVGA_CB_MAX_SIZE (512 * 1024) /* 512 KB */ |
| @@ -382,7 +390,8 @@ SVGAGuestPtr; | |||
| 382 | typedef enum { | 390 | typedef enum { |
| 383 | SVGA_CB_CONTEXT_DEVICE = 0x3f, | 391 | SVGA_CB_CONTEXT_DEVICE = 0x3f, |
| 384 | SVGA_CB_CONTEXT_0 = 0x0, | 392 | SVGA_CB_CONTEXT_0 = 0x0, |
| 385 | SVGA_CB_CONTEXT_MAX = 0x1, | 393 | SVGA_CB_CONTEXT_1 = 0x1, /* Supported with SVGA_CAP_HP_CMD_QUEUE */ |
| 394 | SVGA_CB_CONTEXT_MAX = 0x2, | ||
| 386 | } SVGACBContext; | 395 | } SVGACBContext; |
| 387 | 396 | ||
| 388 | 397 | ||
| @@ -689,6 +698,7 @@ SVGASignedPoint; | |||
| 689 | #define SVGA_CAP_CMD_BUFFERS_2 0x04000000 | 698 | #define SVGA_CAP_CMD_BUFFERS_2 0x04000000 |
| 690 | #define SVGA_CAP_GBOBJECTS 0x08000000 | 699 | #define SVGA_CAP_GBOBJECTS 0x08000000 |
| 691 | #define SVGA_CAP_DX 0x10000000 | 700 | #define SVGA_CAP_DX 0x10000000 |
| 701 | #define SVGA_CAP_HP_CMD_QUEUE 0x20000000 | ||
| 692 | 702 | ||
| 693 | #define SVGA_CAP_CMD_RESERVED 0x80000000 | 703 | #define SVGA_CAP_CMD_RESERVED 0x80000000 |
| 694 | 704 | ||
