linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antonino Maniscalco <antomani103@gmail.com>
To: Rob Clark <robdclark@gmail.com>
Cc: Kees Bakker <kees@ijzerbout.nl>, Sean Paul <sean@poorly.run>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org,
	Akhil P Oommen <quic_akhilpo@quicinc.com>,
	Neil Armstrong <neil.armstrong@linaro.org>
Subject: Re: [v8,09/12] drm/msm/a6xx: Add traces for preemption
Date: Wed, 16 Oct 2024 23:28:14 +0200	[thread overview]
Message-ID: <281503da-6ac3-496f-8051-d4e03979c1ef@gmail.com> (raw)
In-Reply-To: <CAF6AEGu0b5EXjvjDn1DTy2zCSDp7yFpGvGoAb3Kc91Y9HK+=pg@mail.gmail.com>

On 10/16/24 10:33 PM, Rob Clark wrote:
> On Wed, Oct 16, 2024 at 5:13 AM Antonino Maniscalco
> <antomani103@gmail.com> wrote:
>>
>> On 10/8/24 11:10 PM, Kees Bakker wrote:
>>> Op 03-10-2024 om 18:12 schreef Antonino Maniscalco:
>>>> Add trace points corresponding to preemption being triggered and being
>>>> completed for latency measurement purposes.
>>>>
>>>> Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
>>>> Tested-by: Rob Clark <robdclark@gmail.com>
>>>> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD
>>>> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
>>>> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8450-HDK
>>>> Signed-off-by: Antonino Maniscalco <antomani103@gmail.com>
>>>> ---
>>>>    drivers/gpu/drm/msm/adreno/a6xx_preempt.c |  6 ++++++
>>>>    drivers/gpu/drm/msm/msm_gpu_trace.h       | 28 +++++++++++++++++++++
>>>> +++++++
>>>>    2 files changed, 34 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_preempt.c b/drivers/gpu/
>>>> drm/msm/adreno/a6xx_preempt.c
>>>> index
>>>> 21e333cb6342d33425eb96f97bcc853e9b041b36..6803d5af60cc8fb0f2a52ee160ffdbf0e8ef0209 100644
>>>> --- a/drivers/gpu/drm/msm/adreno/a6xx_preempt.c
>>>> +++ b/drivers/gpu/drm/msm/adreno/a6xx_preempt.c
>>>> @@ -7,6 +7,7 @@
>>>>    #include "a6xx_gpu.h"
>>>>    #include "a6xx_gmu.xml.h"
>>>>    #include "msm_mmu.h"
>>>> +#include "msm_gpu_trace.h"
>>>>    /*
>>>>     * Try to transition the preemption state from old to new. Return
>>>> @@ -174,6 +175,8 @@ void a6xx_preempt_irq(struct msm_gpu *gpu)
>>>>        set_preempt_state(a6xx_gpu, PREEMPT_NONE);
>>>> +    trace_msm_gpu_preemption_irq(a6xx_gpu->cur_ring->id);
>>>> +
>>>>        /*
>>>>         * Retrigger preemption to avoid a deadlock that might occur
>>>> when preemption
>>>>         * is skipped due to it being already in flight when requested.
>>>> @@ -294,6 +297,9 @@ void a6xx_preempt_trigger(struct msm_gpu *gpu)
>>>>         */
>>>>        ring->restore_wptr = false;
>>>> +    trace_msm_gpu_preemption_trigger(a6xx_gpu->cur_ring->id,
>>>> +        ring ? ring->id : -1);
>>>> +
>>> There is no need for the ternary operator. "ring" should be non-NULL,
>>> otherwise the code would have already crashed.
>>> So the change can just be
>>>       trace_msm_gpu_preemption_trigger(a6xx_gpu->cur_ring->id, ring->id);
>>
>> You are right, we had a similar cleanup but I missed this particular
>> one, thanks for pointing me at it! I apologize for the late response but
>> I've been at XDC and therefore unable to look at my email. I will point
>> this out to Rob since this series is in msm-next to see if I need to
>> send a separate patch to clean this.
> 
> Yes, please send a new commit, I don't want to re-write history on msm-next

Makes sense.
I noticed somebody else has already sent the patch for it 
https://lore.kernel.org/linux-arm-msm/20241011052315.4713-1-everestkc@everestkc.com.np/

> 
> BR,
> -R
> 
>> Best regards,
>> --
>> Antonino Maniscalco <antomani103@gmail.com>


Best regards,
-- 
Antonino Maniscalco <antomani103@gmail.com>

  reply	other threads:[~2024-10-16 21:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-03 16:12 [PATCH v8 00/12] Preemption support for A7XX Antonino Maniscalco
2024-10-03 16:12 ` [PATCH v8 01/12] drm/msm: Fix bv_fence being used as bv_rptr Antonino Maniscalco
2024-10-03 16:12 ` [PATCH v8 02/12] drm/msm/a6xx: Track current_ctx_seqno per ring Antonino Maniscalco
2024-10-03 16:12 ` [PATCH v8 03/12] drm/msm: Add a `preempt_record_size` field Antonino Maniscalco
2024-10-03 16:12 ` [PATCH v8 04/12] drm/msm: Add CONTEXT_SWITCH_CNTL bitfields Antonino Maniscalco
2024-10-03 16:12 ` [PATCH v8 05/12] drm/msm/a6xx: Add a pwrup_list field to a6xx_info Antonino Maniscalco
2024-10-03 16:12 ` [PATCH v8 06/12] drm/msm/a6xx: Implement preemption for a7xx targets Antonino Maniscalco
2024-10-03 16:12 ` [PATCH v8 07/12] drm/msm/a6xx: Sync relevant adreno_pm4.xml changes Antonino Maniscalco
2024-10-03 16:12 ` [PATCH v8 08/12] drm/msm/a6xx: Use posamble to reset counters on preemption Antonino Maniscalco
2024-10-03 16:12 ` [PATCH v8 09/12] drm/msm/a6xx: Add traces for preemption Antonino Maniscalco
2024-10-08 21:10   ` [v8,09/12] " Kees Bakker
2024-10-16 12:13     ` Antonino Maniscalco
2024-10-16 20:33       ` Rob Clark
2024-10-16 21:28         ` Antonino Maniscalco [this message]
2024-10-03 16:12 ` [PATCH v8 10/12] drm/msm/a6xx: Add a flag to allow preemption to submitqueue_create Antonino Maniscalco
2024-10-03 16:13 ` [PATCH v8 11/12] drm/msm/a6xx: Enable preemption for tested a7xx targets Antonino Maniscalco
2024-10-03 16:13 ` [PATCH v8 12/12] Documentation: document adreno preemption Antonino Maniscalco

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=281503da-6ac3-496f-8051-d4e03979c1ef@gmail.com \
    --to=antomani103@gmail.com \
    --cc=airlied@gmail.com \
    --cc=corbet@lwn.net \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=kees@ijzerbout.nl \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_akhilpo@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=tzimmermann@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).