Merge "msm: kgsl: Perform cache flush on the pages obtained using get_user_pages()"
This commit is contained in:
commit
8e0e8dc1de
1 changed files with 10 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (c) 2008-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
|
@ -2179,6 +2180,15 @@ static int memdesc_sg_virt(struct kgsl_memdesc *memdesc, unsigned long useraddr)
|
|||
|
||||
ret = sg_alloc_table_from_pages(memdesc->sgt, pages, npages,
|
||||
0, memdesc->size, GFP_KERNEL);
|
||||
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = kgsl_cache_range_op(memdesc, 0, memdesc->size,
|
||||
KGSL_CACHE_OP_FLUSH);
|
||||
|
||||
if (ret)
|
||||
sg_free_table(memdesc->sgt);
|
||||
out:
|
||||
if (ret) {
|
||||
for (i = 0; i < npages; i++)
|
||||
|
|
|
|||
Loading…
Reference in a new issue