: Add GPU work period support for Xe driver
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest8 patches 4 repliesIn review
- v4 posting 2/29 patches 6 repliesSuperseded
- v4 posting 1/28 patches 0 repliesSuperseded
Earlier versions · 5
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 8 patches | 0 replies | Superseded | |
| v2 posting 3/3 | 9 patches | 4 replies | Superseded | |
| v2 posting 2/3 | 0 of 9 patches | 0 replies | Superseded | |
| v2 posting 1/3 | 8 patches | 7 replies | Superseded | |
| v1 | 1 patch | 2 replies | Superseded |
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | drm/xe: Add a new xe_user structuredrivers/ drivers/ drivers/ | +169 | 0 replies | |
| 2/8 | drm/xe: Add xe_gt_clock_interval_to_ns functiondrivers/ drivers/ | +15 | 0 replies | |
| 3/8 | drm/xe: Modify xe_exec_queue_update_run_ticksdrivers/ drivers/ | +10 | 0 replies | |
| 4/8 | drm/xe: Handle xe_user creation and removaldrivers/ drivers/ drivers/ +1 more | +123 | 2 replies | |
| 5/8 | drm/xe: Implement xe_work_period_workerdrivers/ drivers/ drivers/ +1 more | +150 | 2 replies | |
| 6/8 | drm/xe: Add a Kconfig option for GPU work perioddrivers/ drivers/ drivers/ +1 more | +30 | 0 replies | |
| 7/8 | drm/xe: Handle xe_work_period destructiondrivers/ drivers/ drivers/ | +15 | 0 replies | |
| 8/8 | Hack patch: Do not mergedrivers/ drivers/ drivers/ +1 more | +73 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH v5 0/8] [ANDROID]: Add GPU work period support for Xe driver
This patch series implements the Android VSR requirement GPU work period event for the Intel Xe driver.
|GpuWorkPeriodEvent| defines a non-overlapping, non-zero period of time from |start_time_ns| (inclusive) until |end_time_ns| (exclusive) for a given |uid|, and includes details of how much work the GPU was performing for |uid| during the period. When GPU work for a given |uid| runs on the GPU, the driver must track
one or more periods that cover the time where the work was running, and emit events soon after.
Full requirement is defined in the following file:
https://cs.android.com/android/platform/superproject/main/+\
main:frameworks/native/services/gpuservice/gpuwork/bpfprogs/gpuWork.c;l=35
The requirement is implemented using a delayed worker thread per user id instance to accumulate its runtime on the gpu and emit the event. Each user id instance is tracked using an xe_user structure and the runtime is updated every time the kworker is executed for this uid. The delay period is hardcoded to 500 msecs.
The runtime on the gpu is collected for each xe file individually inside the function xe_exec_queue_update_run_ticks and accumulated into the corresponding xe_user active_duration_ns field. The HW Context timestamp field in the GTT is used to derive the runtime in clock ticks and then converted into nanosecs before updating the active duration.
Aakash Deep Sarkar (8):
drm/xe: Add a new xe_user structure drm/xe: Add xe_gt_clock_interval_to_ns function drm/xe: Modify xe_exec_queue_update_run_ticks drm/xe: Handle xe_user creation and removal drm/xe: Implement xe_work_period_worker drm/xe: Add a Kconfig option for GPU work period drm/xe: Handle xe_work_period destruction Hack patch: Do not merge
drivers/gpu/drm/xe/Makefile | 2 + drivers/gpu/drm/xe/xe_device.c | 23 +++ drivers/gpu/drm/xe/xe_device_types.h | 19 ++ drivers/gpu/drm/xe/xe_exec_queue.c | 8 + drivers/gpu/drm/xe/xe_gt_clock.c | 14 ++ drivers/gpu/drm/xe/xe_gt_clock.h | 1 + drivers/gpu/drm/xe/xe_pm.c | 5 + drivers/gpu/drm/xe/xe_user.c | 288 +++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_user.h | 131 ++++++++++++ 9 files changed, 491 insertions(+) create mode 100644 drivers/gpu/drm/xe/xe_user.c create mode 100644 drivers/gpu/drm/xe/xe_user.h
Signature · 1 line
2.49.0