fb.h 641 B

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