Re: [Freedreno] [PATCH] include: Move ascii85 functions from i915 to linux/ascii85.h

2018-01-26 Thread Chris Wilson
Quoting Jordan Crouse (2018-01-26 20:59:22) > The i915 DRM driver very cleverly used ascii85 encoding for their All gfx drivers must eventually become PostScript. > GPU state file. Move the encode functions to a general header file to > support other drivers that might be interested in the same

[Freedreno] [PATCH 4/6] drm/msm/adreno: Convert the show/crash file format

2018-01-26 Thread Jordan Crouse
Convert the format of the 'show' and 'crash' debugfs files to mostly standard YAML. This should be easier to parse and be more flexible for future changes and expansions. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 23

[Freedreno] [PATCH 5/6] drm/msm/adreno: Add ringbuffer contexts to the GPU state

2018-01-26 Thread Jordan Crouse
Add the contents of each ringbuffer to the GPU state and dump the data in the crash file encoded with ascii85. To save space only the used portions of the ringbuffer are saved. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 44

[Freedreno] [PATCH 6/6] drm/msm/adreno: Add a5xx specific registers for the GPU state

2018-01-26 Thread Jordan Crouse
HLSQ, SP and TP registers are only accessible from a special aperture and to make matters worsex, the aperture is blocked from the CPU on targets that can support secure rendering. Luckily the GPU hardware has its own purpose built register dumper that can access the registers from the aperture.

[Freedreno] [PATCH 1/6] drm/msm: gpu: Capture the state of the GPU

2018-01-26 Thread Jordan Crouse
Add the infrastructure to capture the state current state of the GPU and store it in memory. This is useful for storing the state of a hung GPU so it can be dumped later. For now grab the same basic ringbuffer information and registers that are provided by the debugfs 'gpu' node but obviously

[Freedreno] [PATCH 3/6] drm/msm: gpu: Capture the GPU state on a GPU hang

2018-01-26 Thread Jordan Crouse
Capture the GPU state on a GPU hang and store it for later playback using the 'crash' node in the debugfs directory. Only one crash state is stored at a time on the assumption that the first hang is usually the most interesting. The existing crash state can be cleared by writing to the debugfs

[Freedreno] [RFC v2 0/6] drm/msm: GPU crash state

2018-01-26 Thread Jordan Crouse
This is an update for my previous stack of GPU state code (https://patchwork.freedesktop.org/series/36097/). The goal is to store and provide enough information to debug software and hardware issues on the Adreno hardware in a semi human-readable format that can also be parsed by scripts. Based

[Freedreno] [PATCH 2/6] drm/msm: gpu: Convert the GPU show function to use the GPU state

2018-01-26 Thread Jordan Crouse
Convert the existing GPU show function to use the GPU state to dump the information rather than reading it directly from the hardware. This will require an additional step to capture the state before dumping it for the existing nodes but it will greatly facilitate reusing the same code for dumping

[Freedreno] [PATCH] include: Move ascii85 functions from i915 to linux/ascii85.h

2018-01-26 Thread Jordan Crouse
The i915 DRM driver very cleverly used ascii85 encoding for their GPU state file. Move the encode functions to a general header file to support other drivers that might be interested in the same functionality. Signed-off-by: Jordan Crouse ---

[Freedreno] [RFC] Move i915 ascii85 functions to linux/ascii85.h

2018-01-26 Thread Jordan Crouse
I've been working on a crash dump utility for the drm/msm GPU driver to get the useful GPU information out after a hang. Taking inspiration from the i915 driver I thought it was very smart to use ascii85 format to encode the binary buffers and other bits. This patch moves the two very simple

[Freedreno] [PATCH] drm/msm: Replace gem_object deprecated functions

2018-01-26 Thread Steve Kowalik
drm_gem_object_{reference,unreference,unreference_unlocked} are deprecated functions, and merely alias to the get/put functions. Switch to the new names. Signed-off-by: Steve Kowalik --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c| 6 +++---