aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fb.h')
-rw-r--r--include/linux/fb.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 9a4f035e9fdc..82e39cd0c4fb 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -833,6 +833,21 @@ extern int fb_new_modelist(struct fb_info *info);
833extern struct fb_info *registered_fb[FB_MAX]; 833extern struct fb_info *registered_fb[FB_MAX];
834extern int num_registered_fb; 834extern int num_registered_fb;
835 835
836static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
837 u8 *src, u32 s_pitch, u32 height)
838{
839 int i, j;
840
841 d_pitch -= s_pitch;
842
843 for (i = height; i--; ) {
844 /* s_pitch is a few bytes at the most, memcpy is suboptimal */
845 for (j = 0; j < s_pitch; j++)
846 *dst++ = *src++;
847 dst += d_pitch;
848 }
849}
850
836/* drivers/video/fbsysfs.c */ 851/* drivers/video/fbsysfs.c */
837extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); 852extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
838extern void framebuffer_release(struct fb_info *info); 853extern void framebuffer_release(struct fb_info *info);