| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch the scheduler fence was created when we push the job
into the queue, so we could only get the fence after pushing it.
The mutex now was necessary to prevent the thread pushing the jobs to
the hardware from running faster than the thread pushing the jobs into
the queue.
Otherwise the thread pushing jobs into the queue would have accessed
possible freed up memory when it tries to get a reference to the fence.
So what you get in the end is thread A:
mutex_lock(&job->lock);
...
Kick of thread B.
...
mutex_unlock(&job->lock);
And thread B:
mutex_lock(&job->lock);
....
mutex_unlock(&job->lock);
kfree(job);
I'm actually not sure if I'm still up to date on this, but this usage
pattern used to be not allowed with mutexes. See here as well
https://lwn.net/Articles/575460/.
v2: remove unrelated changes, fix missing owner
v3: rebased, add more commit message
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
|
| |
|
|
|
|
|
|
| |
The code was correct, but getting two references when the ownership
is linearly moved on is a bit awkward and just overhead.
Signed: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
|
| |
|
|
|
|
|
| |
OGL needs these tracepoints to investigate performance issue.
Change-Id: I5e58187d061253f7d665dfce8e4e163ba91d3e2b
Signed-off-by: Chunming Zhou <[email protected]>
|
| |
|
|
|
|
|
| |
Just move the remaining users to fence_put/get.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Embed the scheduler into the ring structure instead of allocating it.
Use the ring name directly instead of the id.
v2: rebased, whitespace cleanup
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Junwei Zhang <[email protected]>
Reviewed-by: Chunming Zhou<[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Just to be consistent with the other members.
v2: rename the ring member as well.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Junwei Zhang <[email protected]> (v1)
Reviewed-by: Chunming Zhou<[email protected]>
|
| |
|
|
|
|
|
|
| |
Use container_of rather than casting.
Reviewed-by: Christian König <[email protected]>
Reviewed-by: David Zhou <[email protected]>
Signed-off-by: Junwei Zhang <[email protected]>
|
| |
|
|
|
|
|
|
| |
Use consistent naming across functions.
Reviewed-by: Christian König <[email protected]>
Reviewed-by: David Zhou <[email protected]>
Signed-off-by: Junwei Zhang <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Just free the resources immediately after submitting the job.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]>
Reviewed-by: Junwei Zhang <[email protected]>
Reviewed-by: Jammy Zhou <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
This way the scheduler doesn't wait in it's work thread any more.
v2: fix race conditions
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]>
Reviewed-by: Jammy Zhou <[email protected]>
|
| |
|
|
|
|
|
| |
Signed-off-by: Christian König <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Reviewed-by: Jammy Zhou <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]>
|
| |
|
|
|
| |
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
|
| |
|
|
|
| |
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
|
| |
|
|
|
|
|
| |
Calling schedule() is probably the worse things we can do.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Simply not used any more. Only keep 32bit atomic for fence sequence numbering.
v2: trivial rebase
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]> (v1)
Reviewed-by: Jammy Zhou <[email protected]> (v1)
Reviewed-by: Chunming Zhou <[email protected]> (v1)
|
| |
|
|
|
|
|
| |
Fixes a whole bunch of lockdep warnings.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]>
|
| |
|
|
|
| |
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
|
| |
|
|
|
|
|
|
| |
fix fence is released when pass to **fence sometimes.
add reference for it.
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Not used any more.
v2: remove amd_sched_emit as well.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
scheduler fence is based on kernel fence framework.
v2: squash in Christian's build fix
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
|
| |
|
|
|
| |
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
|
| |
|
|
|
| |
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
|
| |
|
|
|
|
|
|
| |
v2: rebased
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]> (v1)
Reviewed-by: Chunming Zhou <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Avoiding a couple of casts.
v2: rename c_entity to entity as well
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]>
|
| |
|
|
|
| |
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit d1d33da8eb86b8ca41dd9ed95738030df5267b95.
Reviewed-by: Christian K?nig <[email protected]>
Conflicts:
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
|
| |
|
|
|
|
|
|
|
| |
Cleanup the kernel context handling.
v2: rebased
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]> (v1)
|
| |
|
|
|
|
|
| |
This way can avoid interrupt lost, and can process sched job exactly.
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Jammy Zhou <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
This function is to update last_emitted_v_seq and wake up the waiters.
It should be called by driver in the run_job backend function
Signed-off-by: Jammy Zhou <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
|
| |
|
|
|
|
|
|
| |
It is clean to update last_queued_v_seq in the scheduler module
Signed-off-by: Jammy Zhou <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Fix the code alignment, etc.
v2: rebase the code
Signed-off-by: Jammy Zhou <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
|
| |
|
|
|
| |
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
|
| |
|
|
|
|
|
|
| |
every sbumission should be able to get a fence.
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
Reviewed-by: Jammy Zhou <[email protected]>
|
| |
|
|
|
|
|
| |
Remove code not used at the moment.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]>
|
| |
|
|
|
| |
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
|
| |
|
|
|
|
|
|
| |
if enabling scheduler, then the queued seq is assigned
when pushing job before emitting job.
Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
|
| |
|
|
|
|
| |
Signed-off-by: Chunming Zhou <[email protected]>
Acked-by: Christian K?nig <[email protected]>
Reviewed-by: Jammy Zhou <[email protected]>
|
|
|
v2: fix rebase breakage
Signed-off-by: Chunming Zhou <[email protected]>
Acked-by: Christian K?nig <[email protected]>
Reviewed-by: Jammy Zhou <[email protected]>
|