From: Christoph Hellwig <hch@infradead.org>
To: Jordan Crouse <jcrouse@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org, smasetty@codeaurora.org,
John Stultz <john.stultz@linaro.org>, Sean Paul <sean@poorly.run>,
Stephen Boyd <swboyd@chromium.org>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Douglas Anderson <dianders@chromium.org>,
Rob Clark <robdclark@gmail.com>, David Airlie <airlied@linux.ie>,
"Michael J. Ruhl" <michael.j.ruhl@intel.com>,
freedreno@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH v5 2/2] drm/msm/a6xx: Use the DMA API for GMU memory objects
Date: Tue, 17 Mar 2020 06:20:31 -0700 [thread overview]
Message-ID: <20200317132031.GA8125@infradead.org> (raw)
In-Reply-To: <1583767066-1555-3-git-send-email-jcrouse@codeaurora.org>
> @@ -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
prev parent reply other threads:[~2020-03-17 13:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 15:17 [PATCH v5 0/2] msm/gpu/a6xx: use the DMA-API for GMU memory allocations Jordan Crouse
2020-03-09 15:17 ` [PATCH v5 1/2] dt-bindings: display: msm: Convert GMU bindings to YAML Jordan Crouse
2020-03-09 15:17 ` [PATCH v5 2/2] drm/msm/a6xx: Use the DMA API for GMU memory objects Jordan Crouse
2020-03-17 13:20 ` Christoph Hellwig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200317132031.GA8125@infradead.org \
--to=hch@infradead.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jcrouse@codeaurora.org \
--cc=john.stultz@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.j.ruhl@intel.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=smasetty@codeaurora.org \
--cc=swboyd@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox