public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Ian Forbes <ian.forbes@broadcom.com>
To: dri-devel@lists.freedesktop.org
Cc: bcm-kernel-feedback-list@broadcom.com, zack.rusin@broadcom.com,
	maaz.mombasawala@broadcom.com, michael.banack@broadcom.com,
	Ian Forbes <ian.forbes@broadcom.com>
Subject: [PATCH] drm/vmwgfx: Never destroy STDU zero's Screen Target
Date: Thu, 14 May 2026 10:31:03 -0500	[thread overview]
Message-ID: <20260514153103.1465013-1-ian.forbes@broadcom.com> (raw)

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")
Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index 4139837f4caf..5ad7e942ceb8 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@ -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");
-- 
2.54.0


             reply	other threads:[~2026-05-14 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14 15:31 Ian Forbes [this message]
2026-05-16  0:41 ` Claude review: drm/vmwgfx: Never destroy STDU zero's Screen Target Claude Code Review Bot
2026-05-16  0:41 ` Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260514153103.1465013-1-ian.forbes@broadcom.com \
    --to=ian.forbes@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maaz.mombasawala@broadcom.com \
    --cc=michael.banack@broadcom.com \
    --cc=zack.rusin@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox