cfbcopyarea.c 834 B

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