drm/ttm: fix stupid parameter inversion in the pipeline code
Subsystems (4)
PATCH 1/2 drm/ttm: fix stupid parameter inversion in the pipeline code
From: Christian König <[email protected]>
We want to keep the newest fence, not the oldest one.
--- drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_bo_util.c +1 -1
@@ -753,7 +753,7 @@ int ttm_bo_pipeline_move(struct ttm_buffer_object *bo,*/ spin_lock (&from->move_lock); -if (!from->move ||fence_is_later (from->move, fence)) { +if (!from->move ||fence_is_later (fence, from->move)) {fence_put (from->move); from->move =fence_get (fence); }
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 drm/amdgpu: sanitice fence numbers
From: Christian König <[email protected]>
Looks like the VCE block sometimes still sends nonsense fence numbers on startup.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +8 -2
@@ -204,16 +204,22 @@ void amdgpu_fence_process(struct amdgpu_ring *ring)if (seq != ring->fence_drv.sync_seq)amdgpu_fence_schedule_fallback (ring); + last_seq &= drv->num_fences_mask; + seq &= drv->num_fences_mask; +while (last_seq != seq) {struct fence *fence, **ptr; - ptr = &drv->fences[++last_seq & drv->num_fences_mask]; + ++last_seq; + last_seq &= drv->num_fences_mask; + ptr = &drv->fences[last_seq];/* There is always exactly one thread signaling this fence slot */ fence =rcu_dereference_protected (*ptr,1 );RCU_INIT_POINTER (*ptr,NULL ); -BUG_ON (!fence); +if (!fence) +continue ; r =fence_signal (fence);if (!r)
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm/amdgpu: sanitice fence numbers
Quoted 1 line · Christian König
From: Christian König <[email protected]>
Typo in the subject: Choose "sanitize" or "sanitise", depending on your preference. :)
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Christian König
From: Christian König <[email protected]>
We want to keep the newest fence, not the oldest one.
Signed-off-by Christian König <[email protected]>
Quoted 20 lines
--- drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/ttm/ttm_bo_util.c +1
-2@@ -753,7 +753,7 @@ int ttm_bo_pipeline_move(struct ttm_buffer_object *bo,*/ spin_lock (&from->move_lock); -if (!from->move ||fence_is_later (from->move, fence)) { +if (!from->move ||fence_is_later (fence, from->move)) {fence_put (from->move); from->move =fence_get (fence); } --2.5.0
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel