Skip to content

Commit c877bed

Browse files
icklerodrigovivi
authored andcommitted
drm/i915/gt: Only kick the signal worker if there's been an update
One impact of commit 047a1b8 ("dma-buf & drm/amdgpu: remove dma_resv workaround") is that it stores many, many more fences. Whereas adding an exclusive fence used to remove the shared fence list, that list is now preserved and the write fences included into the list. Not just a single write fence, but now a write/read fence per context. That causes us to have to track more fences than before (albeit half of those are redundant), and we trigger more interrupts for multi-engine workloads. As part of reducing the impact from handling more signaling, we observe we only need to kick the signal worker after adding a fence iff we have good cause to believe that there is work to be done in processing the fence i.e. we either need to enable the interrupt or the request is already complete but we don't know if we saw the interrupt and so need to check signaling. References: 047a1b8 ("dma-buf & drm/amdgpu: remove dma_resv workaround") Signed-off-by: Chris Wilson <[email protected]> Signed-off-by: Karolina Drobnik <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/d7b953c7a4ba747c8196a164e2f8c5aef468d048.1657289332.git.karolina.drobnik@intel.com
1 parent 1ea7fe7 commit c877bed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/i915/gt/intel_breadcrumbs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,8 @@ static void insert_breadcrumb(struct i915_request *rq)
399399
* the request as it may have completed and raised the interrupt as
400400
* we were attaching it into the lists.
401401
*/
402-
irq_work_queue(&b->irq_work);
402+
if (!b->irq_armed || __i915_request_is_complete(rq))
403+
irq_work_queue(&b->irq_work);
403404
}
404405

405406
bool i915_request_enable_breadcrumb(struct i915_request *rq)

0 commit comments

Comments
 (0)