[lkml]   [2017]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC][PATCH] staging: ion: Fix ion_cma_heap allocations
On Thu, Dec 7, 2017 at 4:55 PM, Laura Abbott <> wrote:
> On 12/07/2017 03:42 PM, John Stultz wrote:
>> In trying to add support for drm_hwcomposer to HiKey,
>> I've needed to utilize the ION CMA heap, and I've noticed
>> problems with allocations on newer kernels failing.
>> It seems back with 204f672255c22 ("ion: Use CMA APIs directly"),
>> the ion_cma_heap code was modified to use the CMA API, but
>> kept the arguments as buffer lengths rather then number of pages.
>> This results in errors as we don't have enough pages in CMA to
>> satisfy the exaggerated requests.
>> This patch converts the ion_cma_heap CMA API usage to properly
>> request pages.
>> It also fixes a minor issue in the allocation where in the error
>> path, the cma_release is called with the buffer->size value which
>> hasn't yet been set.
>> I'm no memory expert so close review would be appreciated!
> Yup.
> Acked-by: Laura Abbott <>

Thanks for that!

I realized right after sending that there's a checkpatch issue to be
fixed up, so I'll resend tomorrow (including your ack) if there aren't
any other objections.


 \ /
  Last update: 2017-12-08 02:22    [W:0.043 / U:1.228 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site