drm/msm: Protect the RPTR shadow
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | drm/msm: Split the a5xx preemption recorddrivers/ drivers/ | +21 | 2 replies | |
| 2/4 | drm/msm: Enable expanded apriv support for a650drivers/ drivers/ drivers/ +1 more | +19 | 0 replies | |
| 3/4 | drm/msm: Disable preemption on all 5xx targetsdrivers/ | +2 | 0 replies | |
| 4/4 | drm/msm: Disable the RPTR shadowdrivers/ drivers/ drivers/ +3 more | +43 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] drm/msm: Protect the RPTR shadow
On Adreno GPUs there is an option to shadow the RPTR register in GPU accessible memory. The shadow memory allows the kernel driver to query the value of the RPTR for each ringbuffer even if it is preempted out or if the GPU is turned off during aggressive power management.
There are risks to using the RPTR shadow. If it is in GPU accessible memory it could be read or written by any GPU operation. All versions of the GPU hardware except A650 requires the shadow to be in unprivileged memory which opens it to risk.
This series does two things. First, it marks as many buffers as possible as privileged. For a5xx these are some preemption buffers and on a650 this includes all global buffers (such as the ringbuffer and memstore). I've sent these patches before but they tie in well with this series so I've included them.
Then we disable the RPTR shadow across all targets. For all targets except for a5xx the RPTR shadow isn't needed so there isn't a loss of functionality. a5xx does need it for preemption so that has to be temporarily disabled.
Later changes will re-enable the shadow for those targets that can safely mitigate the risks.
Jordan Crouse (4):
drm/msm: Split the a5xx preemption record
drm/msm: Enable expanded apriv support for a650
drm/msm: Disable premption on all 5xx targets
drm/msm: Disable the RPTR shadow
drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 5 +++++ drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 10 +++++++++ drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 10 +++++++++ drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 14 +++++++++--- drivers/gpu/drm/msm/adreno/a5xx_gpu.h | 1 + drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 25 ++++++++++++++++----- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 13 ++++++++++- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 27 ++--------------------- drivers/gpu/drm/msm/msm_gpu.c | 2 +- drivers/gpu/drm/msm/msm_gpu.h | 11 +++++++++ drivers/gpu/drm/msm/msm_ringbuffer.c | 4 ++-- 11 files changed, 85 insertions(+), 37 deletions(-)
Signature · 1 line
2.25.1