From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796382262; b=lj1h1MLly5NjhSd+nahC0yTwXdEqLzfq8th6MtluG4p5al3nE392WekHnMcfqDK8bcj8 480tG2g0Z67nnunmVI16MCnjeynv4Sky9Cy0NSFmjZjj6IDjvMupxq6nchSMDmVKTWv7J hS0D6d62VdVVz6HcUHp0+1e1u2WexcucNWrhYBYO9FgGffltlaidC7YM7xX+tUZo/4Lez MWzErRw58Hug2ioKTeY3GCnTPN0GARRsj/zWCxdRV15Sh6HT+wHFViGpsfNKAKhilpeEB EdgQuS/CjTP5E2E1q1b6pUtAtU8WaXiGa6ABdpLQmjojgQoCsyt/HTVqUrxHaxcGJXg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382262; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=VpwGwj8xWmX60h2849Y67hUHeCWo/8roI9hgkr8HYPM=; b=wk4dO7L2ijoDeJLCevs6/+RSrLb4dC3+2rcRY8V9YidHUCW97gdkFE24UWRrenkgzJm4 +0XQNew1syu9kejkkyB+V5+rC3FmqK0dsWR3PLrdLHC2KEg5ATsI1nFH5LNfcKJpowndX HEk4Hj5KLTJpwFTKDaNt2yiuPskx0LKNd3Xoz1SZuV99pkkzG4Ay34Mh0Jky8Wnmb6KAy vscKfTygpD8CEQ1SfId/gesJRlLRHEc0VcR/bHc20npjmrYWv9cbX1ETq8nueVRDYTON1 8zmnXxdK3HH9TWqYOkUM+nJLDgT9LdDu3jgJfvOsYWEnePQGSlZxNe3anKlwJLAYl1g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=ntUAkQJ6; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D0BE606A322; Fri, 4 Dec 2026 11:04:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=ntUAkQJ6 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BBDE1F000C2; Fri, 4 Dec 2026 11:04:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796382262; bh=VpwGwj8xWmX60h2849Y67hUHeCWo/8roI9hgkr8HYPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ntUAkQJ6QwftldrQ9EnfqeI3u0/vDzLzI5jRme4ws8tkwek7M4G8DDGsShokVj2sH idzAtRTubwBtH3g5KHn3HjHEauTKvDGxPnPbYRDB77r08jnhQ5luFEs0dO+z0Tgplk 4gP+w0eqXKP1ddewnchT1UFWUQ85Dl3oF3GEWGuk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tomas M , Maaz Mombasawala , fausten , Zack Rusin Subject: [PATCH 6.18 379/703] drm/vmwgfx: include legacy hotspots in GB-only cursor images Date: Fri, 4 Dec 2026 19:04:38 +0900 Message-ID: <20261204100637.924326777@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tomas M commit c116d38c3ad3ccdc1153ee7713c0eafd62b1c235 upstream. The guest-backed cursor path without cursor MOB support defines the image using only the hotspot from the plane state. Its position calculation also includes the legacy hotspot supplied through DRM_VMW_CURSOR_BYPASS. Xorg's xf86-video-vmware driver supplies its hotspot through that ioctl and loads the image with drmModeSetCursor(), which does not set a plane hotspot. The mismatched image and position hotspots displace the visible cursor by the legacy offset. Use the combined hotspot for both the GB-only image command and cursor position, matching the legacy and MOB image paths. Fixes: eef295a85082 ("drm/vmwgfx: Restore Guest-Backed only cursor plane support") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Tomas M Reviewed-by: Maaz Mombasawala Tested-by: fausten Signed-off-by: Zack Rusin Link: https://patch.msgid.link/20261027211729.646988-4-zack.rusin@broadcom.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c @@ -815,6 +815,10 @@ vmw_cursor_plane_atomic_update(struct dr return; } + /* Include legacy Xorg cursor-bypass offsets in the image and position. */ + hotspot_x = vps->cursor.legacy.hotspot_x + new_state->hotspot_x; + hotspot_y = vps->cursor.legacy.hotspot_y + new_state->hotspot_y; + switch (vps->cursor.update_type) { case VMW_CURSOR_UPDATE_LEGACY: vmw_cursor_plane_update_legacy(dev_priv, vps); @@ -828,8 +832,7 @@ vmw_cursor_plane_atomic_update(struct dr vmw_send_define_cursor_cmd(dev_priv, bo->map.virtual, vps->base.crtc_w, vps->base.crtc_h, - vps->base.hotspot_x, - vps->base.hotspot_y); + hotspot_x, hotspot_y); break; case VMW_CURSOR_UPDATE_NONE: /* do nothing */ @@ -842,9 +845,6 @@ vmw_cursor_plane_atomic_update(struct dr cursor_x = new_state->crtc_x + du->set_gui_x; cursor_y = new_state->crtc_y + du->set_gui_y; - hotspot_x = vps->cursor.legacy.hotspot_x + new_state->hotspot_x; - hotspot_y = vps->cursor.legacy.hotspot_y + new_state->hotspot_y; - vmw_cursor_update_position(dev_priv, true, cursor_x + hotspot_x, cursor_y + hotspot_y); }