1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 3 * Copyright (C) 2025 Zsolt Kajtar (soci@c64.rulez.org) 4 */ 5 6 #include <linux/export.h> 7 #include <linux/module.h> 8 #include <linux/fb.h> 9 #include <linux/bitrev.h> 10 #include <asm/types.h> 11 12 #ifdef CONFIG_FB_CFB_REV_PIXELS_IN_BYTE 13 #define FB_REV_PIXELS_IN_BYTE 14 #endif 15 16 #include "cfbmem.h" 17 #include "fb_copyarea.h" 18 19 void cfb_copyarea(struct fb_info *p, const struct fb_copyarea *area) 20 { 21 if (p->state != FBINFO_STATE_RUNNING) 22 return; 23 24 if (p->flags & FBINFO_VIRTFB) 25 fb_warn_once(p, "%s: framebuffer is not in I/O address space.\n", __func__); 26 27 if (p->fbops->fb_sync) 28 p->fbops->fb_sync(p); 29 30 fb_copyarea(p, area); 31 } 32 EXPORT_SYMBOL(cfb_copyarea); 33 34 MODULE_AUTHOR("Zsolt Kajtar <soci@c64.rulez.org>"); 35 MODULE_DESCRIPTION("I/O memory packed pixel framebuffer area copy"); 36 MODULE_LICENSE("GPL"); 37