| /drivers/gpu/drm/i915/ |
| A D | i915_active.c | 79 return (void *)ref->active ?: (void *)ref->retire ?: (void *)ref; in active_debug_hint() 143 ref->cache = fetch_node(ref->tree.rb_node); in __active_retire() 148 rb_erase(&ref->cache->node, &ref->tree); in __active_retire() 153 rb_insert_color(&ref->cache->node, &ref->tree); in __active_retire() 154 GEM_BUG_ON(ref->tree.rb_node != &ref->cache->node); in __active_retire() 164 ref->retire(ref); in __active_retire() 325 node->ref = ref; in active_instance() 486 return __i915_active_set_fence(ref, &ref->excl, f); in i915_active_set_exclusive() 520 err = ref->active(ref); in i915_active_acquire() 667 wb->ref = ref; in __await_barrier() [all …]
|
| A D | i915_active.h | 152 void __i915_active_init(struct i915_active *ref, 153 int (*active)(struct i915_active *ref), 154 void (*retire)(struct i915_active *ref), 179 struct i915_active *ref, 182 struct i915_active *ref, 188 int i915_active_acquire(struct i915_active *ref); 195 GEM_BUG_ON(!atomic_read(&ref->count)); in __i915_active_acquire() 196 atomic_inc(&ref->count); in __i915_active_acquire() 202 return !atomic_read(&ref->count); in i915_active_is_idle() 205 void i915_active_fini(struct i915_active *ref); [all …]
|
| /drivers/dpll/ |
| A D | dpll_core.c | 95 ref = kzalloc(sizeof(*ref), GFP_KERNEL); in dpll_xa_ref_pin_add() 96 if (!ref) in dpll_xa_ref_pin_add() 102 kfree(ref); in dpll_xa_ref_pin_add() 112 kfree(ref); in dpll_xa_ref_pin_add() 145 kfree(ref); in dpll_xa_ref_pin_del() 176 ref = kzalloc(sizeof(*ref), GFP_KERNEL); in dpll_xa_ref_dpll_add() 177 if (!ref) in dpll_xa_ref_dpll_add() 183 kfree(ref); in dpll_xa_ref_dpll_add() 239 return ref; in dpll_xa_ref_dpll_first() 876 if (!ref) in dpll_pin_on_dpll_priv() [all …]
|
| A D | dpll_netlink.c | 517 ppin = ref->pin; in dpll_msg_add_pin_parents() 867 dpll = ref->dpll; in dpll_pin_freq_set() 879 dpll = ref->dpll; in dpll_pin_freq_set() 883 failed = ref; in dpll_pin_freq_set() 929 dpll = ref->dpll; in dpll_pin_esync_set() 956 failed = ref; in dpll_pin_esync_set() 1015 dpll = ref->dpll; in dpll_pin_ref_sync_state_set() 1035 failed = ref; in dpll_pin_ref_sync_state_set() 1236 dpll = ref->dpll; in dpll_pin_phase_adj_set() 1255 failed = ref; in dpll_pin_phase_adj_set() [all …]
|
| /drivers/clk/mxs/ |
| A D | clk-ref.c | 35 writel_relaxed(1 << ((ref->idx + 1) * 8 - 1), ref->reg + CLR); in clk_ref_enable() 44 writel_relaxed(1 << ((ref->idx + 1) * 8 - 1), ref->reg + SET); in clk_ref_disable() 52 u8 frac = (readl_relaxed(ref->reg) >> (ref->idx * 8)) & 0x3f; in clk_ref_recalc_rate() 85 u8 frac, shift = ref->idx * 8; in clk_ref_set_rate() 114 struct clk_ref *ref; in mxs_clk_ref() local 118 ref = kzalloc(sizeof(*ref), GFP_KERNEL); in mxs_clk_ref() 119 if (!ref) in mxs_clk_ref() 128 ref->reg = reg; in mxs_clk_ref() 129 ref->idx = idx; in mxs_clk_ref() 130 ref->hw.init = &init; in mxs_clk_ref() [all …]
|
| /drivers/gpu/drm/i915/selftests/ |
| A D | i915_active.c | 20 struct kref ref; member 26 kref_get(&active->ref); in __live_get() 37 struct live_active *active = container_of(ref, typeof(*active), ref); in __live_release() 71 kref_init(&active->ref); in __live_alloc() 281 drm_printf(m, "active %ps:%ps\n", ref->active, ref->retire); in i915_active_print() 305 i915_active_release(ref); in i915_active_print() 327 atomic_dec(&ref->count); in active_flush() 339 active_flush(ref, &ref->excl); in i915_active_unlock_wait() 341 active_flush(ref, &it->base); in i915_active_unlock_wait() 344 i915_active_release(ref); in i915_active_unlock_wait() [all …]
|
| A D | lib_sw_fence.c | 87 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/ |
| A D | grant-table.c | 182 int ref, rc = 0; in get_free_entries() local 212 return ref; in get_free_entries() 416 int ref; in gnttab_grant_foreign_access() local 419 if (unlikely(ref < 0)) in gnttab_grant_foreign_access() 424 return ref; in gnttab_grant_foreign_access() 491 grant_ref_t ref; member 570 entry->ref = ref; in gnttab_add_deferred() 597 put_free_entry(ref); in gnttab_try_end_foreign_access() 615 put_free_entry(ref); in gnttab_free_grant_reference() 621 grant_ref_t ref; in gnttab_free_grant_references() local [all …]
|
| /drivers/net/wireless/realtek/rtw89/ |
| A D | chan.c | 1052 ref->crtz = crtz; in rtw89_mcc_assign_pattern() 1064 if (RTW89_MCC_REQ_COURTESY(pattern, ref) && ref->is_gc) in rtw89_mcc_assign_pattern() 1144 lower = max_t(s16, lower, ref->duration - ref->limit.max_tob); in __rtw89_mcc_calc_pattern_loose() 1221 ref->duration - ref->limit.max_tob); in __rtw89_mcc_calc_pattern_strict() 1344 if (ref->is_go || ref->is_gc) in __rtw89_mcc_calc_pattern_anchor() 1371 ref->duration > ref->limit.max_tob + ref->limit.max_toa) { in rtw89_mcc_calc_pattern() 1653 if (ref->is_2ghz) in rtw89_mcc_duration_decision_on_bt() 1985 if (ref->crtz) { in __mrc_fw_add_courtesy() 2208 if (ref->is_go) { in rtw89_mcc_handle_beacon_noa() 2250 if (ref->is_go) in rtw89_mcc_start_beacon_noa() [all …]
|
| /drivers/misc/lkdtm/ |
| A D | refcount.c | 9 static void overflow_check(refcount_t *ref) in overflow_check() argument 11 switch (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() 126 if (refcount_read(ref) == start) { in check_negative() 132 switch (refcount_read(ref)) { in check_negative() 200 static void check_from_zero(refcount_t *ref) in check_from_zero() argument 202 switch (refcount_read(ref)) { in check_from_zero() 214 refcount_read(ref)); in check_from_zero() 267 static void check_saturated(refcount_t *ref) in check_saturated() argument [all …]
|
| /drivers/dpll/zl3073x/ |
| A D | dpll.c | 297 u8 ref; in zl3073x_dpll_input_pin_frequency_get() local 320 u8 ref; in zl3073x_dpll_input_pin_frequency_set() local 472 zldpll->forced_ref = ref; in zl3073x_dpll_selected_ref_set() 603 u8 ref; in zl3073x_dpll_input_pin_phase_adjust_get() local 643 u8 ref; in zl3073x_dpll_input_pin_phase_adjust_set() local 685 u8 ref, ref_prio; in zl3073x_dpll_ref_prio_get() local 726 u8 ref, ref_prio; in zl3073x_dpll_ref_prio_set() local 778 u8 ref, ref_conn, status; in zl3073x_dpll_ref_state_get() local 788 if (ref == ref_conn) { in zl3073x_dpll_ref_state_get() 2007 u8 ref; in zl3073x_dpll_pin_phase_offset_check() local [all …]
|
| /drivers/gpu/drm/vmwgfx/ |
| A D | ttm_object.c | 295 struct ttm_ref_object *ref; in ttm_ref_object_add() local 321 ref = kmalloc(sizeof(*ref), GFP_KERNEL); in ttm_ref_object_add() 327 ref->obj = base; in ttm_ref_object_add() 328 ref->tfile = tfile; in ttm_ref_object_add() 329 kref_init(&ref->kref); in ttm_ref_object_add() 332 hash_add_rcu(tfile->ref_hash, &ref->hash.head, ref->hash.key); in ttm_ref_object_add() 348 struct ttm_ref_object *ref = in ttm_ref_object_release() local 353 list_del(&ref->head); in ttm_ref_object_release() 357 kfree_rcu(ref, rcu_head); in ttm_ref_object_release() 364 struct ttm_ref_object *ref; in ttm_ref_object_base_unref() local [all …]
|
| /drivers/base/test/ |
| A D | property-entry-test.c | 425 struct fwnode_reference_args ref; in pe_test_reference() local 435 0, 0, &ref); 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() 449 KUNIT_EXPECT_EQ(test, ref.nargs, 1U); in pe_test_reference() 454 3, 0, &ref); in pe_test_reference() 464 2, 1, &ref); in pe_test_reference() 469 0, 0, &ref); in pe_test_reference() 476 2, 1, &ref); in pe_test_reference() [all …]
|
| /drivers/media/v4l2-core/ |
| A D | v4l2-ctrls-request.c | 56 struct v4l2_ctrl_ref *ref; in v4l2_ctrl_request_clone() local 69 struct v4l2_ctrl *ctrl = ref->ctrl; in v4l2_ctrl_request_clone() 73 if (ref->from_other_dev) in v4l2_ctrl_request_clone() 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 362 struct v4l2_ctrl *ctrl = ref->ctrl; in v4l2_ctrl_request_complete() 372 new_to_req(ref); in v4l2_ctrl_request_complete() 376 if (ref->p_req_valid) in v4l2_ctrl_request_complete() 381 cur_to_req(ref); in v4l2_ctrl_request_complete() 400 struct v4l2_ctrl_ref *ref; in v4l2_ctrl_request_setup() local [all …]
|
| A D | v4l2-ctrls-api.c | 86 return ptr_to_user(c, ref->ctrl, ref->p_req); in req_to_user() 267 if (!ref) { in prepare_ext_ctrls() 271 h->ref = ref; in prepare_ext_ctrls() 272 ctrl = ref->ctrl; in prepare_ext_ctrls() 335 h->mref = ref; in prepare_ext_ctrls() 490 struct v4l2_ctrl_ref *ref = helpers[idx].ref; in v4l2_g_ext_ctrls_common() local 1100 ref = NULL; in v4l2_query_ext_ctrl() 1106 ref = pos; in v4l2_query_ext_ctrl() 1124 ref = pos; in v4l2_query_ext_ctrl() 1132 if (!ref) in v4l2_query_ext_ctrl() [all …]
|
| A D | v4l2-ctrls-core.c | 1474 if (!ref) in new_to_req() 1482 ptr_to_ptr(ctrl, ctrl->p_new, ref->p_req, ref->p_req_elems); in new_to_req() 1491 if (!ref) in cur_to_req() 1508 if (!ref) in req_to_new() 1654 kfree(ref); in v4l2_ctrl_handler_free() 1720 while (ref && ref->ctrl->id != id) in find_ref() 1721 ref = ref->next; in find_ref() 1723 if (ref) in find_ref() 1725 return ref; in find_ref() 1738 return ref; in find_ref_lock() [all …]
|
| /drivers/android/ |
| A D | binder.c | 1197 ref->proc->pid, ref->data.debug_id, ref->data.desc, in binder_cleanup_ref_olocked() 1227 ref->proc->pid, ref->data.debug_id, in binder_cleanup_ref_olocked() 1288 ref->proc->pid, ref->data.debug_id, in binder_dec_ref_olocked() 1289 ref->data.desc, ref->data.strong, in binder_dec_ref_olocked() 1299 ref->proc->pid, ref->data.debug_id, in binder_dec_ref_olocked() 1300 ref->data.desc, ref->data.strong, in binder_dec_ref_olocked() 4359 ref->data.desc, ref->data.strong, in binder_thread_write() 4360 ref->data.weak, ref->node->debug_id); in binder_thread_write() 6493 ref->data.debug_id, ref->data.desc, in print_binder_ref_olocked() 6495 ref->node->debug_id, ref->data.strong, in print_binder_ref_olocked() [all …]
|
| /drivers/net/ethernet/mellanox/mlx5/core/lib/ |
| A D | devcom.c | 22 struct kref ref; member 31 struct kref ref; member 65 kref_init(&devc->ref); in mlx5_devcom_dev_alloc() 94 mlx5_devcom_dev_release(struct kref *ref) in mlx5_devcom_dev_release() argument 96 struct mlx5_devcom_dev *devc = container_of(ref, struct mlx5_devcom_dev, ref); in mlx5_devcom_dev_release() 125 kref_init(&comp->ref); in mlx5_devcom_comp_alloc() 132 mlx5_devcom_comp_release(struct kref *ref) in mlx5_devcom_comp_release() argument 134 struct mlx5_devcom_comp *comp = container_of(ref, struct mlx5_devcom_comp, ref); in mlx5_devcom_comp_release() 154 kref_get(&devc->ref); in devcom_alloc_comp_dev() 199 kref_get(&comp->ref); in devcom_component_get() [all …]
|
| /drivers/media/platform/verisilicon/ |
| A D | hantro_g1_vp8_dec.c | 374 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() 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() 392 ref |= G1_REG_ADDR_REF_TOPC_E; in cfg_ref() 395 ref = hantro_get_ref(ctx, hdr->alt_frame_ts); in cfg_ref() 396 if (!ref && hdr->alt_frame_ts) in cfg_ref() 399 if (!ref) in cfg_ref() [all …]
|
| A D | rockchip_vpu2_hw_vp8_dec.c | 451 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() 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() 468 ref |= VDPU_REG_VP8_GREF_SIGN_BIAS; in cfg_ref() 471 ref = hantro_get_ref(ctx, hdr->alt_frame_ts); in cfg_ref() 472 if (!ref && hdr->alt_frame_ts) in cfg_ref() 475 if (!ref) in cfg_ref() [all …]
|
| /drivers/cdx/controller/ |
| A D | mcdi.c | 59 kfree(container_of(ref, struct cdx_mcdi_cmd, ref)); in cdx_mcdi_cmd_release() 78 kref_get(&cmd->ref); in _cdx_mcdi_remove_cmd() 89 kref_put(&cmd->ref, cdx_mcdi_cmd_release); in cdx_mcdi_remove_cmd() 331 kref_put(&cmd->ref, cdx_mcdi_cmd_release); in cdx_mcdi_process_cleanup_list() 390 struct kref ref; member 401 kfree(container_of(ref, struct cdx_mcdi_blocking_data, ref)); in cdx_mcdi_blocking_data_release() 445 kref_init(&wait_data->ref); in cdx_mcdi_rpc_sync() 451 kref_init(&cmd_item->ref); in cdx_mcdi_rpc_sync() 460 kref_get(&wait_data->ref); in cdx_mcdi_rpc_sync() 627 kref_get(&cmd->ref); in cdx_mcdi_complete_cmd() [all …]
|
| /drivers/gpu/drm/i915/display/ |
| A D | intel_frontbuffer.c | 233 kref_get(&front->ref); in intel_frontbuffer_queue_flush() 238 static int frontbuffer_active(struct i915_active *ref) in frontbuffer_active() argument 241 container_of(ref, typeof(*front), write); in frontbuffer_active() 243 kref_get(&front->ref); in frontbuffer_active() 247 static void frontbuffer_retire(struct i915_active *ref) in frontbuffer_retire() argument 250 container_of(ref, typeof(*front), write); in frontbuffer_retire() 256 static void frontbuffer_release(struct kref *ref) in frontbuffer_release() argument 260 container_of(ref, typeof(*front), ref); in frontbuffer_release() 291 kref_init(&front->ref); in intel_frontbuffer_get() 309 kref_put_lock(&front->ref, in intel_frontbuffer_put()
|
| A D | intel_global_state.c | 17 struct kref ref; member 30 kref_init(&commit->ref); in commit_new() 38 container_of(kref, typeof(*commit), ref); in __commit_free() 46 kref_get(&commit->ref); in commit_get() 54 kref_put(&commit->ref, __commit_free); in commit_put() 60 container_of(kref, struct intel_global_state, ref); in __intel_atomic_global_state_free() 70 kref_put(&obj_state->ref, __intel_atomic_global_state_free); in intel_atomic_global_state_put() 76 kref_get(&obj_state->ref); in intel_atomic_global_state_get() 90 kref_init(&state->ref); in intel_atomic_global_obj_init() 104 drm_WARN_ON(display->drm, kref_read(&obj->state->ref) != 1); in intel_atomic_global_obj_cleanup() [all …]
|
| /drivers/gpu/host1x/ |
| A D | syncpt.c | 71 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/ |
| A D | rxe_mmap.c | 16 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()
|