Skip to content

Commit

Permalink
ODROID-C2: gpu/arm: hack to force the memory page writable
Browse files Browse the repository at this point in the history
This patch is the hack to force the memory pages allocated by the ump driver
to be writable such that they cannot have an error 'permission denied' when
'mmap()' is called.

Change-Id: I6917b0c36d93b0bf24a5a81d68c46c1802e2f9a5
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
  • Loading branch information
tobetter committed Jul 2, 2018
1 parent c34d3a3 commit e6a2123
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/arm/ump/linux/ump_kernel_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,16 @@ static int ump_file_ioctl(struct inode *inode, struct file *filp, unsigned int c
break;

case UMP_IOC_ALLOCATE :
#if defined(CONFIG_ARCH_MESON64_ODROIDC2)
mapping_allow_writable(filp->f_mapping);
#endif
err = ump_allocate_wrapper((u32 __user *)argument, session_data);
break;

case UMP_IOC_RELEASE:
#if defined(CONFIG_ARCH_MESON64_ODROIDC2)
mapping_deny_writable(filp->f_mapping);
#endif
err = ump_release_wrapper((u32 __user *)argument, session_data);
break;

Expand Down

0 comments on commit e6a2123

Please sign in to comment.