drm/msm/gpu: Don't map command buffers with nr_relocs equal to 0
PATCH 1/1 drm/msm/gpu: Don't map command buffers with nr_relocs equal to 0
If a command buffer doesn't have any relocs assigned to it there then is no need to map it in the kernel address space.
Signed-off-by Jordan Crouse <[email protected]>
--- drivers/gpu/drm/msm/msm_gem_submit.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/msm/msm_gem_submit.c +3 -0
@@ -317,6 +317,9 @@ static int submit_reloc(struct msm_gem_submit *submit, struct msm_gem_object *obuint32_t *ptr;int ret =0 ; +if (!nr_relocs) +return 0 ; +if (offset %4 ) {DRM_ERROR ("non-aligned cmdstream buffer: %u\n" , offset);return -EINVAL ;
Signature · 6 lines
2.18.0 _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno