[Freedreno] [PATCH 2/4] drm/msm: gpu: Capture the state of the GPU

2018-01-05 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 thi

[Freedreno] [PATCH 3/4] drm/msm: gpu: Convert the GPU show functions to use the GPU state

2018-01-05 Thread Jordan Crouse
Convert the existing GPU show functions 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 1/4] drm/msm: gpu: Use drm_printer to consolidate the show/dump code

2018-01-05 Thread Jordan Crouse
Use drm_printer to abstract the show/dump debug code so we can use the same code for both the kernel log and seq_file paths. Maintaining the existing dump format mandates that we break the single show function into two but thats a small price to pay for removing a bunch of code and consolidating th

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

2018-01-05 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 nod

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

2018-01-05 Thread Jordan Crouse
This is a request for comment on code to store and dump a GPU state a hang with inspiration from the very good i915 GPU error state and the binary GPU snapshot in the downstream kernel. The goal is to store and provide enough information to debug software and hardware issues on the Adreno hardware

Re: [Freedreno] [RFC 0/4] drm/msm: GPU crash state

2018-01-05 Thread Chris Wilson
Quoting Jordan Crouse (2018-01-05 18:00:17) > This is a request for comment on code to store and dump a GPU state > a hang with inspiration from the very good i915 GPU error state and > the binary GPU snapshot in the downstream kernel. > > The goal is to store and provide enough information to deb

Re: [Freedreno] [RFC 0/4] drm/msm: GPU crash state

2018-01-05 Thread Jordan Crouse
On Fri, Jan 05, 2018 at 06:32:22PM +, Chris Wilson wrote: > Quoting Jordan Crouse (2018-01-05 18:00:17) > > This is a request for comment on code to store and dump a GPU state > > a hang with inspiration from the very good i915 GPU error state and > > the binary GPU snapshot in the downstream k

Re: [Freedreno] [RFC 0/4] drm/msm: GPU crash state

2018-01-05 Thread Rob Clark
On Fri, Jan 5, 2018 at 5:11 PM, Jordan Crouse wrote: > On Fri, Jan 05, 2018 at 06:32:22PM +, Chris Wilson wrote: >> Quoting Jordan Crouse (2018-01-05 18:00:17) >> > This is a request for comment on code to store and dump a GPU state >> > a hang with inspiration from the very good i915 GPU erro