fb.h (921B)
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _ASM_FB_H_ 3#define _ASM_FB_H_ 4 5#include <linux/fb.h> 6#include <linux/fs.h> 7#include <asm/page.h> 8#include <asm/setup.h> 9 10#ifdef CONFIG_MMU 11#ifdef CONFIG_SUN3 12static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, 13 unsigned long off) 14{ 15 pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE; 16} 17#else 18static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, 19 unsigned long off) 20{ 21 if (CPU_IS_020_OR_030) 22 pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030; 23 if (CPU_IS_040_OR_060) { 24 pgprot_val(vma->vm_page_prot) &= _CACHEMASK040; 25 /* Use no-cache mode, serialized */ 26 pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S; 27 } 28} 29#endif /* CONFIG_SUN3 */ 30#else 31#define fb_pgprotect(...) do {} while (0) 32#endif /* CONFIG_MMU */ 33 34static inline int fb_is_primary_device(struct fb_info *info) 35{ 36 return 0; 37} 38 39#endif /* _ASM_FB_H_ */