Home
last modified time | relevance | path

Searched refs:ref (Results 1 – 25 of 476) sorted by relevance

12345678910>>...20

/drivers/gpu/drm/i915/
Di915_active.c29 struct i915_active *ref; member
77 struct i915_active *ref = addr; in active_debug_hint() local
79 return (void *)ref->active ?: (void *)ref->retire ?: (void *)ref; in active_debug_hint()
87 static void debug_active_init(struct i915_active *ref) in debug_active_init() argument
89 debug_object_init(ref, &active_debug_desc); in debug_active_init()
92 static void debug_active_activate(struct i915_active *ref) in debug_active_activate() argument
94 lockdep_assert_held(&ref->tree_lock); in debug_active_activate()
95 debug_object_activate(ref, &active_debug_desc); in debug_active_activate()
98 static void debug_active_deactivate(struct i915_active *ref) in debug_active_deactivate() argument
100 lockdep_assert_held(&ref->tree_lock); in debug_active_deactivate()
[all …]
Di915_active.h152 void __i915_active_init(struct i915_active *ref,
153 int (*active)(struct i915_active *ref),
154 void (*retire)(struct i915_active *ref),
160 #define i915_active_init(ref, active, retire, flags) do { \ argument
164 __i915_active_init(ref, active, retire, flags, &__mkey, &__wkey); \
167 int i915_active_add_request(struct i915_active *ref, struct i915_request *rq);
170 i915_active_set_exclusive(struct i915_active *ref, struct dma_fence *f);
172 int __i915_active_wait(struct i915_active *ref, int state);
173 static inline int i915_active_wait(struct i915_active *ref) in i915_active_wait() argument
175 return __i915_active_wait(ref, TASK_INTERRUPTIBLE); in i915_active_wait()
[all …]
/drivers/clk/mxs/
Dclk-ref.c33 struct clk_ref *ref = to_clk_ref(hw); in clk_ref_enable() local
35 writel_relaxed(1 << ((ref->idx + 1) * 8 - 1), ref->reg + CLR); in clk_ref_enable()
42 struct clk_ref *ref = to_clk_ref(hw); in clk_ref_disable() local
44 writel_relaxed(1 << ((ref->idx + 1) * 8 - 1), ref->reg + SET); in clk_ref_disable()
50 struct clk_ref *ref = to_clk_ref(hw); in clk_ref_recalc_rate() local
52 u8 frac = (readl_relaxed(ref->reg) >> (ref->idx * 8)) & 0x3f; in clk_ref_recalc_rate()
86 struct clk_ref *ref = to_clk_ref(hw); in clk_ref_set_rate() local
90 u8 frac, shift = ref->idx * 8; in clk_ref_set_rate()
103 val = readl_relaxed(ref->reg); in clk_ref_set_rate()
106 writel_relaxed(val, ref->reg); in clk_ref_set_rate()
[all …]
/drivers/gpu/drm/i915/selftests/
Di915_active.c20 struct kref ref; member
26 kref_get(&active->ref); in __live_get()
35 static void __live_release(struct kref *ref) in __live_release() argument
37 struct live_active *active = container_of(ref, typeof(*active), ref); in __live_release()
44 kref_put(&active->ref, __live_release); in __live_put()
71 kref_init(&active->ref); in __live_alloc()
279 void i915_active_print(struct i915_active *ref, struct drm_printer *m) in i915_active_print() argument
281 drm_printf(m, "active %ps:%ps\n", ref->active, ref->retire); in i915_active_print()
282 drm_printf(m, "\tcount: %d\n", atomic_read(&ref->count)); in i915_active_print()
284 str_yes_no(!llist_empty(&ref->preallocated_barriers))); in i915_active_print()
[all …]
Dlib_sw_fence.c87 struct kref ref; member
117 refcount_set(&h->ref.refcount, 2); in heap_fence_create()
122 static void heap_fence_release(struct kref *ref) in heap_fence_release() argument
124 struct heap_fence *h = container_of(ref, typeof(*h), ref); in heap_fence_release()
135 kref_put(&h->ref, heap_fence_release); in heap_fence_put()
/drivers/xen/
Dgrant-table.c139 void (*update_entry)(grant_ref_t ref, domid_t domid,
148 int (*end_foreign_access_ref)(grant_ref_t ref);
152 unsigned long (*read_frame)(grant_ref_t ref);
182 int ref, rc = 0; in get_free_entries() local
193 ref = head = gnttab_free_head; in get_free_entries()
212 return ref; in get_free_entries()
331 static void put_free_entry_locked(grant_ref_t ref) in put_free_entry_locked() argument
333 if (unlikely(ref < GNTTAB_NR_RESERVED_ENTRIES)) in put_free_entry_locked()
336 gnttab_entry(ref) = gnttab_free_head; in put_free_entry_locked()
337 gnttab_free_head = ref; in put_free_entry_locked()
[all …]
/drivers/misc/lkdtm/
Drefcount.c9 static void overflow_check(refcount_t *ref) in overflow_check() argument
11 switch (refcount_read(ref)) { in overflow_check()
19 pr_err("Fail: refcount wrapped to %d\n", refcount_read(ref)); in overflow_check()
84 static void check_zero(refcount_t *ref) in check_zero() argument
86 switch (refcount_read(ref)) { in check_zero()
97 pr_err("Fail: refcount went crazy: %d\n", refcount_read(ref)); in check_zero()
119 static void check_negative(refcount_t *ref, int start) in check_negative() argument
126 if (refcount_read(ref) == start) { in check_negative()
132 switch (refcount_read(ref)) { in check_negative()
140 pr_err("Fail: refcount went crazy: %d\n", refcount_read(ref)); in check_negative()
[all …]
/drivers/gpu/drm/vmwgfx/
Dttm_object.c298 struct ttm_ref_object *ref; in ttm_ref_object_add() local
313 ref = hlist_entry(hash, struct ttm_ref_object, hash); in ttm_ref_object_add()
314 if (kref_get_unless_zero(&ref->kref)) { in ttm_ref_object_add()
324 ref = kmalloc(sizeof(*ref), GFP_KERNEL); in ttm_ref_object_add()
325 if (unlikely(ref == NULL)) { in ttm_ref_object_add()
329 ref->hash.key = base->handle; in ttm_ref_object_add()
330 ref->obj = base; in ttm_ref_object_add()
331 ref->tfile = tfile; in ttm_ref_object_add()
332 kref_init(&ref->kref); in ttm_ref_object_add()
335 hash_add_rcu(tfile->ref_hash, &ref->hash.head, ref->hash.key); in ttm_ref_object_add()
[all …]
/drivers/base/test/
Dproperty-entry-test.c425 struct fwnode_reference_args ref; in pe_test_reference() local
435 0, 0, &ref); in pe_test_reference()
437 KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &node1); in pe_test_reference()
438 KUNIT_EXPECT_EQ(test, ref.nargs, 0U); in pe_test_reference()
442 0, 1, &ref); in pe_test_reference()
446 1, 0, &ref); in pe_test_reference()
448 KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &node2); in pe_test_reference()
449 KUNIT_EXPECT_EQ(test, ref.nargs, 1U); in pe_test_reference()
450 KUNIT_EXPECT_EQ(test, ref.args[0], 1LLU); in pe_test_reference()
454 3, 0, &ref); in pe_test_reference()
[all …]
/drivers/media/v4l2-core/
Dv4l2-ctrls-request.c56 struct v4l2_ctrl_ref *ref; in v4l2_ctrl_request_clone() local
68 list_for_each_entry(ref, &from->ctrl_refs, node) { in v4l2_ctrl_request_clone()
69 struct v4l2_ctrl *ctrl = ref->ctrl; in v4l2_ctrl_request_clone()
73 if (ref->from_other_dev) in v4l2_ctrl_request_clone()
144 struct v4l2_ctrl_ref *ref = find_ref_lock(hdl, id); in v4l2_ctrl_request_hdl_ctrl_find() local
146 return (ref && ref->p_req_valid) ? ref->ctrl : NULL; in v4l2_ctrl_request_hdl_ctrl_find()
329 struct v4l2_ctrl_ref *ref; in v4l2_ctrl_request_complete() local
361 list_for_each_entry(ref, &hdl->ctrl_refs, node) { in v4l2_ctrl_request_complete()
362 struct v4l2_ctrl *ctrl = ref->ctrl; in v4l2_ctrl_request_complete()
372 new_to_req(ref); in v4l2_ctrl_request_complete()
[all …]
Dv4l2-ctrls-api.c26 struct v4l2_ctrl_ref *ref; member
84 struct v4l2_ctrl_ref *ref) in req_to_user() argument
86 return ptr_to_user(c, ref->ctrl, ref->p_req); in req_to_user()
225 struct v4l2_ctrl_ref *ref; in prepare_ext_ctrls() local
250 ref = find_ref_lock(hdl, id); in prepare_ext_ctrls()
251 if (!ref) { in prepare_ext_ctrls()
255 h->ref = ref; in prepare_ext_ctrls()
256 ctrl = ref->ctrl; in prepare_ext_ctrls()
265 ref = find_ref_lock(hdl, ctrl->cluster[0]->id); in prepare_ext_ctrls()
271 tot_size *= ref->p_req_elems; in prepare_ext_ctrls()
[all …]
Dv4l2-ctrls-core.c1364 static bool req_alloc_array(struct v4l2_ctrl_ref *ref, u32 elems) in req_alloc_array() argument
1368 if (elems == ref->p_req_array_alloc_elems) in req_alloc_array()
1370 if (ref->ctrl->is_dyn_array && in req_alloc_array()
1371 elems < ref->p_req_array_alloc_elems) in req_alloc_array()
1374 tmp = kvmalloc(elems * ref->ctrl->elem_size, GFP_KERNEL); in req_alloc_array()
1377 ref->p_req_array_enomem = true; in req_alloc_array()
1380 ref->p_req_array_enomem = false; in req_alloc_array()
1381 kvfree(ref->p_req.p); in req_alloc_array()
1382 ref->p_req.p = tmp; in req_alloc_array()
1383 ref->p_req_array_alloc_elems = elems; in req_alloc_array()
[all …]
/drivers/net/ethernet/mellanox/mlx5/core/lib/
Ddevcom.c22 struct kref ref; member
31 struct kref ref; member
64 kref_init(&devc->ref); in mlx5_devcom_dev_alloc()
93 mlx5_devcom_dev_release(struct kref *ref) in mlx5_devcom_dev_release() argument
95 struct mlx5_devcom_dev *devc = container_of(ref, struct mlx5_devcom_dev, ref); in mlx5_devcom_dev_release()
106 kref_put(&devc->ref, mlx5_devcom_dev_release); in mlx5_devcom_unregister_device()
122 kref_init(&comp->ref); in mlx5_devcom_comp_alloc()
129 mlx5_devcom_comp_release(struct kref *ref) in mlx5_devcom_comp_release() argument
131 struct mlx5_devcom_comp *comp = container_of(ref, struct mlx5_devcom_comp, ref); in mlx5_devcom_comp_release()
150 kref_get(&devc->ref); in devcom_alloc_comp_dev()
[all …]
/drivers/media/platform/verisilicon/
Dhantro_g1_vp8_dec.c374 dma_addr_t ref; in cfg_ref() local
377 ref = hantro_get_ref(ctx, hdr->last_frame_ts); in cfg_ref()
378 if (!ref) { in cfg_ref()
381 ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); in cfg_ref()
383 vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(0)); in cfg_ref()
385 ref = hantro_get_ref(ctx, hdr->golden_frame_ts); in cfg_ref()
386 if (!ref && hdr->golden_frame_ts) in cfg_ref()
389 if (!ref) in cfg_ref()
390 ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); in cfg_ref()
392 ref |= G1_REG_ADDR_REF_TOPC_E; in cfg_ref()
[all …]
Drockchip_vpu2_hw_vp8_dec.c451 dma_addr_t ref; in cfg_ref() local
453 ref = hantro_get_ref(ctx, hdr->last_frame_ts); in cfg_ref()
454 if (!ref) { in cfg_ref()
457 ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); in cfg_ref()
459 vdpu_write_relaxed(vpu, ref, VDPU_REG_VP8_ADDR_REF0); in cfg_ref()
461 ref = hantro_get_ref(ctx, hdr->golden_frame_ts); in cfg_ref()
462 if (!ref && hdr->golden_frame_ts) in cfg_ref()
465 if (!ref) in cfg_ref()
466 ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); in cfg_ref()
468 ref |= VDPU_REG_VP8_GREF_SIGN_BIAS; in cfg_ref()
[all …]
/drivers/cdx/controller/
Dmcdi.c61 static void cdx_mcdi_cmd_release(struct kref *ref) in cdx_mcdi_cmd_release() argument
63 kfree(container_of(ref, struct cdx_mcdi_cmd, ref)); in cdx_mcdi_cmd_release()
82 kref_get(&cmd->ref); in _cdx_mcdi_remove_cmd()
93 kref_put(&cmd->ref, cdx_mcdi_cmd_release); in cdx_mcdi_remove_cmd()
335 kref_put(&cmd->ref, cdx_mcdi_cmd_release); in cdx_mcdi_process_cleanup_list()
394 struct kref ref; member
403 static void cdx_mcdi_blocking_data_release(struct kref *ref) in cdx_mcdi_blocking_data_release() argument
405 kfree(container_of(ref, struct cdx_mcdi_blocking_data, ref)); in cdx_mcdi_blocking_data_release()
423 kref_put(&wait_data->ref, cdx_mcdi_blocking_data_release); in cdx_mcdi_rpc_completer()
449 kref_init(&wait_data->ref); in cdx_mcdi_rpc_sync()
[all …]
/drivers/android/
Dbinder.c1205 struct binder_ref *ref; in binder_get_ref_olocked() local
1208 ref = rb_entry(n, struct binder_ref, rb_node_desc); in binder_get_ref_olocked()
1210 if (desc < ref->data.desc) { in binder_get_ref_olocked()
1212 } else if (desc > ref->data.desc) { in binder_get_ref_olocked()
1214 } else if (need_strong_ref && !ref->data.strong) { in binder_get_ref_olocked()
1218 return ref; in binder_get_ref_olocked()
1227 struct binder_ref *ref; in slow_desc_lookup_olocked() local
1233 ref = rb_entry(n, struct binder_ref, rb_node_desc); in slow_desc_lookup_olocked()
1234 if (ref->data.desc > desc) in slow_desc_lookup_olocked()
1236 desc = ref->data.desc + 1; in slow_desc_lookup_olocked()
[all …]
/drivers/gpu/drm/i915/display/
Dintel_frontbuffer.c205 static int frontbuffer_active(struct i915_active *ref) in frontbuffer_active() argument
208 container_of(ref, typeof(*front), write); in frontbuffer_active()
210 kref_get(&front->ref); in frontbuffer_active()
214 static void frontbuffer_retire(struct i915_active *ref) in frontbuffer_retire() argument
217 container_of(ref, typeof(*front), write); in frontbuffer_retire()
223 static void frontbuffer_release(struct kref *ref) in frontbuffer_release() argument
227 container_of(ref, typeof(*front), ref); in frontbuffer_release()
258 kref_init(&front->ref); in intel_frontbuffer_get()
275 kref_put_lock(&front->ref, in intel_frontbuffer_put()
/drivers/gpu/host1x/
Dsyncpt.c71 for (i = 0; i < host->info->nb_pts && kref_read(&sp->ref); i++, sp++) in host1x_syncpt_alloc()
94 kref_init(&sp->ref); in host1x_syncpt_alloc()
314 kref_init(&host->syncpt[26].ref); in host1x_syncpt_init()
315 kref_init(&host->syncpt[27].ref); in host1x_syncpt_init()
340 static void syncpt_release(struct kref *ref) in syncpt_release() argument
342 struct host1x_syncpt *sp = container_of(ref, struct host1x_syncpt, ref); in syncpt_release()
372 kref_put(&sp->ref, syncpt_release); in host1x_syncpt_put()
451 if (kref_get_unless_zero(&host->syncpt[id].ref)) in host1x_syncpt_get_by_id()
480 kref_get(&sp->ref); in host1x_syncpt_get()
506 static void do_nothing(struct kref *ref) in do_nothing() argument
[all …]
/drivers/infiniband/sw/rxe/
Drxe_mmap.c16 void rxe_mmap_release(struct kref *ref) in rxe_mmap_release() argument
18 struct rxe_mmap_info *ip = container_of(ref, in rxe_mmap_release()
19 struct rxe_mmap_info, ref); in rxe_mmap_release()
41 kref_get(&ip->ref); in rxe_vma_open()
48 kref_put(&ip->ref, rxe_mmap_release); in rxe_vma_close()
145 kref_init(&ip->ref); in rxe_create_mmap_info()
/drivers/nvme/target/
Dcore.c438 percpu_ref_get(&req->ns->ref); in nvmet_req_find_ns()
442 static void nvmet_destroy_namespace(struct percpu_ref *ref) in nvmet_destroy_namespace() argument
444 struct nvmet_ns *ns = container_of(ref, struct nvmet_ns, ref); in nvmet_destroy_namespace()
451 percpu_ref_put(&ns->ref); in nvmet_put_namespace()
589 ret = percpu_ref_init(&ns->ref, nvmet_destroy_namespace, in nvmet_ns_enable()
612 percpu_ref_exit(&ns->ref); in nvmet_ns_enable()
648 percpu_ref_kill(&ns->ref); in nvmet_ns_disable()
651 percpu_ref_exit(&ns->ref); in nvmet_ns_disable()
765 percpu_ref_put(&sq->ref); in nvmet_req_complete()
786 static void nvmet_confirm_sq(struct percpu_ref *ref) in nvmet_confirm_sq() argument
[all …]
/drivers/iio/adc/
Dti-adc081c.c32 struct regulator *ref; member
63 err = regulator_get_voltage(adc->ref); in adc081c_read_raw()
179 adc->ref = devm_regulator_get(&client->dev, "vref"); in adc081c_probe()
180 if (IS_ERR(adc->ref)) in adc081c_probe()
181 return PTR_ERR(adc->ref); in adc081c_probe()
183 err = regulator_enable(adc->ref); in adc081c_probe()
188 adc->ref); in adc081c_probe()
Dti-adc161s626.c69 struct regulator *ref; member
152 ret = regulator_get_voltage(data->ref); in ti_adc_read_raw()
209 data->ref = devm_regulator_get(&spi->dev, "vdda"); in ti_adc_probe()
210 if (IS_ERR(data->ref)) in ti_adc_probe()
211 return PTR_ERR(data->ref); in ti_adc_probe()
213 ret = regulator_enable(data->ref); in ti_adc_probe()
218 data->ref); in ti_adc_probe()
/drivers/infiniband/sw/rdmavt/
Dmmap.c28 void rvt_release_mmap_info(struct kref *ref) in rvt_release_mmap_info() argument
31 container_of(ref, struct rvt_mmap_info, ref); in rvt_release_mmap_info()
46 kref_get(&ip->ref); in rvt_vma_open()
53 kref_put(&ip->ref, rvt_release_mmap_info); in rvt_vma_close()
143 kref_init(&ip->ref); in rvt_create_mmap_info()
/drivers/gpu/drm/nouveau/nvkm/engine/sw/
Dnv04.c36 atomic_t ref; member
53 args->v0.ref = atomic_read(&chan->ref); in nv04_nvsw_mthd_get_ref()
94 atomic_set(&chan->ref, data); in nv04_sw_chan_mthd()
116 atomic_set(&chan->ref, 0); in nv04_sw_chan_new()

12345678910>>...20