diff options
author | Rob Clark <robdclark@chromium.org> | 2021-11-24 22:41:30 +0100 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2021-11-30 01:19:57 +0100 |
commit | eaa55ead5a41ab5fb3ef0561935ffe04453b56a7 (patch) | |
tree | 5151bb7737e0876f46e40a94eeb936ae979fa20f /drivers/gpu/drm/msm | |
parent | drm/msm/a6xx: Capture gmu log in devcoredump (diff) | |
download | linux-eaa55ead5a41ab5fb3ef0561935ffe04453b56a7.tar.xz linux-eaa55ead5a41ab5fb3ef0561935ffe04453b56a7.zip |
drm/msm/gpu: Add some WARN_ON()s
We don't expect either of these conditions to ever be true, so let's get
shouty if they are.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20211124214151.1427022-6-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index 7d1ff202e5d8..47cb40bdbd43 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -504,6 +504,9 @@ int adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state) struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu); int i, count = 0; + WARN_ON(gpu->needs_hw_init); + WARN_ON(!mutex_is_locked(&gpu->lock)); + kref_init(&state->ref); ktime_get_real_ts64(&state->time); |