• Alex Goins's avatar
    randr: rrCheckPixmapBounding should only increase screen size · a90f3372
    Alex Goins authored
    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's avatarAlex Goins <agoins@nvidia.com>
    Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
    Reviewed-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
    a90f3372
Name
Last commit
Last update
..
Makefile.am Loading commit data...
meson.build Loading commit data...
randr.c Loading commit data...
randrstr.h Loading commit data...
rrcrtc.c Loading commit data...
rrdispatch.c Loading commit data...
rrinfo.c Loading commit data...
rrlease.c Loading commit data...
rrmode.c Loading commit data...
rrmonitor.c Loading commit data...
rroutput.c Loading commit data...
rrpointer.c Loading commit data...
rrproperty.c Loading commit data...
rrprovider.c Loading commit data...
rrproviderproperty.c Loading commit data...
rrscreen.c Loading commit data...
rrsdispatch.c Loading commit data...
rrtransform.c Loading commit data...
rrtransform.h Loading commit data...
rrxinerama.c Loading commit data...