• Thomas Zimmermann's avatar
    drm/fb-helper: Schedule deferred-I/O worker after writing to framebuffer · 7f5cc4a3
    Thomas Zimmermann authored
    Schedule the deferred-I/O worker instead of the damage worker after
    writing to the fbdev framebuffer. The deferred-I/O worker then performs
    the dirty-fb update. The fbdev emulation will initialize deferred I/O
    for all drivers that require damage updates. It is therefore a valid
    assumption that the deferred-I/O worker is present.
    
    It would be possible to perform the damage handling directly from within
    the write operation. But doing this could increase the overhead of the
    write or interfere with a concurrently scheduled deferred-I/O worker.
    Instead, scheduling the deferred-I/O worker with its regular delay of
    50 ms removes load off the write operation and allows the deferred-I/O
    worker to handle multiple write operations that arrived during the delay
    time window.
    
    v3:
    	* remove unused variable (lkp)
    v2:
    	* keep drm_fb_helper_damage() (Daniel)
    	* use fb_deferred_io_schedule_flush() (Daniel)
    	* clarify comments (Daniel)
    Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
    Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20221115115819.23088-6-tzimmermann@suse.de
    7f5cc4a3
fb_defio.c 9.19 KB