Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _SPARC_FB_H_
0003 #define _SPARC_FB_H_
0004 #include <linux/console.h>
0005 #include <linux/fb.h>
0006 #include <linux/fs.h>
0007 #include <asm/page.h>
0008 #include <asm/prom.h>
0009 
0010 static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
0011                 unsigned long off)
0012 {
0013 #ifdef CONFIG_SPARC64
0014     vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
0015 #endif
0016 }
0017 
0018 static inline int fb_is_primary_device(struct fb_info *info)
0019 {
0020     struct device *dev = info->device;
0021     struct device_node *node;
0022 
0023     if (console_set_on_cmdline)
0024         return 0;
0025 
0026     node = dev->of_node;
0027     if (node &&
0028         node == of_console_device)
0029         return 1;
0030 
0031     return 0;
0032 }
0033 
0034 #endif /* _SPARC_FB_H_ */