Home
last modified time | relevance | path

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

12345678910>>...14

/drivers/gpu/drm/i915/
Di915_active.c33 struct i915_active *ref; member
81 struct i915_active *ref = addr; in active_debug_hint() local
83 return (void *)ref->active ?: (void *)ref->retire ?: (void *)ref; in active_debug_hint()
91 static void debug_active_init(struct i915_active *ref) in debug_active_init() argument
93 debug_object_init(ref, &active_debug_desc); in debug_active_init()
96 static void debug_active_activate(struct i915_active *ref) in debug_active_activate() argument
98 lockdep_assert_held(&ref->tree_lock); in debug_active_activate()
99 debug_object_activate(ref, &active_debug_desc); in debug_active_activate()
102 static void debug_active_deactivate(struct i915_active *ref) in debug_active_deactivate() argument
104 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),
159 #define i915_active_init(ref, active, retire) do { \ argument
163 __i915_active_init(ref, active, retire, &__mkey, &__wkey); \
167 __i915_active_ref(struct i915_active *ref, u64 idx, struct dma_fence *fence);
168 int i915_active_ref(struct i915_active *ref, u64 idx, struct dma_fence *fence);
171 i915_active_add_request(struct i915_active *ref, struct i915_request *rq) in i915_active_add_request() argument
173 return i915_active_ref(ref, in i915_active_add_request()
179 i915_active_set_exclusive(struct i915_active *ref, struct dma_fence *f);
[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/xen/
Dgrant-table.c117 void (*update_entry)(grant_ref_t ref, domid_t domid,
127 int (*end_foreign_access_ref)(grant_ref_t ref, int readonly);
135 unsigned long (*end_foreign_transfer_ref)(grant_ref_t ref);
139 unsigned long (*read_frame)(grant_ref_t ref);
169 int ref, rc = 0; in get_free_entries() local
180 ref = head = gnttab_free_head; in get_free_entries()
189 return ref; in get_free_entries()
218 static void put_free_entry(grant_ref_t ref) in put_free_entry() argument
222 gnttab_entry(ref) = gnttab_free_head; in put_free_entry()
223 gnttab_free_head = ref; in put_free_entry()
[all …]
/drivers/gpu/drm/i915/selftests/
Di915_active.c19 struct kref ref; member
25 kref_get(&active->ref); in __live_get()
34 static void __live_release(struct kref *ref) in __live_release() argument
36 struct live_active *active = container_of(ref, typeof(*active), ref); in __live_release()
43 kref_put(&active->ref, __live_release); in __live_put()
70 kref_init(&active->ref); in __live_alloc()
278 void i915_active_print(struct i915_active *ref, struct drm_printer *m) in i915_active_print() argument
280 drm_printf(m, "active %ps:%ps\n", ref->active, ref->retire); in i915_active_print()
281 drm_printf(m, "\tcount: %d\n", atomic_read(&ref->count)); in i915_active_print()
283 yesno(!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/gpu/drm/vmwgfx/
Dttm_object.c314 struct ttm_ref_object *ref; in ttm_ref_object_exists() local
325 ref = drm_hash_entry(hash, struct ttm_ref_object, hash); in ttm_ref_object_exists()
326 if (unlikely(base != ref->obj)) in ttm_ref_object_exists()
333 if (unlikely(kref_read(&ref->kref) == 0)) in ttm_ref_object_exists()
350 struct ttm_ref_object *ref; in ttm_ref_object_add() local
370 ref = drm_hash_entry(hash, struct ttm_ref_object, hash); in ttm_ref_object_add()
371 if (kref_get_unless_zero(&ref->kref)) { in ttm_ref_object_add()
381 ret = ttm_mem_global_alloc(mem_glob, sizeof(*ref), in ttm_ref_object_add()
385 ref = kmalloc(sizeof(*ref), GFP_KERNEL); in ttm_ref_object_add()
386 if (unlikely(ref == NULL)) { in ttm_ref_object_add()
[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/base/test/
Dproperty-entry-test.c392 struct fwnode_reference_args ref; in pe_test_reference() local
402 0, 0, &ref); in pe_test_reference()
404 KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &nodes[0]); in pe_test_reference()
405 KUNIT_EXPECT_EQ(test, ref.nargs, 0U); in pe_test_reference()
409 0, 1, &ref); in pe_test_reference()
413 1, 0, &ref); in pe_test_reference()
415 KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &nodes[1]); in pe_test_reference()
416 KUNIT_EXPECT_EQ(test, ref.nargs, 1U); in pe_test_reference()
417 KUNIT_EXPECT_EQ(test, ref.args[0], 1LLU); in pe_test_reference()
421 3, 0, &ref); in pe_test_reference()
[all …]
/drivers/media/v4l2-core/
Dv4l2-ctrls.c40 struct v4l2_ctrl_ref *ref; member
2194 struct v4l2_ctrl_ref *ref) in req_to_user() argument
2196 return ptr_to_user(c, ref->ctrl, ref->p_req); in req_to_user()
2319 static void new_to_req(struct v4l2_ctrl_ref *ref) in new_to_req() argument
2321 if (!ref) in new_to_req()
2323 ptr_to_ptr(ref->ctrl, ref->ctrl->p_new, ref->p_req); in new_to_req()
2324 ref->valid_p_req = true; in new_to_req()
2328 static void cur_to_req(struct v4l2_ctrl_ref *ref) in cur_to_req() argument
2330 if (!ref) in cur_to_req()
2332 ptr_to_ptr(ref->ctrl, ref->ctrl->p_cur, ref->p_req); in cur_to_req()
[all …]
/drivers/staging/media/hantro/
Dhantro_g1_vp8_dec.c375 dma_addr_t ref; in cfg_ref() local
379 ref = hantro_get_ref(ctx, hdr->last_frame_ts); in cfg_ref()
380 if (!ref) { in cfg_ref()
383 ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); in cfg_ref()
385 vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(0)); in cfg_ref()
387 ref = hantro_get_ref(ctx, hdr->golden_frame_ts); in cfg_ref()
388 if (!ref && hdr->golden_frame_ts) in cfg_ref()
391 if (!ref) in cfg_ref()
392 ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); in cfg_ref()
394 ref |= G1_REG_ADDR_REF_TOPC_E; in cfg_ref()
[all …]
Drk3399_vpu_hw_vp8_dec.c452 dma_addr_t ref; in cfg_ref() local
456 ref = hantro_get_ref(ctx, hdr->last_frame_ts); in cfg_ref()
457 if (!ref) { in cfg_ref()
460 ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); in cfg_ref()
462 vdpu_write_relaxed(vpu, ref, VDPU_REG_VP8_ADDR_REF0); in cfg_ref()
464 ref = hantro_get_ref(ctx, hdr->golden_frame_ts); in cfg_ref()
465 if (!ref && hdr->golden_frame_ts) in cfg_ref()
468 if (!ref) in cfg_ref()
469 ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); in cfg_ref()
471 ref |= VDPU_REG_VP8_GREF_SIGN_BIAS; in cfg_ref()
[all …]
/drivers/gpu/drm/i915/display/
Dintel_frontbuffer.c200 static int frontbuffer_active(struct i915_active *ref) in frontbuffer_active() argument
203 container_of(ref, typeof(*front), write); in frontbuffer_active()
205 kref_get(&front->ref); in frontbuffer_active()
210 static void frontbuffer_retire(struct i915_active *ref) in frontbuffer_retire() argument
213 container_of(ref, typeof(*front), write); in frontbuffer_retire()
219 static void frontbuffer_release(struct kref *ref) in frontbuffer_release() argument
223 container_of(ref, typeof(*front), ref); in frontbuffer_release()
256 kref_init(&front->ref); in intel_frontbuffer_get()
266 kref_get(&front->ref); in intel_frontbuffer_get()
278 kref_put_lock(&front->ref, in intel_frontbuffer_put()
/drivers/android/
Dbinder.c1184 struct binder_ref *ref; in binder_get_ref_olocked() local
1187 ref = rb_entry(n, struct binder_ref, rb_node_desc); in binder_get_ref_olocked()
1189 if (desc < ref->data.desc) { in binder_get_ref_olocked()
1191 } else if (desc > ref->data.desc) { in binder_get_ref_olocked()
1193 } else if (need_strong_ref && !ref->data.strong) { in binder_get_ref_olocked()
1197 return ref; in binder_get_ref_olocked()
1229 struct binder_ref *ref; in binder_get_ref_for_node_olocked() local
1234 ref = rb_entry(parent, struct binder_ref, rb_node_node); in binder_get_ref_for_node_olocked()
1236 if (node < ref->node) in binder_get_ref_for_node_olocked()
1238 else if (node > ref->node) in binder_get_ref_for_node_olocked()
[all …]
/drivers/iio/adc/
Dti-adc081c.c32 struct regulator *ref; member
63 err = regulator_get_voltage(adc->ref); in adc081c_read_raw()
174 adc->ref = devm_regulator_get(&client->dev, "vref"); in adc081c_probe()
175 if (IS_ERR(adc->ref)) in adc081c_probe()
176 return PTR_ERR(adc->ref); in adc081c_probe()
178 err = regulator_enable(adc->ref); in adc081c_probe()
206 regulator_disable(adc->ref); in adc081c_probe()
218 regulator_disable(adc->ref); in adc081c_remove()
Dti-adc161s626.c69 struct regulator *ref; member
152 ret = regulator_get_voltage(data->ref); in ti_adc_read_raw()
205 data->ref = devm_regulator_get(&spi->dev, "vdda"); in ti_adc_probe()
206 if (!IS_ERR(data->ref)) { in ti_adc_probe()
207 ret = regulator_enable(data->ref); in ti_adc_probe()
227 regulator_disable(data->ref); in ti_adc_probe()
239 regulator_disable(data->ref); in ti_adc_remove()
Dltc2497-core.c93 ret = regulator_get_voltage(ddata->ref); in ltc2497core_read_raw()
182 ddata->ref = devm_regulator_get(dev, "vref"); in ltc2497core_probe()
183 if (IS_ERR(ddata->ref)) in ltc2497core_probe()
184 return dev_err_probe(dev, PTR_ERR(ddata->ref), in ltc2497core_probe()
187 ret = regulator_enable(ddata->ref); in ltc2497core_probe()
219 regulator_disable(ddata->ref); in ltc2497core_probe()
233 regulator_disable(ddata->ref); in ltc2497core_remove()
/drivers/infiniband/sw/rxe/
Drxe_mmap.c17 void rxe_mmap_release(struct kref *ref) in rxe_mmap_release() argument
19 struct rxe_mmap_info *ip = container_of(ref, in rxe_mmap_release()
20 struct rxe_mmap_info, ref); in rxe_mmap_release()
42 kref_get(&ip->ref); in rxe_vma_open()
49 kref_put(&ip->ref, rxe_mmap_release); in rxe_vma_close()
146 kref_init(&ip->ref); in rxe_create_mmap_info()
/drivers/nvme/target/
Dcore.c426 percpu_ref_get(&ns->ref); in nvmet_find_namespace()
431 static void nvmet_destroy_namespace(struct percpu_ref *ref) in nvmet_destroy_namespace() argument
433 struct nvmet_ns *ns = container_of(ref, struct nvmet_ns, ref); in nvmet_destroy_namespace()
440 percpu_ref_put(&ns->ref); in nvmet_put_namespace()
579 ret = percpu_ref_init(&ns->ref, nvmet_destroy_namespace, in nvmet_ns_enable()
602 percpu_ref_exit(&ns->ref); in nvmet_ns_enable()
638 percpu_ref_kill(&ns->ref); in nvmet_ns_disable()
641 percpu_ref_exit(&ns->ref); in nvmet_ns_disable()
755 percpu_ref_put(&sq->ref); in nvmet_req_complete()
776 static void nvmet_confirm_sq(struct percpu_ref *ref) in nvmet_confirm_sq() argument
[all …]
/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()
/drivers/infiniband/sw/rdmavt/
Dmmap.c70 void rvt_release_mmap_info(struct kref *ref) in rvt_release_mmap_info() argument
73 container_of(ref, struct rvt_mmap_info, ref); in rvt_release_mmap_info()
88 kref_get(&ip->ref); in rvt_vma_open()
95 kref_put(&ip->ref, rvt_release_mmap_info); in rvt_vma_close()
185 kref_init(&ip->ref); in rvt_create_mmap_info()
/drivers/macintosh/
Dwindfarm_ad7417_sensor.c27 struct kref ref; member
152 static void wf_ad7417_release(struct kref *ref) in wf_ad7417_release() argument
154 struct wf_ad7417_priv *pv = container_of(ref, in wf_ad7417_release()
155 struct wf_ad7417_priv, ref); in wf_ad7417_release()
164 kref_put(&pv->ref, wf_ad7417_release); in wf_ad7417_sensor_release()
187 kref_get(&pv->ref); in wf_ad7417_add_sensor()
268 kref_init(&pv->ref); in wf_ad7417_probe()
304 kref_put(&pv->ref, wf_ad7417_release); in wf_ad7417_remove()
Dwindfarm_smu_sat.c28 struct kref ref; member
168 static void wf_sat_release(struct kref *ref) in wf_sat_release() argument
170 struct wf_sat *sat = container_of(ref, struct wf_sat, ref); in wf_sat_release()
184 kref_put(&sat->ref, wf_sat_release); in wf_sat_sensor_release()
212 kref_init(&sat->ref); in wf_sat_probe()
283 kref_get(&sat->ref); in wf_sat_probe()
310 kref_get(&sat->ref); in wf_sat_probe()
333 kref_put(&sat->ref, wf_sat_release); in wf_sat_remove()
Dwindfarm_core.c151 struct wf_control *ct = container_of(kref, struct wf_control, ref); in wf_control_release()
222 kref_init(&new_ct->ref); in wf_register_control()
252 kref_put(&ct->ref, wf_control_release); in wf_unregister_control()
260 kref_get(&ct->ref); in wf_get_control()
268 kref_put(&ct->ref, wf_control_release); in wf_put_control()
281 struct wf_sensor *sr = container_of(kref, struct wf_sensor, ref); in wf_sensor_release()
317 kref_init(&new_sr->ref); in wf_register_sensor()
355 kref_get(&sr->ref); in wf_get_sensor()
363 kref_put(&sr->ref, wf_sensor_release); in wf_put_sensor()
/drivers/clk/imx/
Dclk-sscg-pll.c79 uint64_t ref; member
192 uint64_t ref) in clk_sscg_pll2_find_setup() argument
196 if (ref < PLL_STAGE1_MIN_FREQ || ref > PLL_STAGE1_MAX_FREQ) in clk_sscg_pll2_find_setup()
199 temp_setup->vco1 = ref; in clk_sscg_pll2_find_setup()
212 uint64_t vco1 = temp_setup->ref; in clk_sscg_divf1_lookup()
235 temp_setup->ref_div1 = temp_setup->ref; in clk_sscg_divr1_lookup()
250 uint64_t ref) in clk_sscg_pll1_find_setup() argument
254 if (ref < PLL_REF_MIN_FREQ || ref > PLL_REF_MAX_FREQ) in clk_sscg_pll1_find_setup()
257 temp_setup->ref = ref; in clk_sscg_pll1_find_setup()

12345678910>>...14