xref: /openbmc/linux/arch/powerpc/include/asm/fb.h (revision 0791faebfe750292a8a842b64795a390ca4a3b51)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2b8b572e1SStephen Rothwell #ifndef _ASM_FB_H_
3b8b572e1SStephen Rothwell #define _ASM_FB_H_
4b8b572e1SStephen Rothwell 
5b8b572e1SStephen Rothwell #include <linux/fs.h>
6*b50f6d46SThomas Zimmermann 
7b8b572e1SStephen Rothwell #include <asm/page.h>
8b8b572e1SStephen Rothwell 
fb_pgprotect(struct file * file,struct vm_area_struct * vma,unsigned long off)9b8b572e1SStephen Rothwell static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
10b8b572e1SStephen Rothwell 				unsigned long off)
11b8b572e1SStephen Rothwell {
12b8b572e1SStephen Rothwell 	vma->vm_page_prot = phys_mem_access_prot(file, off >> PAGE_SHIFT,
13b8b572e1SStephen Rothwell 						 vma->vm_end - vma->vm_start,
14b8b572e1SStephen Rothwell 						 vma->vm_page_prot);
15b8b572e1SStephen Rothwell }
16*b50f6d46SThomas Zimmermann #define fb_pgprotect fb_pgprotect
17b8b572e1SStephen Rothwell 
18*b50f6d46SThomas Zimmermann #include <asm-generic/fb.h>
19b8b572e1SStephen Rothwell 
20b8b572e1SStephen Rothwell #endif /* _ASM_FB_H_ */
21