xserver-multidpi/randr
Alex Goins 5396a4aa08 randr: rrCheckPixmapBounding should only increase screen size
The purpose of rrCheckPixmapBounding() is to make sure that the fb is large
enough to accommodate the region scanned out by a GPU screen. Currently, however,
it will actually shrink the fb if it's larger than it needs to be.

This is a problem when combining PRIME output slaving with arbitrary transforms
with xrandr.

Although arbitrary transforms are not supposed to constrain the size of the fb
(https://lists.freedesktop.org/archives/xorg-devel/2018-January/055563.html),
xrandr will use RRSetScreenSize to resize the desktop to accommodate scaling
transforms, e.g. scaling a 1920x1080 display to 3840x2160 will result in a
desktop size of 3840x2160.

In the case of PRIME, rrCheckPixmapBounding() will be called after
RRSetScreenSize() and it will resize the fb back down to what it would be
without the scaling transform, e.g. 1920x1080. This represents divergence in
behavior between PRIME and non-PRIME outputs.

I had originally made rrCheckPixmapBounding() account for arbitrary transforms,
but realized that the fb being large enough to accommodate arbitrary transforms
is not a hard requirement enforced in the server. Instead, this change simply
makes it so that rrCheckPixmapBounding() will only resize the fb to be larger
than it already is, preventing it from stepping on prior requests to increase
the size of the fb.

Signed-off-by: Alex Goins <agoins@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit a90f33721e)
2018-10-04 17:23:57 +02:00
..
Makefile.am Add RandR leases with modesetting driver support [v6] 2018-02-27 12:39:50 -05:00
meson.build meson: Distribute more SDK headers 2018-04-02 13:42:08 -04:00
randr.c During reset/shutdown, clean up leases in DIX instead of each driver 2018-08-07 12:08:01 -04:00
randrstr.h During reset/shutdown, clean up leases in DIX instead of each driver 2018-08-07 12:08:01 -04:00
rrcrtc.c randr: rrCheckPixmapBounding should only increase screen size 2018-10-04 17:23:57 +02:00
rrdispatch.c Add RandR leases with modesetting driver support [v6] 2018-02-27 12:39:50 -05:00
rrinfo.c Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
rrlease.c During reset/shutdown, clean up leases in DIX instead of each driver 2018-08-07 12:08:01 -04:00
rrmode.c Add RandR leases with modesetting driver support [v6] 2018-02-27 12:39:50 -05:00
rrmonitor.c rrmonitor: allocate using the correct type 2018-01-31 14:43:56 -05:00
rroutput.c During reset/shutdown, clean up leases in DIX instead of each driver 2018-08-07 12:08:01 -04:00
rrpointer.c randr: Fix logic in RRPointerToNearestCrtc 2014-07-30 14:40:17 -07:00
rrproperty.c Add RandR leases with modesetting driver support [v6] 2018-02-27 12:39:50 -05:00
rrprovider.c randr: Fix a compiler warning on 32-bit. 2018-05-08 11:59:31 -04:00
rrproviderproperty.c Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
rrscreen.c Add RandR leases with modesetting driver support [v6] 2018-02-27 12:39:50 -05:00
rrsdispatch.c Add RandR leases with modesetting driver support [v6] 2018-02-27 12:39:50 -05:00
rrtransform.c randr: Silence -Wshift-negative-value warnings 2015-10-19 11:51:52 -04:00
rrtransform.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
rrxinerama.c dispatch: Mark swapped dispatch as _X_COLD 2017-03-01 10:16:20 -05:00