]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/msm: Allocate memory for disp snapshot with kvzalloc()
authorDouglas Anderson <dianders@chromium.org>
Mon, 14 Oct 2024 16:36:09 +0000 (09:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Nov 2024 00:52:33 +0000 (01:52 +0100)
commitb340df7458673c9ec5f3fce6c04ac13ec27aa590
treed7748c05c4b7fb26b22dad8e13d75fc18912c70e
parent42cf045086feae77b212f0f66e742b91a5b566b7
drm/msm: Allocate memory for disp snapshot with kvzalloc()

[ Upstream commit e4a45582db1b792c57bdb52c45958264f7fcfbdc ]

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@chromium.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/619658/
Link: https://lore.kernel.org/r/20241014093605.2.I72441365ffe91f3dceb17db0a8ec976af8139590@changeid
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c