Jack Xiao
18ee4ce63e
drm/amdgpu: add mes unmap legacy queue routine
...
For mes kiq has been taken over by mes sched, drv can't directly
use mes kiq to unmap queues. drv has to use mes sched api to
unmap legacy queue.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:54 -04:00
Mukul Joshi
464913c0dd
drm/amdgpu/mes: Update the doorbell function signatures
...
Update the function signatures for process doorbell allocations
with MES enabled to make them more generic. KFD would need to
access these functions to allocate/free doorbells when MES is
enabled.
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com >
Acked-by: Oak Zeng <Oak.Zeng@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:53 -04:00
Jack Xiao
7c18b40e22
drm/amdgpu/mes: fix vm csa update issue
...
Need reserve VM buffers before update VM csa.
v2: rebase fixes
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:53 -04:00
Jack Xiao
6624d16103
drm/amdgpu/mes: implement mes self test
...
Add mes self test to verify its fundamental functionality by
running ring test and ib test of mes kernel queue.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:52 -04:00
Jack Xiao
e3652b0976
drm/amdgpu/mes: add helper functions to alloc/free ctx metadata
...
Add the helper functions to allocate/free context metadata.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:52 -04:00
Jack Xiao
9cc654c8ce
drm/amdgpu/mes: implement removing mes ring
...
Remove the mes ring and its resources.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:52 -04:00
Jack Xiao
d0c423b647
drm/amdgpu/mes: use ring for kernel queue submission
...
Use ring as the front end for kernel queue submission.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:52 -04:00
Jack Xiao
11ec5b3605
drm/amdgpu/mes: add helper function to get the ctx meta data offset
...
Add the helper function to get the corresponding ctx meta data offset.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:52 -04:00
Jack Xiao
bcc4e1e1d4
drm/amdgpu/mes: implement removing mes queue
...
Remove the MES queue from MES scheduling and free its resources.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:52 -04:00
Jack Xiao
be5609de15
drm/amdgpu/mes: implement adding mes queue
...
Allocate related resources for the queue and add it to mes
for scheduling.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:51 -04:00
Jack Xiao
ea756bd5cc
drm/amdgpu/mes: implement resuming all gangs
...
Implement resuming all gangs.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:51 -04:00
Jack Xiao
c8bb10572c
drm/amdgpu/mes: implement suspending all gangs
...
Implement suspending all gangs.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:51 -04:00
Jack Xiao
b0306e5840
drm/amdgpu/mes: implement removing mes gang
...
Free the mes gang and its resources.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:51 -04:00
Jack Xiao
5d0f619f72
drm/amdgpu/mes: implement adding mes gang
...
Gang is a group of the same type queue, which is the scheduling
unit of mes hardware scheduler.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:51 -04:00
Jack Xiao
063a38d662
drm/amdgpu/mes: implement destroying mes process
...
Destroy the mes process, which free resources of the process.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:51 -04:00
Jack Xiao
48dcd2b751
drm/amdgpu/mes: implement creating mes process v2
...
Create a mes process which contains process-related resources,
like vm, doorbell bitmap, process ctx bo and etc.
v2: move the simple variable to the end
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:51 -04:00
Jack Xiao
b04c1d6468
drm/amdgpu/mes: initialize/finalize common mes structure v2
...
Initialize/finalize common mes structure.
v2: add mutex_init for adev->mes.mutex
Cc: Le Ma <le.ma@amd.com >
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:51 -04:00
Jack Xiao
cf064b4589
drm/amdgpu/mes: add mes kiq callback
...
Needed to properly initialize mes kiq.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:50 -04:00
Jack Xiao
207e8bbe66
drm/amdgpu/mes: extend mes framework to support multiple mes pipes
...
Add support for multiple mes pipes, so that reuse the existing
code to initialize more mes pipe and queue.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:49 -04:00
Jack Xiao
3a42c7f38b
drm/amdgpu: update mes process/gang/queue definitions
...
Update the definitions of MES process/gang/queue.
v2: add missing includes
v3: rebase fix, include mm.h
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 10:43:49 -04:00
Le Ma
ae4e3b62df
drm/amdgpu/mes: add status fence memory definitions
...
Update for new member query_status_fence_gpu_mc_ptr in MESAPI_SET_HW_RESOURCES.
Signed-off-by: Le Ma <le.ma@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-07-01 01:59:11 -04:00
Jack Xiao
3bbd31e0f4
drm/amdgpu/mes: update some mes definitions
...
Update some mes definitions.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-07-01 01:59:07 -04:00
Jack Xiao
5aa91248c0
drm/amdgpu/mes10.1: add mes firmware info fields
...
The newly added fields is to store mes firmware related information.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:28 -05:00
Jack Xiao
7bbc36765c
drm/amdgpu/mes: add definitions of ip callback function
...
Abstract mes ip independent function layer.
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:58:22 -05:00
Jack Xiao
a538bbe7a8
drm/amdgpu/mes: add mes header file and definition
...
Add dummy header file and definitions of mes.
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:58:22 -05:00