In commit 0fade37a ("drm_hwcomposer: Rework autofd"), a change to some very subtle existing code caused a resource leak such that after 10 minutes or so of active display output, we would start seeing:
firstname.lastname@example.org: failed to dup fence 10
over and over in logcat. Moving the mouse would cause black frame to flicker and eventually Surfaceflinger would crash and restart.
This merge request tries to fix this serious leak as well as a likely unnecessary dup added in the same change (along with the TODO to fix it).