Skip to content

Commit beb311f

Browse files
committed
drm/etnaviv: reduce number of ktime_get calls in IRQ handler
A single IRQ might signal the completion of multiple jobs/fences at once. There is no point in attaching a new timestamp to each fence that only differs in when exactly the IRQ handler was able to process this fence. Get a single timestamp when the IRQ handler has determined that there are completed jobs and reuse this for all fences that get signalled by the handler. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
1 parent 58979ad commit beb311f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/etnaviv/etnaviv_gpu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1548,6 +1548,7 @@ static irqreturn_t irq_handler(int irq, void *data)
15481548
u32 intr = gpu_read(gpu, VIVS_HI_INTR_ACKNOWLEDGE);
15491549

15501550
if (intr != 0) {
1551+
ktime_t now = ktime_get();
15511552
int event;
15521553

15531554
pm_runtime_mark_last_busy(gpu->dev);
@@ -1597,7 +1598,7 @@ static irqreturn_t irq_handler(int irq, void *data)
15971598
*/
15981599
if (fence_after(fence->seqno, gpu->completed_fence))
15991600
gpu->completed_fence = fence->seqno;
1600-
dma_fence_signal(fence);
1601+
dma_fence_signal_timestamp(fence, now);
16011602

16021603
event_free(gpu, event);
16031604
}

0 commit comments

Comments
 (0)