drm/panfrost: Fix jobs that outlive their JM context
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 0 repliesNew
- v12 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- New patch 2, and new patch 4 for a related issue, both reported by Sashiko on v1.
- Patches 1 and 3: changelogs updated, as panfrost_jm_ctx_destroy() did not actually stop any job before patch 2.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | drm/panfrost: Hold a reference to the MMU context of a jobdrivers/ drivers/ | +2 | 0 replies | |
| 2/4 | drm/panfrost: Find the jobs of a destroyed JM context by their contextdrivers/ | +5 | 0 replies | |
| 3/4 | drm/panfrost: Stop a job queued after its JM context was destroyeddrivers/ | +44 | 0 replies | |
| 4/4 | drm/panfrost: Don't destroy uninitialized entities of a new JM contextdrivers/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/4] drm/panfrost: Fix jobs that outlive their JM context
These fix how jobs are handled when their JM context is destroyed, explicitly or because the file is closed, and the error path of JM context creation.
Patch 1 makes a job hold a reference to its MMU context. Patch 2 makes panfrost_jm_ctx_destroy() find the jobs of the context again: it looks them up by job->base.entity, which the scheduler clears when it pops a job. Patch 3 stops a job that is queued after its context was destroyed. Patch 4 keeps panfrost_jm_ctx_create() from destroying entities that it never initialized when it fails.
Changes in v2:
- New patch 2, and new patch 4 for a related issue, both reported by Sashiko on v1.
- Patches 1 and 3: changelogs updated, as panfrost_jm_ctx_destroy() did not actually stop any job before patch 2.
v1: https://lore.kernel.org/r/[email protected]
Jiwoo Kim (4):
drm/panfrost: Hold a reference to the MMU context of a job drm/panfrost: Find the jobs of a destroyed JM context by their context drm/panfrost: Stop a job queued after its JM context was destroyed drm/panfrost: Don't destroy uninitialized entities of a new JM context
drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +- drivers/gpu/drm/panfrost/panfrost_job.c | 91 +++++++++++++++++-------- 2 files changed, 62 insertions(+), 31 deletions(-)
base-commit: d48ea86919434695da12d280dccab72b094397e1
Signature · 1 line
2.43.0