Re: [Freedreno] [PATCH 2/2] drm/msm/a6xx: Fix NULL dereference during crashstate capture

2018-12-11 Thread Jordan Crouse
On Mon, Dec 10, 2018 at 05:34:22PM +0530, Sharat Masetty wrote: > The gpu crashstate's base objects registers pointer can be NULL if the > target implementation decides to capture the register dump on its own. > This patch simply checks for NULL before dereferencing. Hi Sharat - this doesn't

[Freedreno] [PATCH] drm/msm/a5xx: Build a5xx_gpu_state_(get/put) under the right conditionals

2018-12-11 Thread Sharat Masetty
Build the GPU crashstate capture functions only if either of CONFIG_DEBUG_FS, CONFIG_DEV_COREDUMP is defined. Signed-off-by: Sharat Masetty --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c

[Freedreno] [v2 2/2] drm/msm/a6xx: Fix NULL dereference during crashstate capture

2018-12-11 Thread Sharat Masetty
The gpu crashstate's base objects registers pointer can be NULL if the target implementation decides to capture the register dump on its own. This patch simply checks for NULL before dereferencing. Signed-off-by: Sharat Masetty --- Changes from v1: Addressed comments from Jordan Crouse

[Freedreno] [v2 1/2] drm/msm/adreno: Make adreno_gpu_state_get() return void

2018-12-11 Thread Sharat Masetty
We are not really checking the state of the adreno_gpu_state_get() function at the callers and in addition the state capture is mostly a best effort service, so make the function return void. Signed-off-by: Sharat Masetty --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 +---