]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Allow to create BO lists in CS ioctl v3
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Fri, 6 Jul 2018 18:16:54 +0000 (14:16 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 Jul 2018 20:29:47 +0000 (15:29 -0500)
commitd38cb1d8f5179cc44d1814592a8b56462c65f373
treeb158d245de63e888bf20897b8f8cecb7fb6cede1
parent5d3af8ce3eebf7f905e402c43f502c45175080af
drm/amdgpu: Allow to create BO lists in CS ioctl v3

This change is to support MESA performace optimization.
Modify CS IOCTL to allow its input as command buffer and an array of
buffer handles to create a temporay bo list and then destroy it
when IOCTL completes.
This saves on calling for BO_LIST create and destry IOCTLs in MESA
and by this improves performance.

v2: Avoid inserting the temp list into idr struct.

v3:
Remove idr alloation from amdgpu_bo_list_create.
Remove useless argument from amdgpu_cs_parser_fini
Minor cosmetic stuff.

v4: Revert amdgpu_bo_list_destroy back to static

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
include/uapi/drm/amdgpu_drm.h