]> Gentwo Git Trees - linux/.git/commit
drm/msm: fix msm_gem_vma_new() allocations for managed GPUVMs
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Sat, 23 Aug 2025 00:12:00 +0000 (03:12 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Sat, 23 Aug 2025 14:20:18 +0000 (17:20 +0300)
commitefe927b9702643a1d80472664c2642f0304cb608
treeb50aea4f355cda46c09a48bc96211e5122b02955
parentb6f11f114759a088acf44e86b5cd72f24de85d44
drm/msm: fix msm_gem_vma_new() allocations for managed GPUVMs

Since commit 3309323241fb ("drm/gpuvm: Kill drm_gpuva_init()") MSM
driver fails to init, failing with "[drm:msm_gpu_init] *ERROR* could not
allocate memptrs: -22" errors. The mentioned commit reworked the
function, but didn't take into account that op_map is initialized at the
top of the function, while ranges might change if GPUVM is managed by
the kernel.

Move op_mode initialization after finalizing all addresses and right
before the drm_gpuva_init_from_op() call.

Reported-by: Danct12 <danct12@disroot.org>
Fixes: 3309323241fb ("drm/gpuvm: Kill drm_gpuva_init()")
Suggested-by: Rob Clark <robin.clark@oss.qualcomm.com>
Reviewed-by: Rob Clark <robin.clark@oss.qualcomm.com>
Acked-by: Rob Clark <robin.clark@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250823-msm-fix-gpuvm-init-v1-1-e199cd5b1983@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drivers/gpu/drm/msm/msm_gem_vma.c