From: Antonino Maniscalco <antomani103@gmail.com>
To: Rob Clark <robdclark@gmail.com>, 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>
Cc: 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,
Antonino Maniscalco <antomani103@gmail.com>,
Akhil P Oommen <quic_akhilpo@quicinc.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Sharat Masetty <smasetty@codeaurora.org>
Subject: [PATCH v3 00/10] Preemption support for A7XX
Date: Thu, 05 Sep 2024 16:51:18 +0200 [thread overview]
Message-ID: <20240905-preemption-a750-t-v3-0-fd947699f7bc@gmail.com> (raw)
This series implements preemption for A7XX targets, which allows the GPU to
switch to an higher priority ring when work is pushed to it, reducing latency
for high priority submissions.
This series enables L1 preemption with skip_save_restore which requires
the following userspace patches to function:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544
A flag is added to `msm_submitqueue_create` to only allow submissions
from compatible userspace to be preempted, therefore maintaining
compatibility.
Preemption is currently only enabled by default on A750, it can be
enabled on other targets through the `enable_preemption` module
parameter. This is because more testing is required on other targets.
For testing on other HW it is sufficient to set that parameter to a
value of 1, then using the branch of mesa linked above, `TU_DEBUG=hiprio`
allows to run any application as high priority therefore preempting
submissions from other applications.
The `msm_gpu_preemption_trigger` and `msm_gpu_preemption_irq` traces
added in this series can be used to observe preemption's behavior as
well as measuring preemption latency.
Some commits from this series are based on a previous series to enable
preemption on A6XX targets:
https://lkml.kernel.org/1520489185-21828-1-git-send-email-smasetty@codeaurora.org
Signed-off-by: Antonino Maniscalco <antomani103@gmail.com>
---
Changes in v3:
- Added documentation about preemption
- Use quirks to determine which target supports preemption
- Add a module parameter to force disabling or enabling preemption
- Clear postamble when profiling
- Define A6XX_CP_CONTEXT_SWITCH_CNTL_LEVEL fields in a6xx.xml
- Make preemption records MAP_PRIV
- Removed user ctx record (NON_PRIV) and patch 2/9 as it's not needed
anymore
- Link to v2: https://lore.kernel.org/r/20240830-preemption-a750-t-v2-0-86aeead2cd80@gmail.com
Changes in v2:
- Added preept_record_size for X185 in PATCH 3/7
- Added patches to reset perf counters
- Dropped unused defines
- Dropped unused variable (fixes warning)
- Only enable preemption on a750
- Reject MSM_SUBMITQUEUE_ALLOW_PREEMPT for unsupported targets
- Added Akhil's Reviewed-By tags to patches 1/9,2/9,3/9
- Added Neil's Tested-By tags
- Added explanation for UAPI changes in commit message
- Link to v1: https://lore.kernel.org/r/20240815-preemption-a750-t-v1-0-7bda26c34037@gmail.com
---
Antonino Maniscalco (10):
drm/msm: Fix bv_fence being used as bv_rptr
drm/msm: Add a `preempt_record_size` field
drm/msm: Add CONTEXT_SWITCH_CNTL bitfields
drm/msm/A6xx: Implement preemption for A7XX targets
drm/msm/A6xx: Sync relevant adreno_pm4.xml changes
drm/msm/A6xx: Use posamble to reset counters on preemption
drm/msm/A6xx: Add traces for preemption
drm/msm/A6XX: Add a flag to allow preemption to submitqueue_create
drm/msm/A6xx: Enable preemption for A750
Documentation: document adreno preemption
Documentation/gpu/msm-preemption.rst | 98 +++++
drivers/gpu/drm/msm/Makefile | 1 +
drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 7 +-
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 331 +++++++++++++++-
drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 166 ++++++++
drivers/gpu/drm/msm/adreno/a6xx_preempt.c | 430 +++++++++++++++++++++
drivers/gpu/drm/msm/adreno/adreno_gpu.h | 9 +-
drivers/gpu/drm/msm/msm_drv.c | 4 +
drivers/gpu/drm/msm/msm_gpu_trace.h | 28 ++
drivers/gpu/drm/msm/msm_ringbuffer.h | 8 +
drivers/gpu/drm/msm/msm_submitqueue.c | 3 +
drivers/gpu/drm/msm/registers/adreno/a6xx.xml | 7 +-
.../gpu/drm/msm/registers/adreno/adreno_pm4.xml | 39 +-
include/uapi/drm/msm_drm.h | 5 +-
14 files changed, 1094 insertions(+), 42 deletions(-)
---
base-commit: 7c626ce4bae1ac14f60076d00eafe71af30450ba
change-id: 20240815-preemption-a750-t-fcee9a844b39
Best regards,
--
Antonino Maniscalco <antomani103@gmail.com>
next reply other threads:[~2024-09-05 14:51 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 14:51 Antonino Maniscalco [this message]
2024-09-05 14:51 ` [PATCH v3 01/10] drm/msm: Fix bv_fence being used as bv_rptr Antonino Maniscalco
2024-09-05 14:51 ` [PATCH v3 02/10] drm/msm: Add a `preempt_record_size` field Antonino Maniscalco
2024-09-05 14:51 ` [PATCH v3 03/10] drm/msm: Add CONTEXT_SWITCH_CNTL bitfields Antonino Maniscalco
2024-09-05 14:51 ` [PATCH v3 04/10] drm/msm/A6xx: Implement preemption for A7XX targets Antonino Maniscalco
2024-09-06 19:54 ` Akhil P Oommen
2024-09-09 12:22 ` Connor Abbott
2024-09-10 16:43 ` Akhil P Oommen
2024-09-12 15:48 ` Antonino Maniscalco
2024-09-16 17:40 ` Akhil P Oommen
2024-09-09 13:15 ` Antonino Maniscalco
2024-09-09 13:42 ` Connor Abbott
2024-09-09 14:40 ` Rob Clark
2024-09-10 16:49 ` Akhil P Oommen
2024-09-09 17:24 ` Antonino Maniscalco
2024-09-05 14:51 ` [PATCH v3 05/10] drm/msm/A6xx: Sync relevant adreno_pm4.xml changes Antonino Maniscalco
2024-09-05 14:51 ` [PATCH v3 06/10] drm/msm/A6xx: Use posamble to reset counters on preemption Antonino Maniscalco
2024-09-06 20:08 ` Akhil P Oommen
2024-09-09 15:07 ` Antonino Maniscalco
2024-09-10 21:34 ` Akhil P Oommen
2024-09-10 22:35 ` Antonino Maniscalco
2024-09-12 7:12 ` Akhil P Oommen
2024-09-12 11:15 ` Antonino Maniscalco
2024-09-05 14:51 ` [PATCH v3 07/10] drm/msm/A6xx: Add traces for preemption Antonino Maniscalco
2024-09-06 20:11 ` Akhil P Oommen
2024-09-09 15:08 ` Antonino Maniscalco
2024-09-05 14:51 ` [PATCH v3 08/10] drm/msm/A6XX: Add a flag to allow preemption to submitqueue_create Antonino Maniscalco
2024-09-05 14:51 ` [PATCH v3 09/10] drm/msm/A6xx: Enable preemption for A750 Antonino Maniscalco
2024-09-05 14:51 ` [PATCH v3 10/10] Documentation: document adreno preemption Antonino Maniscalco
2024-09-06 19:58 ` [PATCH v3 00/10] Preemption support for A7XX Akhil P Oommen
2024-09-09 15:36 ` Rob Clark
2024-09-12 13:49 ` 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=20240905-preemption-a750-t-v3-0-fd947699f7bc@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=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=smasetty@codeaurora.org \
--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
all inboxes | Powered by JetHome®