Commit Graph

9 Commits

Author SHA1 Message Date
Giuseppe Bilotta
94e7ca6a56 rrmonitor: allocate using the correct type
Monitor outputs are of type RROutput, not RRCrtc.

(Which are both XID, so this makes no difference in practice, other than
being technically correct.)

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-01-31 14:43:56 -05:00
Hans de Goede
5c7af02b10 xrandrprovider: Do not use separate lists for unbound / source / offload slaves
A single provider can be both a offload and source slave at the same time,
the use of seperate lists breaks in this case e.g. :

xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 0 name:modesetting
Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 0 name:modesetting

xrandr --setprovideroutputsource 1 0x7b
xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 1 name:modesetting
Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 1 name:modesetting

xrandr --setprovideroffloadsink 1 0x7b
xrandr --listproviders
Providers: number : 3
Provider 0: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 2 name:modesetting
Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 2 name:modesetting
Provider 2: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 2 name:modesetting

Not good. The problem is that the provider with id 0x46 now is on both
the output_slave_list and the offload_slave_list of the master screen.

This commit fixes this by unifying all 3 lists into a single slaves list.

Note that this does change the struct _Screen definition, so this is an ABI
break. I do not expect any of the drivers to actually use the removed / changed
fields so a recompile should suffice.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-06-17 11:35:58 +02:00
Keith Packard
dbe8d03c42 randr: Send ConfigNotify when manual monitor list changes
This lets clients know that the layout of the monitors on the screen
has changed so they can adapt appropriately.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-02-16 20:56:39 -08:00
Jan Burgmeier
7bb64d8c1d Fix XineramaQueryScreens for reverse prime
Make sure we account for slave CRTCs when building the monitor list,
since that's what rrxinerama uses to fake Xinerama geometry.

[ajax: Slightly more informative commit message.]

Bugzilla: https://bugs.freedesktop.org/92313
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-02-08 17:22:34 -05:00
Jon TURNEY
9ee05c8987 debug output format fix in RRMonitorCrtcName()
xorg/xserver/randr/rrmonitor.c:35:5: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘RRCrtc’ [-Werror=format=]

RRCrtc is XID is CARD32, which inside the server is unsigned long or int
depending on architecture, so a cast is required.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-09-24 13:21:01 -04:00
Keith Packard
d7091a21d9 Merge remote-tracking branch 'airlied/for-keithp' 2015-05-11 15:49:34 -07:00
Dave Airlie
a9ac02f694 xf86Crtc/monitors: create initial monitors for tiled outputs
This creates an automatic monitor for a tiled monitor at startup.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-27 13:40:41 +10:00
Alan Coopersmith
1c56ac63c0 Convert top level extensions to new *allocarray functions
v2: remove now useless parentheses

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:57:08 -07:00
Keith Packard
7e1f86d42b randr: Add Monitor support (v1.1)
Store the user-defined monitors in the RandR screen private.

Generate a list of monitors from both the user-defined ones and from
any outputs not mentioned in one of the user-defined monitors. This list
covers both the outputs in the main screen as well as any slaves.

v1.1: airlied: fix up primary skipping bug,
fix wrong height initialiser
add get_active flag from updated protocol.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-03-31 12:32:04 +10:00