We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4296 - kmsdrm video driver leaks 1 bo in KMSDRM_GLES_SetupCrtc()
Summary: kmsdrm video driver leaks 1 bo in KMSDRM_GLES_SetupCrtc()
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.8
Hardware: ARM Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-05 16:54 UTC by Icenowy Zheng
Modified: 2018-10-06 00:06 UTC (History)
0 users

See Also:


Attachments
[PATCH] Catch the lost BO in KMSDRM driver (2.05 KB, patch)
2018-10-05 16:54 UTC, Icenowy Zheng
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Icenowy Zheng 2018-10-05 16:54:27 UTC
Created attachment 3341 [details]
[PATCH] Catch the lost BO in KMSDRM driver

One front buffer is locked in GLES_SetupCrtc() and overrides the next_bo just locked in KMSDRM_GLES_SwapWindow, then the next_bo gets lost and is not released even when quitting the video.

It may leads to problems with GLES drivers that doesn't clean up GBM correctly if there's any bo left (e.g. the Mali Utgard r6p2 blob). In the case of Mali Utgard r6p2 blob, the DRM device file is still hold by the blob, and if you try to SDL_Quit to let another program to run (this is done by EmulationStation), the new program will fail to open DRM device.
Comment 1 Sam Lantinga 2018-10-06 00:06:23 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/d8683d6ff2f8