Confusing parameters for "xrand --setprovideroffloadsink"

Qu Wenruo quwenruo.btrfs at gmx.com
Tue Dec 25 08:09:55 UTC 2018


Hi,

I'm trying to understand what the parameters of "xrand
--setprovideroffloadsink" means.

Google/Arch shows a lot of eGPU use cases, where user should just exec
"xrandr --setprovideroffloadsink 1 0", to make the secondary GPU to
output to the first one.

However the man page also shows:

  If  sink  is  0x0,  then provider is disconnected from its current
  render offload sink.

I checked the code of xrandr.c, set_name() will first try to
sscanf("0x%x"), and if hit pass it as @xid, while for normal "%d" it
passes the value to @idx, and finally use char*.

I'm wonder what's the difference between @xid and @idx and char* name.

My current guess is, with the listproviders output it would be:

Provider 0: id: 0x5a ... name:Radeon RX 580 Series @ pci:0000:26:00.0
         ^      ^^^^          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |       |                         |- name?
         |       |- @xid?
         @idx?

Personally it's pretty confusing at least.

Thanks,
Qu


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.x.org/archives/xorg/attachments/20181225/8a64091c/attachment.sig>


More information about the xorg mailing list