xserver-multidpi/hw
Jose Maria Casanova Crespo 73480f172a modesetting: Fix front_bo leak at drmmode_xf86crtc_resize on XRandR rotation
Since the introduction of "modesetting: Remove unnecessary fb addition from
drmmode_xf86crtc_resize" the fb_id isn't initialited at
drmmode_xf86crtc_resize.

Rotate operation of XRandR uses rotate_bo. So in this case the fb_id
associated to the front_bo is not initialized at drmmode_set_mode_major.
So fd_id remains 0.

As every call to drmmode_xf86crtc_resize allocates a new front_bo we should
destroy unconditionally the old_front_bo if operation success. So we free
the allocated GBM handles.

This avoids crashing xserver with a OOM in the RPI4 1Gb at 4k resolution
after 3 series xrandr rotations from normal to left and vice versa reported at
https://github.com/raspberrypi/firmware/issues/1345

Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1024
Fixes: 8774532121 "modesetting: Remove unnecessary fb addition from
       drmmode_xf86crtc_resize"
2020-06-27 08:29:45 +00:00
..
dmx Update URL's in man pages 2020-05-10 17:46:33 -07:00
kdrive Xephyr: Cast "red" to char* for xcb_aux_parse_color 2020-01-28 20:35:06 +00:00
vfb Revert https://gitlab.freedesktop.org/xorg/xserver/merge_requests/235 2019-10-14 12:48:24 +02:00
xfree86 modesetting: Fix front_bo leak at drmmode_xf86crtc_resize on XRandR rotation 2020-06-27 08:29:45 +00:00
xnest Fix build with gcc 9.3.0's -Werror=alloc-size-larger-than= 2020-05-01 20:02:29 +00:00
xquartz Update URL's in man pages 2020-05-10 17:46:33 -07:00
xwayland xwayland: Free all remaining events in xwl_present_cleanup 2020-06-25 17:32:19 +02:00
xwin hw/xwin: Drop call to setlocale() 2020-04-15 14:13:58 +00:00
Makefile.am Xwayland DDX 2014-04-03 15:19:22 -07:00
meson.build meson: Move Xvfb build under an option. 2017-09-20 13:19:21 -04:00