From: Bjorn Andersson <bjorn.andersson@linaro.org> To: Rob Clark <robdclark@gmail.com> Cc: dri-devel@lists.freedesktop.org, iommu@lists.linux-foundation.org, Rob Clark <robdclark@chromium.org>, Douglas Anderson <dianders@chromium.org>, Akhil P Oommen <akhilpo@codeaurora.org>, Jonathan Marek <jonathan@marek.ca>, Eric Anholt <eric@anholt.net>, David Airlie <airlied@linux.ie>, linux-arm-msm@vger.kernel.org, Sharat Masetty <smasetty@codeaurora.org>, Konrad Dybcio <konrad.dybcio@somainline.org>, Sean Paul <sean@poorly.run>, Jordan Crouse <jcrouse@codeaurora.org>, "Kristian H. Kristensen" <hoegsberg@google.com>, Daniel Vetter <daniel@ffwll.ch>, AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>, Marijn Suijten <marijn.suijten@somainline.org>, freedreno@lists.freedesktop.org, open list <linux-kernel@vger.kernel.org> Subject: Re: [PATCH v5 3/5] drm/msm: Improve the a6xx page fault handler Date: Thu, 24 Jun 2021 22:39:22 -0500 [thread overview] Message-ID: <YNVP6rfQ699BejsI@yoga> (raw) In-Reply-To: <20210610214431.539029-4-robdclark@gmail.com> On Thu 10 Jun 16:44 CDT 2021, Rob Clark wrote: [..] > diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c > index 50d881794758..6975b95c3c29 100644 > --- a/drivers/gpu/drm/msm/msm_iommu.c > +++ b/drivers/gpu/drm/msm/msm_iommu.c > @@ -211,8 +211,17 @@ static int msm_fault_handler(struct iommu_domain *domain, struct device *dev, > unsigned long iova, int flags, void *arg) > { > struct msm_iommu *iommu = arg; > + struct adreno_smmu_priv *adreno_smmu = dev_get_drvdata(iommu->base.dev); > + struct adreno_smmu_fault_info info, *ptr = NULL; > + > + if (adreno_smmu->get_fault_info) { This seemed reasonable when I read it last time, but I didn't realize that the msm_fault_handler() is installed for all msm_iommu instances. So while we're trying to recover from the boot splash and setup the new framebuffer we end up here with iommu->base.dev being the mdss device. Naturally drvdata of mdss is not a struct adreno_smmu_priv. > + adreno_smmu->get_fault_info(adreno_smmu->cookie, &info); So here we just jump straight out into hyperspace, never to return. Not sure how to wire this up to avoid the problem, but right now I don't think we can boot any device with a boot splash. Regards, Bjorn > + ptr = &info; > + } > + > if (iommu->base.handler) > - return iommu->base.handler(iommu->base.arg, iova, flags); > + return iommu->base.handler(iommu->base.arg, iova, flags, ptr); > + > pr_warn_ratelimited("*** fault: iova=%16lx, flags=%d\n", iova, flags); > return 0; > }
next prev parent reply other threads:[~2021-06-25 3:39 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-10 21:44 [PATCH v5 0/5] iommu/arm-smmu: adreno-smmu page fault handling Rob Clark 2021-06-10 21:44 ` [PATCH v5 1/5] iommu/arm-smmu: Add support for driver IOMMU fault handlers Rob Clark 2021-06-14 17:26 ` Bjorn Andersson 2021-06-10 21:44 ` [PATCH v5 2/5] iommu/arm-smmu-qcom: Add an adreno-smmu-priv callback to get pagefault info Rob Clark 2021-06-14 17:30 ` Bjorn Andersson 2021-06-10 21:44 ` [PATCH v5 3/5] drm/msm: Improve the a6xx page fault handler Rob Clark 2021-06-14 17:46 ` Bjorn Andersson 2021-06-25 3:39 ` Bjorn Andersson [this message] 2021-06-25 15:42 ` Rob Clark 2021-06-10 21:44 ` [PATCH v5 4/5] iommu/arm-smmu-qcom: Add stall support Rob Clark 2021-06-11 13:49 ` Jordan Crouse 2021-06-14 17:54 ` Bjorn Andersson 2021-06-10 21:44 ` [PATCH v5 5/5] drm/msm: devcoredump iommu fault support Rob Clark 2021-06-11 13:49 ` Jordan Crouse 2021-07-04 12:53 ` [PATCH v5 0/5] iommu/arm-smmu: adreno-smmu page fault handling Dmitry Baryshkov 2021-07-04 18:20 ` Rob Clark 2021-07-06 21:36 ` Bjorn Andersson 2021-07-07 5:12 ` John Stultz 2021-07-07 17:38 ` Rob Clark 2021-07-06 14:27 [PATCH v5 3/5] drm/msm: Improve the a6xx page fault handler Yassine Oudjana
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=YNVP6rfQ699BejsI@yoga \ --to=bjorn.andersson@linaro.org \ --cc=airlied@linux.ie \ --cc=akhilpo@codeaurora.org \ --cc=angelogioacchino.delregno@somainline.org \ --cc=daniel@ffwll.ch \ --cc=dianders@chromium.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=eric@anholt.net \ --cc=freedreno@lists.freedesktop.org \ --cc=hoegsberg@google.com \ --cc=iommu@lists.linux-foundation.org \ --cc=jcrouse@codeaurora.org \ --cc=jonathan@marek.ca \ --cc=konrad.dybcio@somainline.org \ --cc=linux-arm-msm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=marijn.suijten@somainline.org \ --cc=robdclark@chromium.org \ --cc=robdclark@gmail.com \ --cc=sean@poorly.run \ --cc=smasetty@codeaurora.org \ --subject='Re: [PATCH v5 3/5] drm/msm: Improve the a6xx page fault handler' \ /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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).