Skip to contentSkip to conversation

drm/vmwgfx: Fix overlay when using Screen Targets

PATCH In review Ian Forbes 3 participants 3 messages Jul 19, 2024 – Jul 25, 2024

Subsystems (3)
lore
Share & tools
lore

Ian Forbes

author
#0 lore raw

PATCH 1/1 drm/vmwgfx: Fix overlay when using Screen Targets

This code was never updated to support Screen Targets.
Fixes a bug where Xv playback displays a green screen instead of actual video contents when 3D acceleration is disabled in the guest.

Fixes c8261a961ece ("vmwgfx: Major KMS refactoring / cleanup in preparation of screen targets")
---
 drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c +1 -1
index c45b4724e4141..e20f64b67b266 100644
@@ -92,7 +92,7 @@ static int vmw_overlay_send_put(struct vmw_private *dev_priv,
 {
 	struct vmw_escape_video_flush *flush;
 	size_t fifo_size;
-	bool have_so = (dev_priv->active_display_unit == vmw_du_screen_object);
+	bool have_so = (dev_priv->active_display_unit != vmw_du_legacy);
 	int i, num_items;
 	SVGAGuestPtr ptr;
 
Signature · 1 line
2.34.1
Tested-by on v1 1/1
#1 lore raw
Quoted 17 lines · Ian Forbes

This code was never updated to support Screen Targets.
Fixes a bug where Xv playback displays a green screen instead of actual video contents when 3D acceleration is disabled in the guest.

Fixes c8261a961ece ("vmwgfx: Major KMS refactoring / cleanup in preparation of screen targets")
---
 drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c +0 -0
index c45b4724e4141..e20f64b67b266 100644

drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c static int vmw_overlay_send_put(struct vmw_private *dev_priv, · line 98

Quoted 8 lines
drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c +1 -1
@@ -92,7 +92,7 @@ static int vmw_overlay_send_put(struct vmw_private *dev_priv,
 {
 	struct vmw_escape_video_flush *flush;
 	size_t fifo_size;
-	bool have_so = (dev_priv->active_display_unit == vmw_du_screen_object);
+	bool have_so = (dev_priv->active_display_unit != vmw_du_legacy);
 	int i, num_items;
 	SVGAGuestPtr ptr;
 

Thank you Ian, this patch fixes the issue that I observed.

maintainer
#2 lore raw
In reply to Ian Forbes
Quoted 18 lines · Ian Forbes

This code was never updated to support Screen Targets.
Fixes a bug where Xv playback displays a green screen instead of actual video contents when 3D acceleration is disabled in the guest.

Fixes c8261a961ece ("vmwgfx: Major KMS refactoring / cleanup in preparation of screen targets")
---
 drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c +0 -0
index c45b4724e4141..e20f64b67b266 100644

drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c static int vmw_overlay_send_put(struct vmw_private *dev_priv, · line 97

Quoted 7 lines
drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c +1 -1
@@ -92,7 +92,7 @@ static int vmw_overlay_send_put(struct vmw_private *dev_priv,
 {
        struct vmw_escape_video_flush *flush;
        size_t fifo_size;
-       bool have_so = (dev_priv->active_display_unit == vmw_du_screen_object);
+       bool have_so = (dev_priv->active_display_unit != vmw_du_legacy);
        int i, num_items;
        SVGAGuestPtr ptr;

Thanks. I pushed it to drm-misc-fixes.

z