All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <ppaalanen@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@linux.ie>,
	mombasawalam@vmware.com, dri-devel@lists.freedesktop.org,
	Gurchetan Singh <gurchetansingh@chromium.org>,
	krastevm@vmware.com, Gerd Hoffmann <kraxel@redhat.com>,
	wayland-devel <wayland-devel@lists.freedesktop.org>
Subject: Re: [PATCH 0/6] drm: Add mouse cursor hotspot support to atomic KMS
Date: Mon, 13 Jun 2022 10:45:29 +0300	[thread overview]
Message-ID: <20220613104529.25fc650a@eldfell> (raw)
In-Reply-To: <efdc6bb7-d088-467d-b843-a6e579263c61@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4789 bytes --]

On Sat, 11 Jun 2022 17:34:50 +0200
Hans de Goede <hdegoede@redhat.com> wrote:

> Hi,
> 
> On 6/10/22 14:53, Simon Ser wrote:
> > On Friday, June 10th, 2022 at 14:36, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >   
> >> Hi,
> >>  
> >>>> As Pekka mentionned, I'd also like to have a conversation of how far we want to
> >>>> push virtualized driver features. I think KMS support is a good feature to have
> >>>> to spin up a VM and have all of the basics working. However I don't think it's
> >>>> a good idea to try to plumb an ever-growing list of fancy features
> >>>> (seamless integration of guest windows into the host, HiDPI, multi-monitor,
> >>>> etc) into KMS. You'd just end up re-inventing Wayland or RDP on top of KMS.
> >>>> Instead of re-inventing these, just use RDP or waypipe or X11 forwarding
> >>>> directly.  
> >>  
> >>>> So I think we need to draw a line somewhere, and decide e.g. that virtualized
> >>>> cursors are fine to add in KMS, but HiDPI is not.  
> >>
> >>
> >> What is the problem with HiDPI? qemu generates standard edid blobs,
> >> there should be no need to special-case virtualized drivers in any way.
> >>
> >> What is the problem with multi-monitor? That isn't much different than
> >> physical multi-monitor either.
> >>
> >> One little thing though: On physical hardware you just don't know which
> >> monitor is left and which is right until the user tells you. In case of
> >> a virtual multi-monitor setup we know how the two windows for the two
> >> virtual monitors are arranged on the host and can pass that as hint to
> >> the guest (not sure whenever that is the purpose of the
> >> suggested_{x,y} properties).  
> > 
> > The problem with suggested_x/y is described here:
> > https://lore.kernel.org/dri-devel/20220610123629.fgu2em3fto53fpfy@sirius.home.kraxel.org/T/#m119cfbbf736e43831c3105f0c91bd790da2d58fb
> > 
> > HiDPI would need a way to propagate the scale factor back-and-forth:
> > the VM viewer needs to advertise the preferred scale to the guest
> > compositor, and the guest compositor needs to indicate the scale it
> > renders with to the VM viewer.
> > 
> > Sounds familiar? Yup, that's exactly the Wayland protocol. Do we really
> > want to replicate the Wayland protocol in KMS? I'm not so sure.
> >   
> >>> It's getting a bit far off-topic, but google cros team has an out-of-tree
> >>> (at least I think it's not merged yet) wayland-virtio driver for exactly
> >>> this use-case. Trying to move towards something like that for fancy
> >>> virtualized setups sounds like the better approach indeed, with kms just
> >>> as the bare-bones fallback option.  
> >>
> >> virtio-gpu got the ability to attach uuids to objects, to allow them
> >> being identified on the host side. So it could be that wayland-virtio
> >> still uses kms for framebuffers (disclaimer: don't know how
> >> wayland-virtio works in detail). But, yes, all the scanout + cursor
> >> handling would be out of the way, virtio-gpu would "only" handle fast
> >> buffer sharing.  
> > 
> > wayland-virtio is not used with KMS. wayland-virtio proxies the Wayland
> > protocol between the host and the guest, so the guest doesn't use KMS
> > in that case.  
> 
> It would be more correct to say: wayland clients inside the guest
> don't talk to a compositor inside the guest (but rather one
> outside the guest) and thus also don't depend (indirectly) on\
> having kms inside the guest.

Both ways may work. There are many Wayland compositors that can present
to another Wayland display.

In my mind which architecture you use depends on whether you want a root
window for the VM (with the ability to run any desktop in the guest
as-is) or whether you want root-window-less integration of VM/guest
applications into the host desktop.

> But the guest likely still needs kms for e.g. the kernel console
> to e.g. debug boot failures.

Sure. That doesn't need cursor planes at all, or anything else that
virtualised guest KMS drivers are specially adding to make specifically
a desktop experience more smooth.

> Note this could be done over a serial
> console too, so in some cases whatever "video-card" emulation
> the guest has could theoretically go away. But it is also completely
> possible for a guest to have both some emulated video-card which
> offers a kms API to userspace as well as wayland-virtio.

