Commit d5290043 authored by Jordan Crouse's avatar Jordan Crouse Committed by Sean Paul

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: default avatarJordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
parent ee445635
...@@ -317,6 +317,9 @@ static int submit_reloc(struct msm_gem_submit *submit, struct msm_gem_object *ob ...@@ -317,6 +317,9 @@ static int submit_reloc(struct msm_gem_submit *submit, struct msm_gem_object *ob
uint32_t *ptr; uint32_t *ptr;
int ret = 0; int ret = 0;
if (!nr_relocs)
return 0;
if (offset % 4) { if (offset % 4) {
DRM_ERROR("non-aligned cmdstream buffer: %u\n", offset); DRM_ERROR("non-aligned cmdstream buffer: %u\n", offset);
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment