]> git.ipfire.org Git - thirdparty/kernel/linux.git/blame - arch/sparc/include/asm/fb.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[thirdparty/kernel/linux.git] / arch / sparc / include / asm / fb.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
9f747d6c
DM
2#ifndef _SPARC_FB_H_
3#define _SPARC_FB_H_
0a492896 4#include <linux/console.h>
317b3c21 5#include <linux/fb.h>
9f747d6c
DM
6#include <linux/fs.h>
7#include <asm/page.h>
3adf55ad 8#include <asm/prom.h>
10eb2659 9
9f747d6c
DM
10static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
11 unsigned long off)
12{
13#ifdef CONFIG_SPARC64
14 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
15#endif
16}
10eb2659 17
317b3c21
AD
18static inline int fb_is_primary_device(struct fb_info *info)
19{
3adf55ad
DM
20 struct device *dev = info->device;
21 struct device_node *node;
22
0a492896
DM
23 if (console_set_on_cmdline)
24 return 0;
25
61c7a080 26 node = dev->of_node;
3adf55ad
DM
27 if (node &&
28 node == of_console_device)
29 return 1;
30
317b3c21
AD
31 return 0;
32}
33
9f747d6c 34#endif /* _SPARC_FB_H_ */