drm/msm/gpu: fix bo size for msm_rbmemptrs

Submitted by Chia-I Wu on Dec. 19, 2018, 8:20 p.m.

Details

Message ID 20181219202010.11851-1-olvaffe@gmail.com
State New
Headers show
Series "drm/msm/gpu: fix bo size for msm_rbmemptrs" ( rev: 1 ) in Freedreno

Not browsing as part of any series.

Commit Message

Chia-I Wu Dec. 19, 2018, 8:20 p.m.
memptrs_bo is used to store msm_rbmemptrs.  Size it correctly.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
---
 drivers/gpu/drm/msm/msm_gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index 11aac8337066..d23049eb29c4 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -917,7 +917,7 @@  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);