diff options
author | Jordan Crouse <jcrouse@codeaurora.org> | 2018-10-15 15:31:54 -0600 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2018-12-03 08:46:13 -0500 |
commit | d52900437e95e2799953af21971a54fe5f8e33ff (patch) | |
tree | 320db0e824a7291bcc31a980f791379647848a7b /drivers/gpu | |
parent | ee4456359640defe3f51cc6b728bfce4bc444c9e (diff) | |
download | linux-stable-d52900437e95e2799953af21971a54fe5f8e33ff.tar.gz linux-stable-d52900437e95e2799953af21971a54fe5f8e33ff.tar.bz2 linux-stable-d52900437e95e2799953af21971a54fe5f8e33ff.zip |
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 <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem_submit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index 7a7923e6220d..66673ea9bf6f 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -317,6 +317,9 @@ static int submit_reloc(struct msm_gem_submit *submit, struct msm_gem_object *ob uint32_t *ptr; int ret = 0; + if (!nr_relocs) + return 0; + if (offset % 4) { DRM_ERROR("non-aligned cmdstream buffer: %u\n", offset); return -EINVAL; |