From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Stephen Boyd <swboyd@chromium.org>,
Daniel Vetter <daniel@ffwll.ch>,
"David Airlie" <airlied@gmail.com>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Marijn Suijten <marijn.suijten@somainline.org>,
Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
<freedreno@lists.freedesktop.org>
Cc: <dri-devel@lists.freedesktop.org>, <seanpaul@chromium.org>,
<dianders@chromium.org>, <quic_jesszhan@quicinc.com>,
<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 1/4] drm/msm: register a fault handler for display mmu faults
Date: Fri, 21 Jun 2024 18:54:19 -0700 [thread overview]
Message-ID: <1b4d1aaa-ae5f-a6ed-d6b3-e922e84c3d84@quicinc.com> (raw)
In-Reply-To: <CAE-0n517DSbNim+K3=N2J2R0iZn44MS3siLKkhdLq05GTfaHtQ@mail.gmail.com>
On 5/20/2024 9:12 PM, Stephen Boyd wrote:
> Quoting Abhinav Kumar (2024-05-17 16:37:56)
>> diff --git a/drivers/gpu/drm/msm/msm_kms.c b/drivers/gpu/drm/msm/msm_kms.c
>> index af6a6fcb1173..62c8e6163e81 100644
>> --- a/drivers/gpu/drm/msm/msm_kms.c
>> +++ b/drivers/gpu/drm/msm/msm_kms.c
>> @@ -200,6 +200,28 @@ struct msm_gem_address_space *msm_kms_init_aspace(struct drm_device *dev)
>> return aspace;
>> }
>>
>> +static int msm_kms_fault_handler(void *arg, unsigned long iova, int flags, void *data)
>> +{
>> + struct msm_kms *kms = arg;
>> + struct msm_disp_state *state;
>> + int ret;
>> +
>> + ret = mutex_lock_interruptible(&kms->dump_mutex);
>
> From past experience I've seen the smmu fault handler called in hardirq
> context, so it can't sleep. Is there some way to grab the register
> contents without sleeping? Otherwise this will have to fork off
> somewhere else that can take locks, runtime PM resume, etc.
>
Sorry for the delay in this series.
Yes, this is a valid point.
Let me see move to msm_disp_snapshot_state() as that one will spawn a
kthread then dump the registers.
>> + if (ret)
>> + return ret;
>> +
>> + state = msm_disp_snapshot_state_sync(kms);
>> +
>> + mutex_unlock(&kms->dump_mutex);
>> +
next prev parent reply other threads:[~2024-06-22 1:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240517233801.4071868-1-quic_abhinavk@quicinc.com>
2024-05-17 23:37 ` Abhinav Kumar
2024-05-19 8:31 ` Dmitry Baryshkov
2024-06-21 23:31 ` Abhinav Kumar
2024-05-19 8:38 ` Dmitry Baryshkov
2024-06-21 23:35 ` Abhinav Kumar
2024-06-22 2:05 ` Abhinav Kumar
2024-05-21 4:12 ` Stephen Boyd
2024-06-22 1:54 ` Abhinav Kumar [this message]
2024-05-17 23:37 ` [RFC PATCH 2/4] drm/msm/iommu: rename msm_fault_handler to msm_gpu_fault_handler Abhinav Kumar
2024-05-19 8:32 ` Dmitry Baryshkov
2024-05-17 23:37 ` [RFC PATCH 3/4] drm/msm/iommu: introduce msm_iommu_disp_new() for msm_kms Abhinav Kumar
2024-05-19 8:38 ` Dmitry Baryshkov
2024-05-17 23:37 ` [RFC PATCH 4/4] drm/msm: switch msm_kms to use msm_iommu_disp_new() Abhinav Kumar
2024-05-19 8:39 ` Dmitry Baryshkov
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=1b4d1aaa-ae5f-a6ed-d6b3-e922e84c3d84@quicinc.com \
--to=quic_abhinavk@quicinc.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_jesszhan@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=seanpaul@chromium.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
all inboxes | Powered by JetHome®