Lines Matching refs:sema
1998 static void semaphore_set(u32 *sema, u32 value) in semaphore_set() argument
2000 WRITE_ONCE(*sema, value); in semaphore_set()
2017 u32 *sema = hwsp_scratch(ce); in measure_semaphore_response() local
2018 const u32 offset = hwsp_offset(ce, sema); in measure_semaphore_response()
2036 semaphore_set(sema, -1); in measure_semaphore_response()
2059 if (wait_for(READ_ONCE(*sema) == 0, 50)) { in measure_semaphore_response()
2067 semaphore_set(sema, i); in measure_semaphore_response()
2070 if (wait_for(READ_ONCE(*sema) == 0, 50)) { in measure_semaphore_response()
2075 elapsed[i - 1] = sema[i] - cycles; in measure_semaphore_response()
2092 u32 *sema = hwsp_scratch(ce); in measure_idle_dispatch() local
2093 const u32 offset = hwsp_offset(ce, sema); in measure_idle_dispatch()
2147 elapsed[i] = sema[i] - elapsed[i]; in measure_idle_dispatch()
2163 u32 *sema = hwsp_scratch(ce); in measure_busy_dispatch() local
2164 const u32 offset = hwsp_offset(ce, sema); in measure_busy_dispatch()
2204 if (i > 1 && wait_for(READ_ONCE(sema[i - 1]), 500)) { in measure_busy_dispatch()
2214 semaphore_set(sema, i - 1); in measure_busy_dispatch()
2218 wait_for(READ_ONCE(sema[i - 1]), 500); in measure_busy_dispatch()
2219 semaphore_set(sema, i - 1); in measure_busy_dispatch()
2222 GEM_BUG_ON(sema[i] == -1); in measure_busy_dispatch()
2223 elapsed[i - 1] = sema[i] - elapsed[i]; in measure_busy_dispatch()
2238 static int plug(struct intel_engine_cs *engine, u32 *sema, u32 mode, int value) in plug() argument
2242 offset_in_page(sema); in plug()
2266 u32 *sema = hwsp_scratch(ce); in measure_inter_request() local
2267 const u32 offset = hwsp_offset(ce, sema); in measure_inter_request()
2286 err = plug(ce->engine, sema, MI_SEMAPHORE_SAD_NEQ_SDD, 0); in measure_inter_request()
2292 semaphore_set(sema, 1); in measure_inter_request()
2331 semaphore_set(sema, 1); in measure_inter_request()
2337 elapsed[i - 1] = sema[i + 1] - sema[i]; in measure_inter_request()
2349 semaphore_set(sema, 1); in measure_inter_request()
2357 u32 *sema = hwsp_scratch(ce); in measure_context_switch() local
2358 const u32 offset = hwsp_offset(ce, sema); in measure_context_switch()
2377 err = plug(ce->engine, sema, MI_SEMAPHORE_SAD_NEQ_SDD, 0); in measure_context_switch()
2426 semaphore_set(sema, 1); in measure_context_switch()
2432 elapsed[i - 1] = sema[2 * i + 2] - sema[2 * i + 1]; in measure_context_switch()
2443 semaphore_set(sema, 1); in measure_context_switch()
2451 u32 *sema = hwsp_scratch(ce); in measure_preemption() local
2452 const u32 offset = hwsp_offset(ce, sema); in measure_preemption()
2501 if (wait_for(READ_ONCE(sema[2 * i]) == -1, 500)) { in measure_preemption()
2529 if (wait_for(READ_ONCE(sema[2 * i - 2]) != -1, 500)) { in measure_preemption()
2535 elapsed[i - 1] = sema[2 * i + 0] - elapsed[i - 1]; in measure_preemption()
2543 elapsed[i - 1] = sema[2 * i + 1] - sema[2 * i + 0]; in measure_preemption()
2571 u32 *sema = hwsp_scratch(ce); in measure_completion() local
2572 const u32 offset = hwsp_offset(ce, sema); in measure_completion()
2616 if (wait_for(READ_ONCE(sema[i]) == -1, 50)) { in measure_completion()
2622 semaphore_set(sema, i); in measure_completion()
2635 GEM_BUG_ON(sema[i + 1] == -1); in measure_completion()
2636 elapsed[i] = elapsed[i] - sema[i + 1]; in measure_completion()