Christian König
e86f9ceee1
drm/amdgpu: move sync into job object
...
No need to keep that for every IB.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:24 -05:00
Christian König
9f2ade33e6
drm/amdgpu: send VCE IB tests directly to the ring again
...
We need the IB test for GPU resets as well and
the scheduler should be stoped then.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:24 -05:00
Christian König
d7af97dbcc
drm/amdgpu: send UVD IB tests directly to the ring again
...
We need the IB test for GPU resets as well and
the scheduler should be stoped then.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:23 -05:00
Christian König
0856cab1a6
drm/amdgpu: rename amdgpu_sched.c to amdgpu_job.c
...
That's probably a better matching name.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:23 -05:00
Christian König
d71518b5aa
drm/amdgpu: cleanup in kernel job submission
...
Add a job_alloc_with_ib helper and proper job submission.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:22 -05:00
Christian König
a0332b56f6
drm/amdgpu: send SDMA/GFX IB tests directly to the ring again
...
There is no point in sending them through the scheduler.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:22 -05:00
Christian König
ec72b8006c
drm/amdgpu: directly return fence from ib_schedule
...
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:21 -05:00
Christian König
b07c60c065
drm/amdgpu: move ring from IBs into job
...
We can't submit to multiple rings at the same time anyway.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:20 -05:00
Christian König
9e5d53094c
drm/amdgpu: make pad_ib a ring function v3
...
The padding depends on the firmware version and we need that for BO moves as
well, not only for VM updates.
v2: new approach of making pad_ib a ring function
v3: fix typo in macro name
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:20 -05:00
Christian König
4c0b242cf2
drm/amdgpu: cleanup user fence handling in the CS
...
Don't keep that around twice.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:19 -05:00
Christian König
50838c8cc4
drm/amdgpu: add proper job alloc/free functions
...
And use them in the CS instead of allocating IBs and jobs separately.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:18 -05:00
Christian König
4acabfe379
drm/amdgpu: fix num_ibs check
...
Specifying no IBs on command submission is invalid, stop crashing
badly when somebody tries it.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucer@amd.com >
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:18 -05:00
Christian König
867d0517c7
drm/amdgpu: remove AMDGPU_NUM_SYNCS
...
Just a leftover from semaphores.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:17 -05:00
Christian König
8a8f0b48a0
drm/amdgpu: remove adev and fence from amdgpu_sync_free
...
Just leftovers from the semaphores.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:17 -05:00
Christian König
cc325d1913
drm/amdgpu: check userptrs mm earlier
...
Instead of when we try to bind it check the usermm when
we try to use it in the IOCTLs.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:16 -05:00
Alex Deucher
6e9821b26d
drm/amdgpu/gfx: minor code cleanup
...
Drop needless function wrapper.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:15 -05:00
Christian König
cd75dc6887
drm/amdgpu: separate pushing CS to scheduler
...
Move that out of the main IOCTL function.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:14 -05:00
Christian König
7270f8391d
drm/amdgpu: add amdgpu_set_ib_value helper (v2)
...
And use it in UVD/VCE command patching.
v2: squash in Christian's fix
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:14 -05:00
Christian König
b6ea2f37a2
drm/amdgpu: fix size estimation for clear IB
...
We only need a few dw here.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:13 -05:00
Alex Deucher
b87c032b4b
drm/amdgpu/smu: skip SMC ucode loading on SR-IOV capable boards (v2)
...
VBIOS does this for us in asic_init.
v2: update iceland as well
Reviewed-by: Monk Liu <monk.liu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:13 -05:00
Alex Deucher
c12d287119
drm/amdgpu/gmc8: skip MC ucode loading on SR-IOV capable boards
...
VBIOS does this for us in asic_init.
Reviewed-by: Monk Liu <monk.liu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:12 -05:00
Alex Deucher
8cce244cf6
drm/amdgpu: always repost cards that support SR-IOV
...
Generally a good idea between VM sessions. We need a way to
detect VM pass-through in general and always run asic_init in
that case.
Reviewed-by: Monk Liu <monk.liu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:11 -05:00
Alex Deucher
7e471e6fba
drm/amdgpu: track whether the asic supports SR-IOV
...
Required to make desicions about certain code pathes.
Reviewed-by: Monk Liu <monk.liu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:11 -05:00
Alex Deucher
e74adf2039
drm/amdgpu: add check for atombios GPU virtualization table
...
This table is found on boards that support SR-IOV. This will
be used to determine if the board supports SR-IOV and allow
the driver to take specific action in certain cases.
Reviewed-by: Monk Liu <monk.liu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:10 -05:00
Alex Deucher
383b6f608b
drm/amdgpu: remove unused function
...
amdgpu_boot_test_post_card() is not used anywhere. Probably
a leftover from the original port from radeon.
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:10 -05:00