[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200317132031.GA8125@infradead.org>
Date: Tue, 17 Mar 2020 06:20:31 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Jordan Crouse <jcrouse@...eaurora.org>
Cc: linux-arm-msm@...r.kernel.org, smasetty@...eaurora.org,
John Stultz <john.stultz@...aro.org>,
Sean Paul <sean@...rly.run>,
Stephen Boyd <swboyd@...omium.org>,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
Douglas Anderson <dianders@...omium.org>,
Rob Clark <robdclark@...il.com>,
David Airlie <airlied@...ux.ie>,
"Michael J. Ruhl" <michael.j.ruhl@...el.com>,
freedreno@...ts.freedesktop.org, Daniel Vetter <daniel@...ll.ch>
Subject: Re: [PATCH v5 2/2] drm/msm/a6xx: Use the DMA API for GMU memory
objects
> @@ -942,7 +932,6 @@ static struct a6xx_gmu_bo *a6xx_gmu_memory_alloc(struct a6xx_gmu *gmu,
> size_t size)
> {
> struct a6xx_gmu_bo *bo;
> - int ret, count, i;
>
> bo = kzalloc(sizeof(*bo), GFP_KERNEL);
> if (!bo)
> @@ -950,86 +939,14 @@ static struct a6xx_gmu_bo *a6xx_gmu_memory_alloc(struct a6xx_gmu *gmu,
>
> bo->size = PAGE_ALIGN(size);
>
> - count = bo->size >> PAGE_SHIFT;
> + bo->virt = dma_alloc_wc(gmu->dev, bo->size, &bo->iova, GFP_KERNEL);
No really new in this patch, but why do you need the a6xx_gmu_bo,
and even more so, why does it need to be allocated dynamically?
Also please check for errors when setting the dma mask
Powered by blists - more mailing lists