mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: Steev Klimaszewski <steev@kali.org>,
	<linux-arm-msm@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>,
	<freedreno@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] drm/msm/dpu: capture snapshot on the first commit_done timeout
Date: Sun, 25 Feb 2024 17:35:56 -0800	[thread overview]
Message-ID: <3dd62c7e-e419-9ea2-b383-4c1c0959fecf@quicinc.com> (raw)
In-Reply-To: <33e38ac8-f41e-ca66-0b75-e72990691a80@quicinc.com>



On 2/25/2024 11:57 AM, Abhinav Kumar wrote:
> 
> 
> On 2/25/2024 6:12 AM, Dmitry Baryshkov wrote:
>> In order to debug commit_done timeouts, capture the devcoredump state
>> when the first timeout occurs after the encoder has been enabled.
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
> 
> This looks fine now. Once we discuss patch 2, I can ack this.
> 

Not entirely onboard with patch 2, but lets see how that code evolves

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c 
>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> index 30f349c8a1e5..3cae07bf0b9b 100644
>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> @@ -126,6 +126,8 @@ enum dpu_enc_rc_states {
>>    * @base:        drm_encoder base class for registration with DRM
>>    * @enc_spinlock:    Virtual-Encoder-Wide Spin Lock for IRQ purposes
>>    * @enabled:        True if the encoder is active, protected by 
>> enc_lock
>> + * @commit_done_timedout: True if there has been a timeout on commit 
>> after
>> + *            enabling the encoder.
>>    * @num_phys_encs:    Actual number of physical encoders contained.
>>    * @phys_encs:        Container of physical encoders managed.
>>    * @cur_master:        Pointer to the current master in this mode. 
>> Optimization
>> @@ -172,6 +174,7 @@ struct dpu_encoder_virt {
>>       spinlock_t enc_spinlock;
>>       bool enabled;
>> +    bool commit_done_timedout;
>>       unsigned int num_phys_encs;
>>       struct dpu_encoder_phys *phys_encs[MAX_PHYS_ENCODERS_PER_VIRTUAL];
>> @@ -1226,6 +1229,8 @@ static void 
>> dpu_encoder_virt_atomic_enable(struct drm_encoder *drm_enc,
>>       else if (disp_info->intf_type == INTF_DSI)
>>           dpu_enc->wide_bus_en = 
>> msm_dsi_wide_bus_enabled(priv->dsi[index]);
>> +    dpu_enc->commit_done_timedout = false;
>> +
>>       mutex_lock(&dpu_enc->enc_lock);
>>       cur_mode = &dpu_enc->base.crtc->state->adjusted_mode;
>> @@ -2436,6 +2441,10 @@ int dpu_encoder_wait_for_commit_done(struct 
>> drm_encoder *drm_enc)
>>               DPU_ATRACE_BEGIN("wait_for_commit_done");
>>               ret = phys->ops.wait_for_commit_done(phys);
>>               DPU_ATRACE_END("wait_for_commit_done");
>> +            if (ret == -ETIMEDOUT && !dpu_enc->commit_done_timedout) {
>> +                dpu_enc->commit_done_timedout = true;
>> +                msm_disp_snapshot_state(drm_enc->dev);
>> +            }
>>               if (ret)
>>                   return ret;
>>           }
>>

      reply	other threads:[~2024-02-26  1:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-25 14:12 [PATCH v3 0/3] drm/msm/dpu: debug commit_done timeouts Dmitry Baryshkov
2024-02-25 14:12 ` [PATCH v3 1/3] drm/msm/dpu: make "vblank timeout" more useful Dmitry Baryshkov
2024-02-25 19:43   ` Abhinav Kumar
2024-02-25 20:57     ` Dmitry Baryshkov
2024-02-25 21:03       ` Abhinav Kumar
2024-02-25 14:12 ` [PATCH v3 2/3] drm/msm/dpu: split dpu_encoder_wait_for_event into two functions Dmitry Baryshkov
2024-02-25 19:49   ` Abhinav Kumar
2024-02-25 20:52     ` Dmitry Baryshkov
2024-02-26  1:33       ` Abhinav Kumar
2024-02-25 14:12 ` [PATCH v3 3/3] drm/msm/dpu: capture snapshot on the first commit_done timeout Dmitry Baryshkov
2024-02-25 19:57   ` Abhinav Kumar
2024-02-26  1:35     ` Abhinav Kumar [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=3dd62c7e-e419-9ea2-b383-4c1c0959fecf@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --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=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=steev@kali.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®