drm/msm: Map command buffers to kernel only if required

Map command buffers to the kernel address space only if
relocs are specified for the submission. This reduces some
overhead on the submission path.

Change-Id: I32ca3c7fe2147c835a328e0c8937b45f2f3d59b9
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
This commit is contained in:
Sushmita Susheelendra 2017-08-10 12:18:42 -06:00
parent 214aa354fd
commit c6820d61e2

View file

@ -334,6 +334,9 @@ static int submit_reloc(struct msm_gem_submit *submit, struct msm_gem_object *ob
return -EINVAL;
}
if (nr_relocs == 0)
return 0;
/* For now, just map the entire thing. Eventually we probably
* to do it page-by-page, w/ kmap() if not vmap()d..
*/