Skip to contentSkip to conversation

drm/msm/gpu: fix bo size for msm_rbmemptrs

PATCH In review Chia-I Wu 3 participants 3 messages Dec 20, 2018 – Dec 21, 2018 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore

Chia-I Wu

author
#0 lore raw

PATCH 1/1 drm/msm/gpu: fix bo size for msm_rbmemptrs

memptrs_bo is used to store msm_rbmemptrs. Size it correctly.

---
 drivers/gpu/drm/msm/msm_gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/msm_gpu.c +1 -1
index 11aac8337066..d23049eb29c4 100644
@@ -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);
 
Signature · 6 lines
2.18.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): 20181220184702.103067-1-olvaffe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 3 lines · Chia-I Wu

memptrs_bo is used to store msm_rbmemptrs. Size it correctly.

Thanks for your patch. I'm really glad somebody is looking seriously at this code. We have this in msm-next:

https://cgit.freedesktop.org/~robclark/linux/commit/?h=msm-next&id=546ec7b471bcae78463426a218b8c7f35bbb71f4

I think that might fix your concern?

Jordan

Quoted 24 lines
---
 drivers/gpu/drm/msm/msm_gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/msm_gpu.c +1 -1
index 11aac8337066..d23049eb29c4 100644
@@ -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);
 
Signature · 6 lines
2.18.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno

A message that is not in the archive (sent off-list or not yet received): 20181220194741.GG18380-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org

#4 lore raw

Ah, thanks. I was on drm-next branch. I will switch to msm-next.

Quoted 39 lines · Jordan Crouse
Quoted 3 lines · Chia-I Wu

memptrs_bo is used to store msm_rbmemptrs. Size it correctly.

Thanks for your patch. I'm really glad somebody is looking seriously at this
code. We have this in msm-next:

https://cgit.freedesktop.org/~robclark/linux/commit/?h=msm-next&id=546ec7b471bcae78463426a218b8c7f35bbb71f4

I think that might fix your concern?

Jordan

Review

Quoted 5 lines
---
 drivers/gpu/drm/msm/msm_gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/msm/msm_gpu.c

drivers/gpu/drm/msm/msm_gpu.c int msm_gpu_init(struct drm_device *drm, struct

Quoted 4 lines

index 11aac8337066..d23049eb29c4 100644

drivers/gpu/drm/msm/msm_gpu.c +0 -0
@@ -917,7 +917,7 @@ int msm_gpu_init(struct drm_device *drm, struct

platform_device *pdev,

drivers/gpu/drm/msm/msm_gpu.c int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev,

Quoted 5 lines
drivers/gpu/drm/msm/msm_gpu.c +1 -1
              goto fail;
      }
 
-     memptrs = msm_gem_kernel_new(drm, sizeof(*gpu->memptrs_bo),
+     memptrs = msm_gem_kernel_new(drm, sizeof(struct msm_rbmemptrs) *

nr_rings,

Quoted 6 lines
drivers/gpu/drm/msm/msm_gpu.c +0 -1
              MSM_BO_UNCACHED, gpu->aspace, &gpu->memptrs_bo,
              &memptrs_iova);
 
--

2.18.1

Quoted 9 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno