Skip to content

Commit 6e90293

Browse files
committed
drm/vmwgfx: Don't use screen objects when SEV is active
When SEV is enabled gmr's and mob's are explicitly disabled because the encrypted system memory can not be used by the hypervisor. The driver was disabling GMR's but the presentation code, which depends on GMR's, wasn't honoring it which lead to black screen on hosts with SEV enabled. Make sure screen objects presentation is not used when guest memory regions have been disabled to fix presentation on SEV enabled hosts. Fixes: 3b0d645 ("drm/vmwgfx: Refuse DMA operation when SEV encryption is active") Cc: <[email protected]> # v5.7+ Signed-off-by: Zack Rusin <[email protected]> Reported-by: Nicholas Hunt <[email protected]> Reviewed-by: Martin Krastev <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 09bf649 commit 6e90293

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,10 @@ int vmw_kms_sou_init_display(struct vmw_private *dev_priv)
949949
struct drm_device *dev = &dev_priv->drm;
950950
int i, ret;
951951

952+
/* Screen objects won't work if GMR's aren't available */
953+
if (!dev_priv->has_gmr)
954+
return -ENOSYS;
955+
952956
if (!(dev_priv->capabilities & SVGA_CAP_SCREEN_OBJECT_2)) {
953957
return -ENOSYS;
954958
}

0 commit comments

Comments
 (0)