]> Git Repo - linux.git/commitdiff
drm/vmwgfx: Don't use screen objects when SEV is active
authorZack Rusin <[email protected]>
Thu, 1 Dec 2022 17:53:41 +0000 (12:53 -0500)
committerZack Rusin <[email protected]>
Mon, 5 Dec 2022 18:59:38 +0000 (13:59 -0500)
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: 3b0d6458c705 ("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]
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c

index ecd3c2fc978b2362d9fbff20d22f0d1e8da032a8..9c79873f62f06938c81117cbfa2f4262967e377a 100644 (file)
@@ -949,6 +949,10 @@ int vmw_kms_sou_init_display(struct vmw_private *dev_priv)
        struct drm_device *dev = &dev_priv->drm;
        int i, ret;
 
+       /* Screen objects won't work if GMR's aren't available */
+       if (!dev_priv->has_gmr)
+               return -ENOSYS;
+
        if (!(dev_priv->capabilities & SVGA_CAP_SCREEN_OBJECT_2)) {
                return -ENOSYS;
        }
This page took 0.073852 seconds and 4 git commands to generate.