diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2021-04-27 03:18:26 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2021-06-23 07:32:14 -0700 |
commit | 2503003cb2b8cbf419c686af15cdf1239f4fff17 (patch) | |
tree | 04aa9da546e1002f32e6bb4aab34cbe13c6a5ed2 /drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | |
parent | eb9d6c7ebe44df4bf077e71de809bb7b216da38c (diff) | |
download | linux-stable-2503003cb2b8cbf419c686af15cdf1239f4fff17.tar.gz linux-stable-2503003cb2b8cbf419c686af15cdf1239f4fff17.tar.bz2 linux-stable-2503003cb2b8cbf419c686af15cdf1239f4fff17.zip |
drm/msm: make msm_disp_state transient data struct
Instead of allocating snapshotting structure at the driver probe time
and later handling concurrent access, actual state, etc, make
msm_disp_state transient struct. Allocate one when snapshotting happens
and free it after coredump data is read by userspace.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
Link: https://lore.kernel.org/r/20210427001828.2375555-3-dmitry.baryshkov@linaro.org
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c')
-rw-r--r-- | drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c index ca6632550337..cabe15190ec1 100644 --- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c +++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c @@ -142,8 +142,9 @@ void msm_disp_snapshot_capture_state(struct msm_disp_state *disp_state) msm_disp_capture_atomic_state(disp_state); } -void msm_disp_state_free(struct msm_disp_state *disp_state) +void msm_disp_state_free(void *data) { + struct msm_disp_state *disp_state = data; struct msm_disp_state_block *block, *tmp; if (disp_state->atomic_state) { @@ -156,6 +157,8 @@ void msm_disp_state_free(struct msm_disp_state *disp_state) kfree(block->state); kfree(block); } + + kfree(disp_state); } void msm_disp_snapshot_add_block(struct msm_disp_state *disp_state, u32 len, |