Skip to contentSkip to conversation

drm/vmwgfx: Never destroy STDU zero's Screen Target

PATCH In review Ian Forbes 2 participants 2 messages May 14 – Nov 16

Subsystems (3)
lore
Share & tools
lore

Ian Forbes

author
#0 lore raw

PATCH 1/1 drm/vmwgfx: Never destroy STDU zero's Screen Target

When some VMware clients connect to a VM they query the existing screen target information to create a window of the same size. If the VM display is asleep and the CRTC is disabled we don't have a screen target and the client will not create a window which may lead it to have no way of accepting user input.

Without input the VM cannot be awoken and the user is left with a blank screen. This can be overcome by using the 'Send Key' command from the client's application menu but this is not an ideal experience for users.

This can be fixed by always leaving display unit zero with a screen target.

Fixes 7ef91dcba172 ("drm/vmwgfx: Don't destroy Screen Target when CRTC is enabled but inactive")
---
 drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +7 -0
index 4139837f4caf..5ad7e942ceb8 100644
@@ -448,6 +448,13 @@ static void vmw_stdu_crtc_atomic_disable(struct drm_crtc *crtc,
 		    !new_crtc_state->mode_changed)
 			return;
 
+		/* Never destroy DU 0's ST so that the VM client always has a
+		 * window to accept input from. Otherwise we may never receive
+		 * input to wake the VM when the CRTC is disabled during idle.
+		 */
+		if (stdu->base.unit == 0)
+			return;
+
 		ret = vmw_stdu_destroy_st(dev_priv, stdu);
 		if (ret)
 			DRM_ERROR("Failed to destroy Screen Target\n");
Signature · 1 line
2.54.0
maintainer
#1 lore raw

Thank you. Applied to drm-misc-fixes.

z