Home
last modified time | relevance | path

Searched refs:ww (Results 1 – 25 of 85) sorted by relevance

1234

/Linux-v6.6/drivers/gpu/drm/i915/
Di915_gem_ww.c9 void i915_gem_ww_ctx_init(struct i915_gem_ww_ctx *ww, bool intr) in i915_gem_ww_ctx_init() argument
11 ww_acquire_init(&ww->ctx, &reservation_ww_class); in i915_gem_ww_ctx_init()
12 INIT_LIST_HEAD(&ww->obj_list); in i915_gem_ww_ctx_init()
13 ww->intr = intr; in i915_gem_ww_ctx_init()
14 ww->contended = NULL; in i915_gem_ww_ctx_init()
17 static void i915_gem_ww_ctx_unlock_all(struct i915_gem_ww_ctx *ww) in i915_gem_ww_ctx_unlock_all() argument
21 while ((obj = list_first_entry_or_null(&ww->obj_list, struct drm_i915_gem_object, obj_link))) { in i915_gem_ww_ctx_unlock_all()
35 void i915_gem_ww_ctx_fini(struct i915_gem_ww_ctx *ww) in i915_gem_ww_ctx_fini() argument
37 i915_gem_ww_ctx_unlock_all(ww); in i915_gem_ww_ctx_fini()
38 WARN_ON(ww->contended); in i915_gem_ww_ctx_fini()
[all …]
Di915_gem_evict.c67 static bool grab_vma(struct i915_vma *vma, struct i915_gem_ww_ctx *ww) in grab_vma() argument
74 if (!i915_gem_object_trylock(vma->obj, ww)) { in grab_vma()
97 struct i915_gem_ww_ctx *ww, in mark_free() argument
105 if (!grab_vma(vma, ww)) in mark_free()
149 struct i915_gem_ww_ctx *ww, in i915_gem_evict_something() argument
230 if (mark_free(&scan, ww, vma, flags, &eviction_list)) in i915_gem_evict_something()
305 grab_vma(vma, ww)) { in i915_gem_evict_something()
329 struct i915_gem_ww_ctx *ww, in i915_gem_evict_for_node() argument
410 if (!grab_vma(vma, ww)) { in i915_gem_evict_for_node()
458 int i915_gem_evict_vm(struct i915_address_space *vm, struct i915_gem_ww_ctx *ww, in i915_gem_evict_vm() argument
[all …]
Di915_gem_evict.h17 struct i915_gem_ww_ctx *ww,
23 struct i915_gem_ww_ctx *ww,
27 struct i915_gem_ww_ctx *ww,
Di915_gem_ww.h23 static inline int __i915_gem_ww_fini(struct i915_gem_ww_ctx *ww, int err) in __i915_gem_ww_fini() argument
26 err = i915_gem_ww_ctx_backoff(ww); in __i915_gem_ww_fini()
32 i915_gem_ww_ctx_fini(ww); in __i915_gem_ww_fini()
Di915_vma.h289 i915_vma_pin_ww(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,
295 struct i915_gem_ww_ctx ww; in i915_vma_pin() local
298 i915_gem_ww_ctx_init(&ww, true); in i915_vma_pin()
300 err = i915_gem_object_lock(vma->obj, &ww); in i915_vma_pin()
302 err = i915_vma_pin_ww(vma, &ww, size, alignment, flags); in i915_vma_pin()
304 err = i915_gem_ww_ctx_backoff(&ww); in i915_vma_pin()
308 i915_gem_ww_ctx_fini(&ww); in i915_vma_pin()
313 int i915_ggtt_pin(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,
Di915_gem_gtt.c98 struct i915_gem_ww_ctx *ww, in i915_gem_gtt_reserve() argument
123 err = i915_gem_evict_for_node(vm, ww, node, flags); in i915_gem_gtt_reserve()
191 struct i915_gem_ww_ctx *ww, in i915_gem_gtt_insert() argument
277 err = i915_gem_gtt_reserve(vm, ww, node, size, offset, color, flags); in i915_gem_gtt_insert()
285 err = i915_gem_evict_something(vm, ww, size, alignment, color, in i915_gem_gtt_insert()
/Linux-v6.6/drivers/staging/vt6655/
Dmac.c268 unsigned short ww; in MACbSoftwareReset() local
273 for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { in MACbSoftwareReset()
277 if (ww == W_MAX_TIMEOUT) in MACbSoftwareReset()
328 unsigned short ww; in vt6655_mac_safe_rx_off() local
335 for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { in vt6655_mac_safe_rx_off()
339 if (ww == W_MAX_TIMEOUT) { in vt6655_mac_safe_rx_off()
343 for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { in vt6655_mac_safe_rx_off()
347 if (ww == W_MAX_TIMEOUT) { in vt6655_mac_safe_rx_off()
355 for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { in vt6655_mac_safe_rx_off()
359 if (ww == W_MAX_TIMEOUT) { in vt6655_mac_safe_rx_off()
[all …]
Dbaseband.c1908 unsigned short ww; in bb_read_embedded() local
1917 for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { in bb_read_embedded()
1926 if (ww == W_MAX_TIMEOUT) { in bb_read_embedded()
1951 unsigned short ww; in bb_write_embedded() local
1962 for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { in bb_write_embedded()
1968 if (ww == W_MAX_TIMEOUT) { in bb_write_embedded()
/Linux-v6.6/drivers/gpu/drm/i915/gt/
Dintel_context.c102 static int __context_pin_state(struct i915_vma *vma, struct i915_gem_ww_ctx *ww) in __context_pin_state() argument
107 err = i915_ggtt_pin(vma, ww, 0, bias | PIN_HIGH); in __context_pin_state()
137 struct i915_gem_ww_ctx *ww) in __ring_active() argument
141 err = intel_ring_pin(ring, ww); in __ring_active()
163 struct i915_gem_ww_ctx *ww) in intel_context_pre_pin() argument
169 err = __ring_active(ce->ring, ww); in intel_context_pre_pin()
173 err = intel_timeline_pin(ce->timeline, ww); in intel_context_pre_pin()
180 err = __context_pin_state(ce->state, ww); in intel_context_pre_pin()
204 struct i915_gem_ww_ctx *ww) in __intel_context_do_pin_ww() argument
222 err = i915_gem_object_lock(ce->timeline->hwsp_ggtt->obj, ww); in __intel_context_do_pin_ww()
[all …]
Dintel_renderstate.c167 i915_gem_ww_ctx_init(&so->ww, true); in intel_renderstate_init()
169 err = intel_context_pin_ww(ce, &so->ww); in intel_renderstate_init()
177 err = i915_gem_object_lock(so->vma->obj, &so->ww); in intel_renderstate_init()
181 err = i915_vma_pin_ww(so->vma, &so->ww, 0, 0, PIN_GLOBAL | PIN_HIGH); in intel_renderstate_init()
197 err = i915_gem_ww_ctx_backoff(&so->ww); in intel_renderstate_init()
201 i915_gem_ww_ctx_fini(&so->ww); in intel_renderstate_init()
248 i915_gem_ww_ctx_fini(&so->ww); in intel_renderstate_fini()
Dselftest_migrate.c38 struct i915_gem_ww_ctx *ww, in copy() argument
47 struct i915_gem_ww_ctx ww; in copy() local
61 for_i915_gem_ww(&ww, err, true) { in copy()
62 err = i915_gem_object_lock(src, &ww); in copy()
66 err = i915_gem_object_lock(dst, &ww); in copy()
90 err = fn(migrate, &ww, src, dst, &rq); in copy()
223 struct i915_gem_ww_ctx *ww, in intel_migrate_ccs_copy() argument
242 err = intel_context_pin_ww(ce, ww); in intel_migrate_ccs_copy()
257 struct i915_gem_ww_ctx *ww, in clear() argument
266 struct i915_gem_ww_ctx ww; in clear() local
[all …]
Dintel_ring_submission.c468 struct i915_gem_ww_ctx *ww) in ring_context_init_default_state() argument
488 struct i915_gem_ww_ctx *ww, in ring_context_pre_pin() argument
496 err = ring_context_init_default_state(ce, ww); in ring_context_pre_pin()
503 err = gen6_ppgtt_pin(i915_vm_to_ppgtt((vm)), ww); in ring_context_pre_pin()
1250 struct i915_gem_ww_ctx *ww, in gen7_ctx_switch_bb_init() argument
1255 err = i915_vma_pin_ww(vma, ww, 0, 0, PIN_USER | PIN_HIGH); in gen7_ctx_switch_bb_init()
1315 struct i915_gem_ww_ctx ww; in intel_ring_submission_setup() local
1365 i915_gem_ww_ctx_init(&ww, false); in intel_ring_submission_setup()
1368 err = i915_gem_object_lock(timeline->hwsp_ggtt->obj, &ww); in intel_ring_submission_setup()
1370 err = i915_gem_object_lock(gen7_wa_vma->obj, &ww); in intel_ring_submission_setup()
[all …]
/Linux-v6.6/drivers/gpu/drm/i915/gem/
Di915_gem_dmabuf.c122 struct i915_gem_ww_ctx ww; in i915_gem_begin_cpu_access() local
125 i915_gem_ww_ctx_init(&ww, true); in i915_gem_begin_cpu_access()
127 err = i915_gem_object_lock(obj, &ww); in i915_gem_begin_cpu_access()
135 err = i915_gem_ww_ctx_backoff(&ww); in i915_gem_begin_cpu_access()
139 i915_gem_ww_ctx_fini(&ww); in i915_gem_begin_cpu_access()
146 struct i915_gem_ww_ctx ww; in i915_gem_end_cpu_access() local
149 i915_gem_ww_ctx_init(&ww, true); in i915_gem_end_cpu_access()
151 err = i915_gem_object_lock(obj, &ww); in i915_gem_end_cpu_access()
159 err = i915_gem_ww_ctx_backoff(&ww); in i915_gem_end_cpu_access()
163 i915_gem_ww_ctx_fini(&ww); in i915_gem_end_cpu_access()
[all …]
Di915_gem_object.h165 struct i915_gem_ww_ctx *ww, in __i915_gem_object_lock() argument
171 ret = dma_resv_lock_interruptible(obj->base.resv, ww ? &ww->ctx : NULL); in __i915_gem_object_lock()
173 ret = dma_resv_lock(obj->base.resv, ww ? &ww->ctx : NULL); in __i915_gem_object_lock()
175 if (!ret && ww) { in __i915_gem_object_lock()
177 list_add_tail(&obj->obj_link, &ww->obj_list); in __i915_gem_object_lock()
184 ww->contended = obj; in __i915_gem_object_lock()
191 struct i915_gem_ww_ctx *ww) in i915_gem_object_lock() argument
193 return __i915_gem_object_lock(obj, ww, ww && ww->intr); in i915_gem_object_lock()
197 struct i915_gem_ww_ctx *ww) in i915_gem_object_lock_interruptible() argument
199 WARN_ON(ww && !ww->intr); in i915_gem_object_lock_interruptible()
[all …]
Di915_gem_region.c166 GEM_WARN_ON(apply->ww); in i915_gem_process_region()
171 struct i915_gem_ww_ctx ww; in i915_gem_process_region() local
188 apply->ww = &ww; in i915_gem_process_region()
189 for_i915_gem_ww(&ww, ret, apply->interruptible) { in i915_gem_process_region()
190 ret = i915_gem_object_lock(obj, apply->ww); in i915_gem_process_region()
Di915_gem_mman.c304 struct i915_gem_ww_ctx ww; in vm_fault_gtt() local
318 i915_gem_ww_ctx_init(&ww, true); in vm_fault_gtt()
320 ret = i915_gem_object_lock(obj, &ww); in vm_fault_gtt()
339 vma = i915_gem_object_ggtt_pin_ww(obj, &ww, NULL, 0, 0, in vm_fault_gtt()
358 vma = i915_gem_object_ggtt_pin_ww(obj, &ww, &view, 0, 0, flags); in vm_fault_gtt()
362 vma = i915_gem_object_ggtt_pin_ww(obj, &ww, &view, 0, 0, flags); in vm_fault_gtt()
373 ret = i915_gem_evict_vm(&ggtt->vm, &ww, NULL); in vm_fault_gtt()
378 vma = i915_gem_object_ggtt_pin_ww(obj, &ww, &view, 0, 0, flags); in vm_fault_gtt()
445 ret = i915_gem_ww_ctx_backoff(&ww); in vm_fault_gtt()
449 i915_gem_ww_ctx_fini(&ww); in vm_fault_gtt()
[all …]
/Linux-v6.6/drivers/gpu/drm/i915/display/
Dintel_fb_pin.c29 struct i915_gem_ww_ctx ww; in intel_pin_fb_obj_dpt() local
47 for_i915_gem_ww(&ww, ret, true) { in intel_pin_fb_obj_dpt()
48 ret = i915_gem_object_lock(obj, &ww); in intel_pin_fb_obj_dpt()
63 ret = __i915_gem_object_migrate(obj, &ww, INTEL_REGION_LMEM_0, in intel_pin_fb_obj_dpt()
85 ret = i915_vma_pin_ww(vma, &ww, 0, alignment, PIN_GLOBAL); in intel_pin_fb_obj_dpt()
116 struct i915_gem_ww_ctx ww; in intel_pin_and_fence_fb_obj() local
163 i915_gem_ww_ctx_init(&ww, true); in intel_pin_and_fence_fb_obj()
165 ret = i915_gem_object_lock(obj, &ww); in intel_pin_and_fence_fb_obj()
169 ret = i915_gem_object_migrate(obj, &ww, INTEL_REGION_LMEM_0); in intel_pin_and_fence_fb_obj()
175 vma = i915_gem_object_pin_to_display_plane(obj, &ww, alignment, in intel_pin_and_fence_fb_obj()
[all …]
/Linux-v6.6/drivers/gpu/drm/i915/gem/selftests/
Di915_gem_migrate.c53 struct i915_gem_ww_ctx ww; in igt_create_migrate() local
64 for_i915_gem_ww(&ww, err, true) { in igt_create_migrate()
65 err = i915_gem_object_lock(obj, &ww); in igt_create_migrate()
73 err = i915_gem_object_migrate(obj, &ww, dst); in igt_create_migrate()
111 static int lmem_pages_migrate_one(struct i915_gem_ww_ctx *ww, in lmem_pages_migrate_one() argument
118 err = i915_gem_object_lock(obj, ww); in lmem_pages_migrate_one()
123 err = i915_vma_pin_ww(vma, ww, obj->base.size, 0, in lmem_pages_migrate_one()
141 err = i915_gem_object_migrate(obj, ww, INTEL_REGION_SMEM); in lmem_pages_migrate_one()
160 err = i915_gem_object_migrate(obj, ww, INTEL_REGION_LMEM_0); in lmem_pages_migrate_one()
192 struct i915_gem_ww_ctx ww; in __igt_lmem_pages_migrate() local
[all …]
/Linux-v6.6/kernel/locking/
Dww_mutex.h181 ww_mutex_lock_acquired(struct ww_mutex *ww, struct ww_acquire_ctx *ww_ctx) in ww_mutex_lock_acquired() argument
190 DEBUG_LOCKS_WARN_ON(ww->ctx); in ww_mutex_lock_acquired()
202 DEBUG_LOCKS_WARN_ON(ww_ctx->contending_lock != ww); in ww_mutex_lock_acquired()
215 DEBUG_LOCKS_WARN_ON(ww_ctx->ww_class != ww->ww_class); in ww_mutex_lock_acquired()
218 ww->ctx = ww_ctx; in ww_mutex_lock_acquired()
417 struct ww_mutex *ww; in __ww_mutex_kill() local
419 ww = container_of(lock, struct ww_mutex, base); in __ww_mutex_kill()
421 ww_ctx->contending_lock = ww; in __ww_mutex_kill()
444 struct ww_mutex *ww = container_of(lock, struct ww_mutex, base); in __ww_mutex_check_kill() local
445 struct ww_acquire_ctx *hold_ctx = READ_ONCE(ww->ctx); in __ww_mutex_check_kill()
[all …]
Dmutex.c307 struct ww_mutex *ww; in ww_mutex_spin_on_owner() local
309 ww = container_of(lock, struct ww_mutex, base); in ww_mutex_spin_on_owner()
322 if (ww_ctx->acquired > 0 && READ_ONCE(ww->ctx)) in ww_mutex_spin_on_owner()
574 struct ww_mutex *ww; in __mutex_lock_common() local
584 ww = container_of(lock, struct ww_mutex, base); in __mutex_lock_common()
586 if (unlikely(ww_ctx == READ_ONCE(ww->ctx))) in __mutex_lock_common()
611 ww_mutex_set_context_fastpath(ww, ww_ctx); in __mutex_lock_common()
725 ww_mutex_lock_acquired(ww, ww_ctx); in __mutex_lock_common()
770 int ww_mutex_trylock(struct ww_mutex *ww, struct ww_acquire_ctx *ww_ctx) in ww_mutex_trylock() argument
773 return mutex_trylock(&ww->base); in ww_mutex_trylock()
[all …]
/Linux-v6.6/drivers/gpu/drm/i915/selftests/
Di915_gem.c213 struct i915_gem_ww_ctx ww; in igt_gem_ww_ctx() local
226 i915_gem_ww_ctx_init(&ww, true); in igt_gem_ww_ctx()
229 err = i915_gem_object_lock(obj, &ww); in igt_gem_ww_ctx()
231 err = i915_gem_object_lock_interruptible(obj, &ww); in igt_gem_ww_ctx()
233 err = i915_gem_object_lock_interruptible(obj2, &ww); in igt_gem_ww_ctx()
235 err = i915_gem_object_lock(obj2, &ww); in igt_gem_ww_ctx()
238 err = i915_gem_ww_ctx_backoff(&ww); in igt_gem_ww_ctx()
242 i915_gem_ww_ctx_fini(&ww); in igt_gem_ww_ctx()
Digt_spinner.c43 struct i915_gem_ww_ctx *ww, in igt_spinner_pin_obj() argument
54 ret = i915_gem_object_lock(obj, ww); in igt_spinner_pin_obj()
60 if (!ww) in igt_spinner_pin_obj()
66 if (ww) in igt_spinner_pin_obj()
67 ret = i915_vma_pin_ww(*vma, ww, 0, 0, PIN_USER); in igt_spinner_pin_obj()
81 struct i915_gem_ww_ctx *ww) in igt_spinner_pin() argument
90 vaddr = igt_spinner_pin_obj(ce, ww, spin->hws, I915_MAP_WB, &spin->hws_vma); in igt_spinner_pin()
101 vaddr = igt_spinner_pin_obj(ce, ww, spin->obj, mode, &spin->batch_vma); in igt_spinner_pin()
/Linux-v6.6/drivers/gpu/drm/i915/gt/uc/
Dintel_gsc_uc_heci_cmd_submit.c133 struct i915_gem_ww_ctx ww; in intel_gsc_uc_heci_cmd_submit_nonpriv() local
137 i915_gem_ww_ctx_init(&ww, false); in intel_gsc_uc_heci_cmd_submit_nonpriv()
139 err = i915_gem_object_lock(pkt->bb_vma->obj, &ww); in intel_gsc_uc_heci_cmd_submit_nonpriv()
142 err = i915_gem_object_lock(pkt->heci_pkt_vma->obj, &ww); in intel_gsc_uc_heci_cmd_submit_nonpriv()
145 err = intel_context_pin_ww(ce, &ww); in intel_gsc_uc_heci_cmd_submit_nonpriv()
200 err = i915_gem_ww_ctx_backoff(&ww); in intel_gsc_uc_heci_cmd_submit_nonpriv()
208 i915_gem_ww_ctx_fini(&ww); in intel_gsc_uc_heci_cmd_submit_nonpriv()
/Linux-v6.6/arch/x86/crypto/
Dcamellia_glue.c981 u64 kl, kr, ww; in camellia_setup128() local
1044 CAMELLIA_F(kl, CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R, ww); in camellia_setup128()
1045 kr ^= ww; in camellia_setup128()
1050 kr ^= ww; in camellia_setup128()
1051 CAMELLIA_F(kr, CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R, ww); in camellia_setup128()
1052 kl ^= ww; in camellia_setup128()
1089 u64 ww; /* temporary variables */ in camellia_setup256() local
1153 CAMELLIA_F(kl, CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R, ww); in camellia_setup256()
1154 kr ^= ww; in camellia_setup256()
1158 kr ^= ww ^ krr; in camellia_setup256()
[all …]
/Linux-v6.6/drivers/scsi/aic94xx/
Daic94xx_reg.c108 #define ASD_READ_SW(ww, type, ord) \ argument
109 static type asd_read_##ww##_##ord(struct asd_ha_struct *asd_ha, \
113 u32 map_offs = (reg - io_handle->ww##_base) + asd_mem_offs_##ww();\
117 #define ASD_WRITE_SW(ww, type, ord) \ argument
118 static void asd_write_##ww##_##ord(struct asd_ha_struct *asd_ha, \
122 u32 map_offs = (reg - io_handle->ww##_base) + asd_mem_offs_##ww();\

1234