Commit 9610b6b9 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Freeze GPU memory objects to be dumped with the snapshot



In addition to the usual objects in a snapshot (registers, ringbuffer,
IBs, etc), there are a handful of indirect GPU buffer objects that are
created and used during draw operations. These include shaders, buffer
objects, and various state buffers.  Taken together, these buffer
objects can be large, much larger then the snapshot region we have set
aside. Fortunately, these buffers are independent and don't need to be
freed or overwritten when the context is reset.

Long story short we can take these buffers, put them in a list at snapshot
time and mark them so they don't get freed.  Then, when the snapshot is
grabbed dump them into the output stream inline and only then free them.
This allows us to snapshot a larger section of the GPU state without having
to worry about having enough memory set aside.  The only downside is that
some GPU memory will stick around, but we hope that hangs are few and far
between and that some entity will grab the dump soon after the hang so the
memory can be released.

Change-Id: Ic0dedbad0629fa483b077e727d512877bbbf81d6
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 0fdf3a06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment