fb.h 680 B

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _SPARC_FB_H_
  3. #define _SPARC_FB_H_
  4. #include <linux/console.h>
  5. #include <linux/fb.h>
  6. #include <linux/fs.h>
  7. #include <asm/page.h>
  8. #include <asm/prom.h>
  9. static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
  10. unsigned long off)
  11. {
  12. #ifdef CONFIG_SPARC64
  13. vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
  14. #endif
  15. }
  16. static inline int fb_is_primary_device(struct fb_info *info)
  17. {
  18. struct device *dev = info->device;
  19. struct device_node *node;
  20. if (console_set_on_cmdline)
  21. return 0;
  22. node = dev->of_node;
  23. if (node &&
  24. node == of_console_device)
  25. return 1;
  26. return 0;
  27. }
  28. #endif /* _SPARC_FB_H_ */