Of course. However the question here is, how far are we willing to
complicate, bend and even break KMS UAPI contract to make the KMS path
work in more fancy ways (likely with sub-optimal performance due to its
fundamental design) when something like wayland-virtio already exists
which allows for much more and in much better ways.


Thanks,
pq

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2022-06-13  7:45 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02 15:42 [PATCH 0/6] drm: Add mouse cursor hotspot support to atomic KMS Zack Rusin
2022-06-02 15:42 ` [PATCH 1/6] drm/atomic: Add support for mouse hotspots Zack Rusin
2022-06-02 15:42 ` [PATCH 2/6] drm/vmwgfx: Create mouse hotspot properties on cursor planes Zack Rusin
2022-06-03 13:11   ` Martin Krastev (VMware)
2022-06-02 15:42 ` [PATCH 3/6] drm/qxl: " Zack Rusin
2022-06-02 22:05   ` kernel test robot
2022-06-02 22:05     ` kernel test robot
2022-06-02 23:26   ` kernel test robot
2022-06-02 23:26     ` kernel test robot
2022-06-02 23:26     ` kernel test robot
2022-06-02 15:42 ` [PATCH 4/6] drm/vboxvideo: " Zack Rusin
2022-06-02 15:42 ` [PATCH 5/6] drm/virtio: " Zack Rusin
2022-06-02 15:42 ` [PATCH 6/6] drm: Remove legacy cursor hotspot code Zack Rusin
2022-06-03 10:28 ` [PATCH 0/6] drm: Add mouse cursor hotspot support to atomic KMS Gerd Hoffmann
2022-06-03 14:43   ` Zack Rusin
2022-06-03 14:14 ` Simon Ser
2022-06-03 14:27   ` Zack Rusin
2022-06-03 14:32     ` Simon Ser
2022-06-03 14:38       ` Zack Rusin
2022-06-03 14:56         ` Simon Ser
2022-06-03 15:17           ` Zack Rusin
2022-06-03 15:22             ` Simon Ser
2022-06-03 15:32               ` Zack Rusin
2022-06-03 15:49                 ` Simon Ser
2022-06-03 18:31                   ` Zack Rusin
2022-06-05  7:30                     ` Simon Ser
2022-06-05 15:47                       ` Zack Rusin
2022-06-05 16:26                         ` Simon Ser
2022-06-05 18:16                           ` Zack Rusin
2022-06-06  8:11                             ` Simon Ser
2022-06-04 21:19               ` Hans de Goede
2022-06-05  7:34                 ` Simon Ser
2022-06-07 11:25             ` Gerd Hoffmann
2022-06-06  9:13         ` Pekka Paalanen
2022-06-07  8:07   ` Pekka Paalanen
2022-06-07 14:30     ` Gerd Hoffmann
2022-06-08  7:53       ` Pekka Paalanen
2022-06-08 14:52         ` Gerd Hoffmann
2022-06-07 17:50     ` Zack Rusin
2022-06-08  7:53       ` Pekka Paalanen
2022-06-09 19:39         ` Zack Rusin
2022-06-10  7:49           ` Pekka Paalanen
2022-06-10  8:22             ` Jonas Ådahl
2022-06-10  8:54           ` Simon Ser
2022-06-10  9:01             ` Daniel Vetter
2022-06-10  8:41   ` Daniel Vetter
2022-06-10  8:56     ` Pekka Paalanen
2022-06-10  8:59     ` Daniel Vetter
2022-06-10 12:03       ` Gerd Hoffmann
2022-06-10 14:24       ` Zack Rusin
2022-06-13  7:33         ` Pekka Paalanen
2022-06-13 13:14           ` Zack Rusin
2022-06-13 14:25             ` Pekka Paalanen
2022-06-13 14:54               ` Zack Rusin
2022-06-14  7:36                 ` Pekka Paalanen
2022-06-14 14:40                   ` Zack Rusin
2022-06-14 14:54                     ` Daniel Stone
2023-06-09 15:20       ` Albert Esteve
2023-06-21  7:10         ` Javier Martinez Canillas
2023-06-22  4:29           ` Zack Rusin
2023-06-22  6:20             ` Javier Martinez Canillas
2022-06-10  9:15     ` Simon Ser
2022-06-10  9:49       ` Daniel Vetter
2022-06-10 12:36         ` Gerd Hoffmann
2022-06-10 12:53           ` Simon Ser
2022-06-11 15:34             ` Hans de Goede
2022-06-13  7:45               ` Pekka Paalanen [this message]

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=20220613104529.25fc650a@eldfell \
    --to=ppaalanen@gmail.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gurchetansingh@chromium.org \
    --cc=hdegoede@redhat.com \
    --cc=krastevm@vmware.com \
    --cc=kraxel@redhat.com \
    --cc=mombasawalam@vmware.com \
    --cc=tzimmermann@suse.de \
    --cc=wayland-devel@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.