Lines Matching refs:mock
107 struct mock_request *mock = container_of(request, typeof(*mock), base); in mock_request_alloc() local
109 INIT_LIST_HEAD(&mock->link); in mock_request_alloc()
110 mock->delay = 0; in mock_request_alloc()
128 struct mock_request *mock = container_of(request, typeof(*mock), base); in mock_submit_request() local
136 list_add_tail(&mock->link, &engine->hw_queue); in mock_submit_request()
137 if (mock->link.prev == &engine->hw_queue) { in mock_submit_request()
138 if (mock->delay) in mock_submit_request()
139 mod_timer(&engine->hw_delay, jiffies + mock->delay); in mock_submit_request()
141 advance(engine, mock); in mock_submit_request()
206 engine->base.breadcrumbs.mock = true; /* prevent touching HW for irqs */ in mock_engine()
233 struct mock_engine *mock = in mock_engine_flush() local
234 container_of(engine, typeof(*mock), base); in mock_engine_flush()
237 del_timer_sync(&mock->hw_delay); in mock_engine_flush()
239 spin_lock_irq(&mock->hw_lock); in mock_engine_flush()
240 list_for_each_entry_safe(request, rn, &mock->hw_queue, link) { in mock_engine_flush()
242 mock_seqno_advance(&mock->base, request->base.global_seqno); in mock_engine_flush()
244 spin_unlock_irq(&mock->hw_lock); in mock_engine_flush()
254 struct mock_engine *mock = in mock_engine_free() local
255 container_of(engine, typeof(*mock), base); in mock_engine_free()
258 GEM_BUG_ON(timer_pending(&mock->hw_delay)); in mock_engine_free()