Skip to content

drm/panfrost: Add heap and no execute buffer allocation

Rob Herring dri-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 6 repliesIn review
  2. v38 patches 7 repliesSuperseded
  3. v27 patches 24 repliesSuperseded

Changes in v4 from the cover letter

- Move GPU VA mapping/unmapping to GEM open/close
- Add rework of reset handling.
- Rebased on top of madvise support

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9drm/gem: Allow sparsely populated page arrays in drm_gem_put_pagesdrivers/gpu/drm/drm_gem.c+3 -00 replies
2/9drm/shmem: Put pages independent of a SG table being setdrivers/gpu/drm/drm_gem_shmem_helper.c+2 -21 reply
3/9drm/panfrost: Restructure the GEM object creationdrivers/gpu/drm/panfrost/panfrost_drv.c drivers/gpu/drm/panfrost/panfrost_gem.c+37 -392 replies
4/9drm/panfrost: Split panfrost_mmu_map SG list mapping to its own functiondrivers/gpu/drm/panfrost/panfrost_mmu.c+31 -210 replies
5/9drm/panfrost: Add a no execute flag for BO allocationsdrivers/gpu/drm/panfrost/panfrost_drv.c drivers/gpu/drm/panfrost/panfrost_gem.c drivers/gpu/drm/panfrost/panfrost_gem.h +2 more+96 -100 replies
6/9drm/panfrost: Consolidate reset handlingdrivers/gpu/drm/panfrost/panfrost_device.c drivers/gpu/drm/panfrost/panfrost_device.h drivers/gpu/drm/panfrost/panfrost_job.c +2 more+22 -212 replies
7/9drm/panfrost: Convert MMU IRQ handler to threaded handlerdrivers/gpu/drm/panfrost/panfrost_mmu.c+15 -50 replies
8/9drm/panfrost: Add support for GPU heap allocationsdrivers/gpu/drm/panfrost/TODO drivers/gpu/drm/panfrost/panfrost_drv.c drivers/gpu/drm/panfrost/panfrost_gem.c +3 more+177 -171 reply
9/9drm/panfrost: Bump driver version to 1.1drivers/gpu/drm/panfrost/panfrost_drv.c+6 -10 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchSteven PriceAlyssa RosenzweigEric Anholt
1/9R-b A-b
2/9R-b A-b R-b
3/9R-b A-b
4/9A-b
5/9R-b A-b
6/9R-b
7/9R-b A-b
8/9R-b A-b
9/9A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/9] drm/panfrost: Add heap and no execute buffer allocation

This series adds new BO allocation flags PANFROST_BO_HEAP and PANFROST_BO_NOEXEC. The heap allocations are paged in on GPU page faults.

Hopefully, this is the last version, but I made a few changes after implementing per FD address spaces on top of this. Primarily, I moved the GPU VA mapping into GEM open/close functions. This is a bit cleaner and will work when we need access to per FD objects.

I also found a problem with how the GPU reset is handled with the MMU. With the move to a threaded irq handler, it's not okay to unmask the MMU at any time as was possible with panfrost_mmu_enable() calls. The result was some consolidation of the reset calls.

Tomeu, I don't think there should be any changes in test results, but I didn't add your tested-by as there are a few too many changes that I felt comfortable with. I did test this with your series.

This is based on drm-misc-next. An updated branch is here[1].

v4:
- Move GPU VA mapping/unmapping to GEM open/close
- Add rework of reset handling.
- Rebased on top of madvise support

v3:
- Retain shared irq support, splitting IRQ changes to separate patch (6/8)
- Stop leaking SG tables
- Prevent mmap and pinning pages for heap BOs

Rob

[1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git panfrost/heap-noexec

Rob Herring (9):
drm/gem: Allow sparsely populated page arrays in drm_gem_put_pages drm/shmem: Put pages independent of a SG table being set drm/panfrost: Restructure the GEM object creation drm/panfrost: Split panfrost_mmu_map SG list mapping to its own
function
drm/panfrost: Add a no execute flag for BO allocations drm/panfrost: Consolidate reset handling
drm/panfrost: Convert MMU IRQ handler to threaded handler drm/panfrost: Add support for GPU heap allocations drm/panfrost: Bump driver version to 1.1

 drivers/gpu/drm/drm_gem.c                  |   3 +
 drivers/gpu/drm/drm_gem_shmem_helper.c     |   4 +-
 drivers/gpu/drm/panfrost/TODO              |   2 -
 drivers/gpu/drm/panfrost/panfrost_device.c |  16 +-
 drivers/gpu/drm/panfrost/panfrost_device.h |   1 +
 drivers/gpu/drm/panfrost/panfrost_drv.c    |  65 +++++--
 drivers/gpu/drm/panfrost/panfrost_gem.c    | 138 ++++++++++---
 drivers/gpu/drm/panfrost/panfrost_gem.h    |  17 +-
 drivers/gpu/drm/panfrost/panfrost_job.c    |   7 +-
 drivers/gpu/drm/panfrost/panfrost_mmu.c    | 216 +++++++++++++++++----
 drivers/gpu/drm/panfrost/panfrost_mmu.h    |   3 +-
 include/uapi/drm/panfrost_drm.h            |   3 +
 12 files changed, 374 insertions(+), 101 deletions(-)

--
2.20.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel