Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • xserver xserver
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 887
    • Issues 887
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 113
    • Merge requests 113
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • xserverxserver
  • Repository
Switch branch/tag
  • xserver
  • hw
  • xfree86
  • drivers
  • modesetting
  • drmmode_display.c
Find file BlameHistoryPermalink
  • José María Casanova Crespo's avatar
    modesetting: Fix front_bo leak at drmmode_xf86crtc_resize on XRandR rotation · 73480f17
    José María Casanova Crespo authored May 15, 2020 and José María Casanova Crespo's avatar José María Casanova Crespo committed Jun 27, 2020
    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: José María Casanova Crespo's avatarJose Maria Casanova Crespo <jmcasanova@igalia.com>
    Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
    Closes: #1024
    Fixes: 87745321 "modesetting: Remove unnecessary fb addition from
           drmmode_xf86crtc_resize"
    73480f17