Re: [PATCH linux vdagent] Add POC for getting xrandr output from monitor ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 23, 2018 at 03:24:21PM -0500, Jonathon Jongsma wrote:
> On Wed, 2018-10-10 at 13:33 +0200, Gerd Hoffmann wrote:
> >   Hi,
> > 
> > > Also, can you respond to Frediano's comments below about e.g. HDMI-
> > > A,
> > > etc? As far as I can tell, libdrm doesn't really give us a
> > > canonical
> > > name for the output, it only gives us a connection type
> > > enumeration. I
> > > borrowed a function from your drminfo utility to construct an
> > > output
> > > name, but that doesn't seem to perfectly match the xrandr output
> > > names.
> > 
> > xrandr names come from the driver, so maybe take the table from the
> > modesetting driver instead.
> 
> When you talk about the table from the modesetting driver, do you mean
> this? 
> https://gitlab.freedesktop.org/xorg/xserver/blob/master/hw/xfree86/drivers/modesetting/drmmode_display.c#L2779

Probably (can't look right now, conference wifi is rather flaky).

> But if the names are driver-specific, a different driver can use
> different names. For example, the xorg QXL driver uses fairly different
> names:
> 
> 
> https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/blob/master/src/qxl_drmmode.c#L723
> 
> Comparing the modesetting table above to the QXL table, there are
> differences between:
> DVI-I -> DVI
> DVI-D -> DVI
> DVI-A -> DVI
> HDMI-B -> HDMI

The qxl kernel driver uses connector type virtual, so you will not see
the other ones.  But, yes, it might be we need hardware-specific code
here.  Not sure what nvidia is doing here.  Also the qxl driver shifts
the index by one so you'll see VIRTUAL-0 instead of -1.

> In addition, I've noticed that on my laptop I have the following
> discrepancies:
> 
> drm		xrandr
> ---		------
> DP-4		DP-3-1
> DP-5		DP-3-2
> DP-6		DP-3-3

What hardware is this?

> > Yep.  Most hardware is handled by the modesetting driver these days.
> 
> When you say "these days", what do you mean exactly? How long ago did
> this transition happen? Will we run into issues supporting older
> releases?

Hardware sepcific xorg drivers are slowly going away in favor of using
modesetting and glamor (i.e. use the mesa 3d driver for acceleration,
if available).

> And can you be a bit more specific about "most" as well? What are the
> exceptions?

All qemu emulated display devices except qxl use modesetting (stdvga,
cirrus, virtio).

On recent intel hardware modesetting is used by default.  I think this
includes all hardware revisions which are supported by gvt.

Nvidia has its own driver, so it might need a special case (as already
mentioned above).

Other hardware should not show up in a virtual machine.

> > /sys/devices/pci0000:00/0000:00:02.0/drm/card0
> >                 ^^^^            ^^^^
> > In case of virtio there will be another path element, like this:
> > 
> > /sys/devices/pci0000:00/0000:00:02.0/virtio4/drm/card0
> > 
> > Don't become confused by this.
> 
> So let's say that I have the following sysfs path: 
> ../../devices/pci0000:00/0000:00:03.0/0000:01:01.0/0000:02:03.0/virtio2
> /drm/card0
> 
> How would that translate to your proposed format?
> 
> pci/0000/03.0/01.0/03.0 ??? 

Yes.

> Would we just ignore the different bus numbers for each device?

Yes.

cheers,
  Gerd

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]