From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9570DC433EF for ; Sun, 5 Jun 2022 16:26:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B0F910E183; Sun, 5 Jun 2022 16:26:23 +0000 (UTC) Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id DE9B010E183 for ; Sun, 5 Jun 2022 16:26:21 +0000 (UTC) Date: Sun, 05 Jun 2022 16:26:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail2; t=1654446379; x=1654705579; bh=5laiKgw7lv0eyY8Cc6jwyReGbLbZJ8FCX8eFaV0YuS8=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=U4bdEGTvHEdVlyJ2qVxGvW6xjcltY0nvIeik6F5tCtLUzP/ArKoMQPQPrEbMFvQJn 3Xy3SLPqog2g6YDsSYo3IjKgNK1DS2lMFO32cpi8u0xaM5mTTtonQWf79Wl82Ogk74 5VdOAjYgW6094JTlwRhQWgFNPqE6ZAzsQ1QjB0V+lA97K7L6G5nkpydrq5R2p7dxtC vR4qu0t4hYzv+VLbZMq2nVGHelZcXiNQtQbEM1f+2koEQZi/d8nD7hYlgigcE8TScQ UEnoH/Ns89Qpiu1M0SzwUG6GQxEOayZb3qdvBqRDEKsmdOF5OytlHvOaC0u86Gxdz5 hFGLEg/y6zdeg== To: Zack Rusin From: Simon Ser Subject: Re: [PATCH 0/6] drm: Add mouse cursor hotspot support to atomic KMS Message-ID: In-Reply-To: <40CAE3E3-9C74-4DC3-B0FD-8F00C7C29291@vmware.com> References: <20220602154243.1015688-1-zack@kde.org> <00204913-BCF7-4D42-856D-675342B2B3E9@vmware.com> <1E185B64-591E-47A5-A4D9-55E1BC3105CC@vmware.com> <40CAE3E3-9C74-4DC3-B0FD-8F00C7C29291@vmware.com> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Simon Ser Cc: Martin Krastev , David Airlie , "dri-devel@lists.freedesktop.org" , Gurchetan Singh , Hans de Goede , Pekka Paalanen , Gerd Hoffmann , Thomas Zimmermann , wayland-devel , Maaz Mombasawala Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" ------- Original Message ------- On Sunday, June 5th, 2022 at 17:47, Zack Rusin wrote: > > > Also, let me point this out because it also seems to be a fundamental > > > misunderstanding, user space implementing software cursor doesn= =E2=80=99t fix > > > anything. Just leaves everything broken in different ways. The reason > > > virtualized drivers went away from software cursors is because it mak= es it > > > impossible to make it work with a bunch of interesting and desirable > > > scenarios, e.g. unity mode where the guest might have a terminal and = browser > > > open and then the virtual machine software creates windows out of tho= se, so > > > you don=E2=80=99t have the entire desktop of the guest but instead na= tive looking > > > windows with the apps. In that case guest has no way of knowing when = the > > > cursor leaves the window, so to make seemless cursors work you= =E2=80=99d need to > > > implement irc or backdoors that send that information from the host t= o the > > > guest, then have virtualized drivers create some sort of uevent, to s= end to > > > the userspace to let it know to hide the cursor because it actually l= eft the > > > window. That=E2=80=99s a trivial scenario and there=E2=80=99s a lot m= ore with mice that are > > > remoted themselves, guests with singular or maybe many apps exported, > > > possibly overlapping on the host but all within a desktop in the gues= t, etc. > > > > Are you saying that the current broken behavior is better than software > > cursors? > > They=E2=80=99re broken in very different ways. You=E2=80=99re asking me w= hich bugs do > I prefer. Ultimately the current lack of hotspots leaves mouse unusable > but I don=E2=80=99t see any reason to trade that for another set of bugs = instead > of just fixing it (either via fallback to legacy or using the new hotspot > api). Software cursors aren't a bug. They're a fallback. > > > > > > New user-space supports setting the hotspot prop, and is aware = that it can't > > > > > > set the cursor plane position, so the cursor plane can be expos= ed again when > > > > > > the cap is enabled. > > > > > > > > > > But we still use cursor plane position. Hotspots are offsets from > > > > > cursor plane positions. Both are required. > > > > > > > > No, VM drivers don't need and disregard the cursor position AFAIK. = They > > > > replace it with the host cursor's position. > > > > > > Iirc they all use it. > > > > What do they use it for? > > > > The whole point of this discussion is to be able to display the guest's= cursor > > image on the host's cursor, so that latency is reduced? > > > Ah, I think I see now where the confusion is coming from. No, it=E2=80= =99s > definitely not. This has nothing to do with latency. By default > position of a mouse cursor doesn=E2=80=99t tell us where the point that i= s > actually used as an activation of a click is, e.g. a mouse cursor image > with an arrow pointing to the top-left and a mouse cursor image pointing > to the bottom right - both at the same position, as you can imagine it wi= ll > become impossible to use the desktop if the click defaults to the top lef= t, > especially as the number of cursor images increases, you need information > about which point within the cursor image activates the click, that= =E2=80=99s the > hotspot. You need to know the position of the image and you need to know > which point within that image is responsible for actually activating the > events. Yeah, that's what a hotspot is. By "the whole point of this discussion", I meant that the whole point for VM drivers to expose a hardware cursor is to improve latency (and provide other related features). At any rate, I consider broken any driver which exposes a cursor plane, then doesn't display it exactly at the CRTC_X/CRTC_Y or misbehaves if it's missing hotspot info.