• Lucas Stach's avatar
    drm/imx: keep GEM object referenced as long as scanout is active · 0a7ad343
    Lucas Stach authored
    The DRM core only references the currently queued/active framebuffer.
    So there is a period of time where the flip is not completed, but
    the GEM object backing the FB is already unreferenced and could be
    destroyed if userspace closes its handle.
    
    Make sure to keep a reference to the GEM object until the flip is
    actually executed clean things up in a worker running behind the
    flip execution.
    
    Also move the page flip event into the context of this worker, so
    it gets cleaned up automatically.
    Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
    Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
    0a7ad343
ipuv3-crtc.c 12.8 KB