[PATCH 2/3] drm/msm: Allocate memory for disp snapshot with kvzalloc()
Abhinav Kumar
quic_abhinavk at quicinc.com
Mon Oct 14 18:56:20 UTC 2024
On 10/14/2024 9:36 AM, Douglas Anderson wrote:
> With the "drm/msm: add a display mmu fault handler" series [1] we saw
> issues in the field where memory allocation was failing when
> allocating space for registers in msm_disp_state_dump_regs().
> Specifically we were seeing an order 5 allocation fail. It's not
> surprising that order 5 allocations will sometimes fail after the
> system has been up and running for a while.
>
> There's no need here for contiguous memory. Change the allocation to
> kvzalloc() which should make it much less likely to fail.
>
> [1] https://lore.kernel.org/r/20240628214848.4075651-1-quic_abhinavk@quicinc.com/
>
> Fixes: 98659487b845 ("drm/msm: add support to take dpu snapshot")
> Signed-off-by: Douglas Anderson <dianders at chromium.org>
> ---
>
> drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
I had some doubts on how this issue happens considering that the devcore
should automatically release the memory within 5 sec even if userspace
had not read this. So there is no leak as such, its just that in a
heavily loaded system, this can happen.
Fix looks okay to me,
Reviewed-by: Abhinav Kumar <quic_abhinavk at quicinc.com>
More information about the dri-devel
mailing list