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

drm/fbdev: fix drm_fb_helper_deferred_io() build failure

The drm_fb_helper_deferred_io() uses struct fb_deferred_io_pageref,
which isn't available without CONFIG_FB_DEFERRED_IO. Put the function
under corresponding #ifdef to fix build failure if deferred I/O isn't
enabled.

Fixes: 8058944f5226 ("drm/fbdev: Select fbdev I/O helpers from modules that require them")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20241021-fix-drm-deferred-v2-1-db1de4c6b042@linaro.org

authored by

Dmitry Baryshkov and committed by
Thomas Zimmermann
3ccddc39 d284ccd8

+6
+2
drivers/gpu/drm/drm_fb_helper.c
··· 697 697 } 698 698 EXPORT_SYMBOL(drm_fb_helper_damage_area); 699 699 700 + #ifdef CONFIG_FB_DEFERRED_IO 700 701 /** 701 702 * drm_fb_helper_deferred_io() - fbdev deferred_io callback function 702 703 * @info: fb_info struct pointer ··· 741 740 } 742 741 } 743 742 EXPORT_SYMBOL(drm_fb_helper_deferred_io); 743 + #endif 744 744 745 745 /** 746 746 * drm_fb_helper_set_suspend - wrapper around fb_set_suspend
+4
include/drm/drm_fb_helper.h
··· 256 256 void drm_fb_helper_damage_range(struct fb_info *info, off_t off, size_t len); 257 257 void drm_fb_helper_damage_area(struct fb_info *info, u32 x, u32 y, u32 width, u32 height); 258 258 259 + #ifdef CONFIG_FB_DEFERRED_IO 259 260 void drm_fb_helper_deferred_io(struct fb_info *info, struct list_head *pagereflist); 261 + #endif 260 262 261 263 void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, bool suspend); 262 264 void drm_fb_helper_set_suspend_unlocked(struct drm_fb_helper *fb_helper, ··· 363 361 return 0; 364 362 } 365 363 364 + #ifdef CONFIG_FB_DEFERRED_IO 366 365 static inline void drm_fb_helper_deferred_io(struct fb_info *info, 367 366 struct list_head *pagelist) 368 367 { 369 368 } 369 + #endif 370 370 371 371 static inline void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, 372 372 bool suspend)