Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/fb-helper: Perform damage handling in deferred-I/O helper

Call fb_dirty directly from drm_fb_helper_deferred_io() to avoid the
latency of running the damage worker.

The deferred-I/O helper drm_fb_helper_deferred_io() runs in a worker
thread at regular intervals as part of writing to mmaped framebuffer
memory. It used to schedule the fbdev damage worker to flush the
framebuffer. Changing this to flushing the framebuffer directly avoids
the latency introduced by the damage worker.

v2:
* remove fb_dirty from defio in separate patch (Daniel)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20221115115819.23088-5-tzimmermann@suse.de

+9 -3
+9 -3
drivers/gpu/drm/drm_fb_helper.c
··· 666 666 667 667 if (min_off < max_off) { 668 668 drm_fb_helper_memory_range_to_clip(info, min_off, max_off - min_off, &damage_area); 669 - drm_fb_helper_damage(helper, damage_area.x1, damage_area.y1, 670 - drm_rect_width(&damage_area), 671 - drm_rect_height(&damage_area)); 669 + drm_fb_helper_add_damage_clip(helper, damage_area.x1, damage_area.y1, 670 + drm_rect_width(&damage_area), 671 + drm_rect_height(&damage_area)); 672 672 } 673 + 674 + /* 675 + * Flushes all dirty pages from mmap's pageref list and the 676 + * areas that have been written by struct fb_ops callbacks. 677 + */ 678 + drm_fb_helper_fb_dirty(helper); 673 679 } 674 680 EXPORT_SYMBOL(drm_fb_helper_deferred_io); 675 681