From: Akhil P Oommen <quic_akhilpo@quicinc.com>
To: Rob Clark <robdclark@gmail.com>,
Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Sean Paul <sean@poorly.run>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
Simona Vetter <simona@ffwll.ch>, <linux-arm-msm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
<freedreno@lists.freedesktop.org>
Subject: Re: [PATCH v2 2/2] drm/msm/adreno: Setup SMMU aparture for per-process page table
Date: Wed, 13 Nov 2024 02:45:16 +0530 [thread overview]
Message-ID: <5a959c08-cc90-4a05-88b2-e1ee666561e2@quicinc.com> (raw)
In-Reply-To: <CAF6AEGvD95RyUXDBjgmoefgO6QyeRw3tpa7EG1MLFKdxcoZ-4g@mail.gmail.com>
On 11/11/2024 8:38 PM, Rob Clark wrote:
> On Sun, Nov 10, 2024 at 9:31 AM Bjorn Andersson
> <bjorn.andersson@oss.qualcomm.com> wrote:
>>
>> Support for per-process page tables requires the SMMU aparture to be
>> setup such that the GPU can make updates with the SMMU. On some targets
>> this is done statically in firmware, on others it's expected to be
>> requested in runtime by the driver, through a SCM call.
>>
>> One place where configuration is expected to be done dynamically is the
>> QCS6490 rb3gen2.
>>
>> The downstream driver does this unconditioanlly on any A6xx and newer,
>
> nit, s/unconditioanlly/unconditionally/
>
>> so follow suite and make the call.
>>
>> Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
>
> Reviewed-by: Rob Clark <robdclark@gmail.com>
>
>
>> ---
>> drivers/gpu/drm/msm/adreno/adreno_gpu.c | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
>> index 076be0473eb5..75f5367e73ca 100644
>> --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
>> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
>> @@ -572,8 +572,19 @@ struct drm_gem_object *adreno_fw_create_bo(struct msm_gpu *gpu,
>>
>> int adreno_hw_init(struct msm_gpu *gpu)
>> {
SCM calls into TZ can block for a very long time (seconds). It depends
on concurrent activities from other drivers like crypto for eg:. So we
should not do this in the gpu wake up path.
Practically, gpu probe is the better place to do this.
-Akhil
>> + struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
>> + int ret;
>> +
>> VERB("%s", gpu->name);
>>
>> + if (adreno_gpu->info->family >= ADRENO_6XX_GEN1 &&
>> + qcom_scm_set_gpu_smmu_aperture_is_available()) {
>> + /* We currently always use context bank 0, so hard code this */
>> + ret = qcom_scm_set_gpu_smmu_aperture(0);
>> + if (ret)
>> + DRM_DEV_ERROR(gpu->dev->dev, "unable to set SMMU aperture: %d\n", ret);
>> + }
>> +
>> for (int i = 0; i < gpu->nr_rings; i++) {
>> struct msm_ringbuffer *ring = gpu->rb[i];
>>
>>
>> --
>> 2.45.2
>>
next prev parent reply other threads:[~2024-11-12 21:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-10 17:33 [PATCH v2 0/2] drm/msm/adreno: Setup SMMU aparture Bjorn Andersson
2024-11-10 17:33 ` [PATCH v2 1/2] firmware: qcom: scm: Introduce CP_SMMU_APERTURE_ID Bjorn Andersson
2024-11-11 15:07 ` Rob Clark
2024-11-10 17:33 ` [PATCH v2 2/2] drm/msm/adreno: Setup SMMU aparture for per-process page table Bjorn Andersson
2024-11-11 15:08 ` Rob Clark
2024-11-12 21:15 ` Akhil P Oommen [this message]
2024-11-14 15:27 ` Konrad Dybcio
2024-11-14 18:02 ` Akhil P Oommen
2024-11-19 16:31 ` Bjorn Andersson
2024-11-11 18:08 ` [PATCH v2 0/2] drm/msm/adreno: Setup SMMU aparture Bjorn Andersson
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=5a959c08-cc90-4a05-88b2-e1ee666561e2@quicinc.com \
--to=quic_akhilpo@quicinc.com \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=bjorn.andersson@oss.qualcomm.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_jesszhan@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/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
all inboxes | Powered by JetHome®