Loading drivers/gpu/msm/kgsl.c +8 −3 Original line number Diff line number Diff line Loading @@ -3788,6 +3788,10 @@ kgsl_get_unmapped_area(struct file *file, unsigned long addr, } /* special case handling for MAP_FIXED */ if (flags & MAP_FIXED) { if (addr + len > KGSL_SVM_UPPER_BOUND) { ret = -EFAULT; goto put; } ret = get_unmapped_area(NULL, addr, len, pgoff, flags); if (!ret || IS_ERR_VALUE(ret)) goto put; Loading Loading @@ -3816,7 +3820,7 @@ kgsl_get_unmapped_area(struct file *file, unsigned long addr, * first try to see if the suggested address is accepted by the * system map and our gpu map */ if (addr) { if (addr && (addr + len <= KGSL_SVM_UPPER_BOUND)) { vma = find_vma(current->mm, addr); if (!vma || ((addr + len) <= vma->vm_start)) { Loading Loading @@ -3882,11 +3886,12 @@ kgsl_get_unmapped_area(struct file *file, unsigned long addr, if (flag_top_down) { info.flags = VM_UNMAPPED_AREA_TOPDOWN; info.low_limit = PAGE_SIZE; info.high_limit = addr; info.high_limit = (addr > KGSL_SVM_UPPER_BOUND) ? KGSL_SVM_UPPER_BOUND : addr; } else { info.flags = 0; info.low_limit = addr; info.high_limit = TASK_SIZE; info.high_limit = KGSL_SVM_UPPER_BOUND; } ret = vm_unmapped_area(&info); Loading drivers/gpu/msm/kgsl.h +3 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,9 @@ /* The size of each entry in a page table */ #define KGSL_PAGETABLE_ENTRY_SIZE 4 /* The SVM upper bound is the same as the TASK_SIZE in arm32 */ #define KGSL_SVM_UPPER_BOUND (0xC0000000 - SZ_16M) /* Pagetable Virtual Address base */ #ifndef CONFIG_MSM_KGSL_CFF_DUMP #define KGSL_PAGETABLE_BASE 0x10000000 Loading Loading
drivers/gpu/msm/kgsl.c +8 −3 Original line number Diff line number Diff line Loading @@ -3788,6 +3788,10 @@ kgsl_get_unmapped_area(struct file *file, unsigned long addr, } /* special case handling for MAP_FIXED */ if (flags & MAP_FIXED) { if (addr + len > KGSL_SVM_UPPER_BOUND) { ret = -EFAULT; goto put; } ret = get_unmapped_area(NULL, addr, len, pgoff, flags); if (!ret || IS_ERR_VALUE(ret)) goto put; Loading Loading @@ -3816,7 +3820,7 @@ kgsl_get_unmapped_area(struct file *file, unsigned long addr, * first try to see if the suggested address is accepted by the * system map and our gpu map */ if (addr) { if (addr && (addr + len <= KGSL_SVM_UPPER_BOUND)) { vma = find_vma(current->mm, addr); if (!vma || ((addr + len) <= vma->vm_start)) { Loading Loading @@ -3882,11 +3886,12 @@ kgsl_get_unmapped_area(struct file *file, unsigned long addr, if (flag_top_down) { info.flags = VM_UNMAPPED_AREA_TOPDOWN; info.low_limit = PAGE_SIZE; info.high_limit = addr; info.high_limit = (addr > KGSL_SVM_UPPER_BOUND) ? KGSL_SVM_UPPER_BOUND : addr; } else { info.flags = 0; info.low_limit = addr; info.high_limit = TASK_SIZE; info.high_limit = KGSL_SVM_UPPER_BOUND; } ret = vm_unmapped_area(&info); Loading
drivers/gpu/msm/kgsl.h +3 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,9 @@ /* The size of each entry in a page table */ #define KGSL_PAGETABLE_ENTRY_SIZE 4 /* The SVM upper bound is the same as the TASK_SIZE in arm32 */ #define KGSL_SVM_UPPER_BOUND (0xC0000000 - SZ_16M) /* Pagetable Virtual Address base */ #ifndef CONFIG_MSM_KGSL_CFF_DUMP #define KGSL_PAGETABLE_BASE 0x10000000 Loading