]> www.infradead.org Git - users/willy/linux.git/commitdiff
drm/msm/gpu: Allocate the correct size for the GPU memptrs
authorJordan Crouse <jcrouse@codeaurora.org>
Fri, 2 Nov 2018 15:25:18 +0000 (09:25 -0600)
committerRob Clark <robdclark@gmail.com>
Mon, 3 Dec 2018 13:53:27 +0000 (08:53 -0500)
Allocate the correct buffer size for the GPU memptrs. The incorrect
size hasn't affected us thus far since the incorrect size was larger
than the intended size and we're still stuck on page sized
granularity anyway but technically correct is the best kind of
correct.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_gpu.c

index ff958486819bc454f889c45e7f01cf5f8655a0fa..b7b4539c1731a023e9a4c04c7dd08331e7fbaef3 100644 (file)
@@ -920,7 +920,8 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev,
                goto fail;
        }
 
-       memptrs = msm_gem_kernel_new(drm, sizeof(*gpu->memptrs_bo),
+       memptrs = msm_gem_kernel_new(drm,
+               sizeof(struct msm_rbmemptrs) * nr_rings,
                MSM_BO_UNCACHED, gpu->aspace, &gpu->memptrs_bo,
                &memptrs_iova);