Home
last modified time | relevance | path

Searched refs:mgr (Results 1 – 25 of 133) sorted by relevance

123456

/kernel/linux/linux-5.10/drivers/fpga/
Dfpga-mgr.c74 static int fpga_mgr_write_init_buf(struct fpga_manager *mgr, in fpga_mgr_write_init_buf() argument
80 mgr->state = FPGA_MGR_STATE_WRITE_INIT; in fpga_mgr_write_init_buf()
81 if (!mgr->mops->initial_header_size) in fpga_mgr_write_init_buf()
82 ret = mgr->mops->write_init(mgr, info, NULL, 0); in fpga_mgr_write_init_buf()
84 ret = mgr->mops->write_init( in fpga_mgr_write_init_buf()
85 mgr, info, buf, min(mgr->mops->initial_header_size, count)); in fpga_mgr_write_init_buf()
88 dev_err(&mgr->dev, "Error preparing FPGA for writing\n"); in fpga_mgr_write_init_buf()
89 mgr->state = FPGA_MGR_STATE_WRITE_INIT_ERR; in fpga_mgr_write_init_buf()
96 static int fpga_mgr_write_init_sg(struct fpga_manager *mgr, in fpga_mgr_write_init_sg() argument
105 if (!mgr->mops->initial_header_size) in fpga_mgr_write_init_sg()
[all …]
Dxilinx-spi.c30 static int get_done_gpio(struct fpga_manager *mgr) in get_done_gpio() argument
32 struct xilinx_spi_conf *conf = mgr->priv; in get_done_gpio()
38 dev_err(&mgr->dev, "Error reading DONE (%d)\n", ret); in get_done_gpio()
43 static enum fpga_mgr_states xilinx_spi_state(struct fpga_manager *mgr) in xilinx_spi_state() argument
45 if (!get_done_gpio(mgr)) in xilinx_spi_state()
63 static int wait_for_init_b(struct fpga_manager *mgr, int value, in wait_for_init_b() argument
66 struct xilinx_spi_conf *conf = mgr->priv; in wait_for_init_b()
77 dev_err(&mgr->dev, "Error reading INIT_B (%d)\n", ret); in wait_for_init_b()
84 dev_err(&mgr->dev, "Timeout waiting for INIT_B to %s\n", in wait_for_init_b()
94 static int xilinx_spi_write_init(struct fpga_manager *mgr, in xilinx_spi_write_init() argument
[all …]
Daltera-pr-ip-core.c32 static enum fpga_mgr_states alt_pr_fpga_state(struct fpga_manager *mgr) in alt_pr_fpga_state() argument
34 struct alt_pr_priv *priv = mgr->priv; in alt_pr_fpga_state()
72 dev_err(&mgr->dev, "encountered error code %d (%s) in %s()\n", in alt_pr_fpga_state()
77 static int alt_pr_fpga_write_init(struct fpga_manager *mgr, in alt_pr_fpga_write_init() argument
81 struct alt_pr_priv *priv = mgr->priv; in alt_pr_fpga_write_init()
85 dev_err(&mgr->dev, "%s Partial Reconfiguration flag not set\n", in alt_pr_fpga_write_init()
93 dev_err(&mgr->dev, in alt_pr_fpga_write_init()
104 static int alt_pr_fpga_write(struct fpga_manager *mgr, const char *buf, in alt_pr_fpga_write() argument
107 struct alt_pr_priv *priv = mgr->priv; in alt_pr_fpga_write()
138 if (alt_pr_fpga_state(mgr) == FPGA_MGR_STATE_WRITE_ERR) in alt_pr_fpga_write()
[all …]
/kernel/linux/linux-5.10/sound/pci/pcxhr/
Dpcxhr_hwdep.c25 static int pcxhr_sub_init(struct pcxhr_mgr *mgr);
29 static int pcxhr_init_board(struct pcxhr_mgr *mgr) in pcxhr_init_board() argument
36 if (mgr->mono_capture) in pcxhr_init_board()
37 card_streams = mgr->capture_chips * 2; in pcxhr_init_board()
39 card_streams = mgr->capture_chips; in pcxhr_init_board()
40 card_streams += mgr->playback_chips * PCXHR_PLAYBACK_STREAMS; in pcxhr_init_board()
43 pcxhr_enable_dsp(mgr); in pcxhr_init_board()
46 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_init_board()
50 if ((rmh.stat[0] & MASK_FIRST_FIELD) < mgr->playback_chips * 2) in pcxhr_init_board()
54 mgr->capture_chips * 2) in pcxhr_init_board()
[all …]
Dpcxhr_core.c59 #define PCXHR_INPB(mgr,x) inb((mgr)->port[PCXHR_REG_TO_PORT(x)] + (x)) argument
60 #define PCXHR_INPL(mgr,x) inl((mgr)->port[PCXHR_REG_TO_PORT(x)] + (x)) argument
61 #define PCXHR_OUTPB(mgr,x,data) outb((data), (mgr)->port[PCXHR_REG_TO_PORT(x)] + (x)) argument
62 #define PCXHR_OUTPL(mgr,x,data) outl((data), (mgr)->port[PCXHR_REG_TO_PORT(x)] + (x)) argument
113 static int pcxhr_check_reg_bit(struct pcxhr_mgr *mgr, unsigned int reg, in pcxhr_check_reg_bit() argument
120 *read = PCXHR_INPB(mgr, reg); in pcxhr_check_reg_bit()
123 dev_dbg(&mgr->pci->dev, in pcxhr_check_reg_bit()
130 dev_err(&mgr->pci->dev, in pcxhr_check_reg_bit()
166 static int pcxhr_send_it_dsp(struct pcxhr_mgr *mgr, in pcxhr_send_it_dsp() argument
174 PCXHR_OUTPL(mgr, PCXHR_PLX_MBOX0, in pcxhr_send_it_dsp()
[all …]
Dpcxhr_mix22.c36 #define PCXHR_INPB(mgr, x) inb((mgr)->port[PCXHR_DSP] + (x)) argument
37 #define PCXHR_OUTPB(mgr, x, data) outb((data), (mgr)->port[PCXHR_DSP] + (x)) argument
206 static void hr222_config_akm(struct pcxhr_mgr *mgr, unsigned short data) in hr222_config_akm() argument
210 PCXHR_INPB(mgr, PCXHR_XLX_HIFREQ); in hr222_config_akm()
213 PCXHR_OUTPB(mgr, PCXHR_XLX_DATA, in hr222_config_akm()
218 PCXHR_INPB(mgr, PCXHR_XLX_RUER); in hr222_config_akm()
222 static int hr222_set_hw_playback_level(struct pcxhr_mgr *mgr, in hr222_set_hw_playback_level() argument
239 hr222_config_akm(mgr, cmd); in hr222_set_hw_playback_level()
244 static int hr222_set_hw_capture_level(struct pcxhr_mgr *mgr, in hr222_set_hw_capture_level() argument
251 if (!mgr->capture_chips) in hr222_set_hw_capture_level()
[all …]
Dpcxhr.c235 static int pcxhr_get_clock_reg(struct pcxhr_mgr *mgr, unsigned int rate, in pcxhr_get_clock_reg() argument
243 switch (mgr->use_clock_type) { in pcxhr_get_clock_reg()
272 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_get_clock_reg()
274 dev_err(&mgr->pci->dev, in pcxhr_get_clock_reg()
308 static int pcxhr_sub_set_clock(struct pcxhr_mgr *mgr, in pcxhr_sub_set_clock() argument
316 err = pcxhr_get_clock_reg(mgr, rate, &val, &realfreq); in pcxhr_sub_set_clock()
327 if (mgr->codec_speed != speed) { in pcxhr_sub_set_clock()
330 if (DSP_EXT_CMD_SET(mgr)) { in pcxhr_sub_set_clock()
334 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_set_clock()
342 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_set_clock()
[all …]
Dpcxhr_mixer.c60 err = pcxhr_send_msg(chip->mgr, &rmh); in pcxhr_update_analog_audio_level()
82 if (chip->mgr->is_hr_stereo) { in pcxhr_analog_vol_info()
94 if (chip->mgr->is_hr_stereo) { in pcxhr_analog_vol_info()
113 mutex_lock(&chip->mgr->mixer_mutex); in pcxhr_analog_vol_get()
121 mutex_unlock(&chip->mgr->mixer_mutex); in pcxhr_analog_vol_get()
132 mutex_lock(&chip->mgr->mixer_mutex); in pcxhr_analog_vol_put()
140 if (chip->mgr->is_hr_stereo) { in pcxhr_analog_vol_put()
150 if (chip->mgr->is_hr_stereo) { in pcxhr_analog_vol_put()
163 if (chip->mgr->is_hr_stereo) in pcxhr_analog_vol_put()
171 mutex_unlock(&chip->mgr->mixer_mutex); in pcxhr_analog_vol_put()
[all …]
/kernel/linux/linux-5.10/sound/pci/mixart/
Dmixart_core.c36 static int retrieve_msg_frame(struct mixart_mgr *mgr, u32 *msg_frame) in retrieve_msg_frame() argument
41 tailptr = readl_be(MIXART_MEM(mgr, MSG_OUTBOUND_POST_TAIL)); in retrieve_msg_frame()
42 headptr = readl_be(MIXART_MEM(mgr, MSG_OUTBOUND_POST_HEAD)); in retrieve_msg_frame()
52 *msg_frame = readl_be(MIXART_MEM(mgr, tailptr)); in retrieve_msg_frame()
58 writel_be(tailptr, MIXART_MEM(mgr, MSG_OUTBOUND_POST_TAIL)); in retrieve_msg_frame()
63 static int get_msg(struct mixart_mgr *mgr, struct mixart_msg *resp, in get_msg() argument
76 …size = readl_be(MIXART_MEM(mgr, msg_frame_address)); /* size of descriptor +… in get_msg()
77 resp->message_id = readl_be(MIXART_MEM(mgr, msg_frame_address + 4)); /* dwMessageID */ in get_msg()
78 resp->uid.object_id = readl_be(MIXART_MEM(mgr, msg_frame_address + 8)); /* uidDest */ in get_msg()
79 resp->uid.desc = readl_be(MIXART_MEM(mgr, msg_frame_address + 12)); /* */ in get_msg()
[all …]
Dmixart_hwdep.c33 static int mixart_wait_nice_for_register_value(struct mixart_mgr *mgr, in mixart_wait_nice_for_register_value() argument
45 read = readl_be( MIXART_MEM( mgr, offset )); in mixart_wait_nice_for_register_value()
89 static int mixart_load_elf(struct mixart_mgr *mgr, const struct firmware *dsp ) in mixart_load_elf() argument
110 memcpy_toio( MIXART_MEM( mgr, be32_to_cpu(elf_programheader.p_vaddr)), in mixart_load_elf()
128 static int mixart_enum_connectors(struct mixart_mgr *mgr) in mixart_enum_connectors() argument
154 err = snd_mixart_send_msg(mgr, &request, sizeof(*connector), connector); in mixart_enum_connectors()
156 dev_err(&mgr->pci->dev, in mixart_enum_connectors()
166 pipe = &mgr->chip[k/2]->pipe_out_ana; in mixart_enum_connectors()
168 pipe = &mgr->chip[(k-MIXART_FIRST_DIG_AUDIO_ID)/2]->pipe_out_dig; in mixart_enum_connectors()
184 err = snd_mixart_send_msg(mgr, &request, sizeof(*audio_info), audio_info); in mixart_enum_connectors()
[all …]
Dmixart.c59 static int mixart_set_pipe_state(struct mixart_mgr *mgr, in mixart_set_pipe_state() argument
77 dev_err(&mgr->pci->dev, in mixart_set_pipe_state()
91 err = snd_mixart_send_msg_wait_notif(mgr, &request, system_msg_uid); in mixart_set_pipe_state()
93 dev_err(&mgr->pci->dev, in mixart_set_pipe_state()
113 err = snd_mixart_send_msg(mgr, &request, sizeof(group_state_resp), &group_state_resp); in mixart_set_pipe_state()
115 dev_err(&mgr->pci->dev, in mixart_set_pipe_state()
126 err = snd_mixart_send_msg(mgr, &request, sizeof(group_state_resp), &group_state_resp); in mixart_set_pipe_state()
128 dev_err(&mgr->pci->dev, in mixart_set_pipe_state()
141 err = snd_mixart_send_msg(mgr, &request, sizeof(stat), &stat); in mixart_set_pipe_state()
143 dev_err(&mgr->pci->dev, in mixart_set_pipe_state()
[all …]
/kernel/linux/linux-5.10/drivers/video/fbdev/omap2/omapfb/dss/
Dmanager-sysfs.c23 static ssize_t manager_name_show(struct omap_overlay_manager *mgr, char *buf) in manager_name_show() argument
25 return snprintf(buf, PAGE_SIZE, "%s\n", mgr->name); in manager_name_show()
28 static ssize_t manager_display_show(struct omap_overlay_manager *mgr, char *buf) in manager_display_show() argument
30 struct omap_dss_device *dssdev = mgr->get_device(mgr); in manager_display_show()
43 static ssize_t manager_display_store(struct omap_overlay_manager *mgr, in manager_display_store() argument
77 old_dssdev = mgr->get_device(mgr); in manager_display_store()
95 old_dssdev = mgr->get_device(mgr); in manager_display_store()
102 r = mgr->apply(mgr); in manager_display_store()
116 static ssize_t manager_default_color_show(struct omap_overlay_manager *mgr, in manager_default_color_show() argument
121 mgr->get_manager_info(mgr, &info); in manager_default_color_show()
[all …]
Dapply.c123 static struct mgr_priv_data *get_mgr_priv(struct omap_overlay_manager *mgr) in get_mgr_priv() argument
125 return &dss_data.mgr_priv_data_array[mgr->id]; in get_mgr_priv()
190 static bool mgr_manual_update(struct omap_overlay_manager *mgr) in mgr_manual_update() argument
192 struct mgr_priv_data *mp = get_mgr_priv(mgr); in mgr_manual_update()
197 static int dss_check_settings_low(struct omap_overlay_manager *mgr, in dss_check_settings_low() argument
207 mp = get_mgr_priv(mgr); in dss_check_settings_low()
218 list_for_each_entry(ovl, &mgr->overlays, list) { in dss_check_settings_low()
231 return dss_mgr_check(mgr, mi, &mp->timings, &mp->lcd_config, ois); in dss_check_settings_low()
237 static int dss_check_settings(struct omap_overlay_manager *mgr) in dss_check_settings() argument
239 return dss_check_settings_low(mgr, false); in dss_check_settings()
[all …]
Dmanager.c40 struct omap_overlay_manager *mgr = &managers[i]; in dss_init_overlay_managers() local
44 mgr->name = "lcd"; in dss_init_overlay_managers()
45 mgr->id = OMAP_DSS_CHANNEL_LCD; in dss_init_overlay_managers()
48 mgr->name = "tv"; in dss_init_overlay_managers()
49 mgr->id = OMAP_DSS_CHANNEL_DIGIT; in dss_init_overlay_managers()
52 mgr->name = "lcd2"; in dss_init_overlay_managers()
53 mgr->id = OMAP_DSS_CHANNEL_LCD2; in dss_init_overlay_managers()
56 mgr->name = "lcd3"; in dss_init_overlay_managers()
57 mgr->id = OMAP_DSS_CHANNEL_LCD3; in dss_init_overlay_managers()
61 mgr->supported_displays = in dss_init_overlay_managers()
[all …]
Doutput.c164 struct omap_overlay_manager *mgr; in omapdss_find_mgr_from_display() local
171 mgr = out->manager; in omapdss_find_mgr_from_display()
175 return mgr; in omapdss_find_mgr_from_display()
198 int dss_mgr_connect(struct omap_overlay_manager *mgr, in dss_mgr_connect() argument
201 return dss_mgr_ops->connect(mgr, dst); in dss_mgr_connect()
205 void dss_mgr_disconnect(struct omap_overlay_manager *mgr, in dss_mgr_disconnect() argument
208 dss_mgr_ops->disconnect(mgr, dst); in dss_mgr_disconnect()
212 void dss_mgr_set_timings(struct omap_overlay_manager *mgr, in dss_mgr_set_timings() argument
215 dss_mgr_ops->set_timings(mgr, timings); in dss_mgr_set_timings()
219 void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, in dss_mgr_set_lcd_config() argument
[all …]
/kernel/linux/linux-5.10/drivers/isdn/mISDN/
Dtei.c72 struct manager *mgr = fi->userdata; in da_debug() local
84 printk(KERN_DEBUG "mgr(%d): %pV\n", mgr->ch.st->dev->id, &vaf); in da_debug()
92 struct manager *mgr = fi->userdata; in da_activate() local
95 mISDN_FsmDelTimer(&mgr->datimer, 1); in da_activate()
108 struct manager *mgr = fi->userdata; in da_deactivate() local
112 read_lock_irqsave(&mgr->lock, flags); in da_deactivate()
113 list_for_each_entry(l2, &mgr->layer2, list) { in da_deactivate()
116 read_unlock_irqrestore(&mgr->lock, flags); in da_deactivate()
120 read_unlock_irqrestore(&mgr->lock, flags); in da_deactivate()
122 if (!test_bit(OPTION_L1_HOLD, &mgr->options)) { in da_deactivate()
[all …]
/kernel/linux/linux-5.10/net/bluetooth/
Da2mp.c42 static void a2mp_send(struct amp_mgr *mgr, u8 code, u8 ident, u16 len, void *data) in a2mp_send() argument
44 struct l2cap_chan *chan = mgr->a2mp_chan; in a2mp_send()
66 static u8 __next_ident(struct amp_mgr *mgr) in __next_ident() argument
68 if (++mgr->ident == 0) in __next_ident()
69 mgr->ident = 1; in __next_ident()
71 return mgr->ident; in __next_ident()
76 struct amp_mgr *mgr; in amp_mgr_lookup_by_state() local
79 list_for_each_entry(mgr, &amp_mgr_list, list) { in amp_mgr_lookup_by_state()
80 if (test_and_clear_bit(state, &mgr->state)) { in amp_mgr_lookup_by_state()
81 amp_mgr_get(mgr); in amp_mgr_lookup_by_state()
[all …]
/kernel/linux/linux-5.10/sound/pci/ctxfi/
Dctdaio.c173 dao->mgr->imap_add(dao->mgr, entry); in dao_set_left_input()
202 dao->mgr->imap_add(dao->mgr, entry); in dao_set_right_input()
224 dao->mgr->imap_delete(dao->mgr, entry); in dao_clear_left_input()
228 dao->mgr->imap_delete(dao->mgr, entry); in dao_clear_left_input()
248 dao->mgr->imap_delete(dao->mgr, entry); in dao_clear_right_input()
252 dao->mgr->imap_delete(dao->mgr, entry); in dao_clear_right_input()
387 struct daio_mgr *mgr) in dao_rsc_init() argument
389 struct hw *hw = mgr->mgr.hw; in dao_rsc_init()
393 err = daio_rsc_init(&dao->daio, desc, mgr->mgr.hw); in dao_rsc_init()
404 dao->mgr = mgr; in dao_rsc_init()
[all …]
Dctresource.c73 int mgr_get_resource(struct rsc_mgr *mgr, unsigned int n, unsigned int *ridx) in mgr_get_resource() argument
77 if (n > mgr->avail) in mgr_get_resource()
80 err = get_resource(mgr->rscs, mgr->amount, n, ridx); in mgr_get_resource()
82 mgr->avail -= n; in mgr_get_resource()
87 int mgr_put_resource(struct rsc_mgr *mgr, unsigned int n, unsigned int idx) in mgr_put_resource() argument
89 put_resource(mgr->rscs, n, idx); in mgr_put_resource()
90 mgr->avail += n; in mgr_put_resource()
204 int rsc_mgr_init(struct rsc_mgr *mgr, enum RSCTYP type, in rsc_mgr_init() argument
209 mgr->type = NUM_RSCTYP; in rsc_mgr_init()
211 mgr->rscs = kzalloc(((amount + 8 - 1) / 8), GFP_KERNEL); in rsc_mgr_init()
[all …]
Dctsrc.c357 const struct src_desc *desc, struct src_mgr *mgr) in src_rsc_init() argument
365 err = rsc_init(&p->rsc, idx + i, SRC, desc->msr, mgr->mgr.hw); in src_rsc_init()
374 mgr->src_enable(mgr, p); in src_rsc_init()
379 mgr->commit_write(mgr); in src_rsc_init()
385 mgr->src_disable(mgr, p); in src_rsc_init()
388 mgr->commit_write(mgr); in src_rsc_init()
392 static int src_rsc_uninit(struct src *src, struct src_mgr *mgr) in src_rsc_uninit() argument
399 mgr->src_disable(mgr, p); in src_rsc_uninit()
406 mgr->commit_write(mgr); in src_rsc_uninit()
412 get_src_rsc(struct src_mgr *mgr, const struct src_desc *desc, struct src **rsrc) in get_src_rsc() argument
[all …]
Dctamixer.c197 struct amixer_mgr *mgr) in amixer_rsc_init() argument
202 AMIXER, desc->msr, mgr->mgr.hw); in amixer_rsc_init()
227 static int get_amixer_rsc(struct amixer_mgr *mgr, in get_amixer_rsc() argument
246 spin_lock_irqsave(&mgr->mgr_lock, flags); in get_amixer_rsc()
248 err = mgr_get_resource(&mgr->mgr, 1, &idx); in get_amixer_rsc()
254 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in get_amixer_rsc()
256 dev_err(mgr->card->dev, in get_amixer_rsc()
261 err = amixer_rsc_init(amixer, desc, mgr); in get_amixer_rsc()
270 spin_lock_irqsave(&mgr->mgr_lock, flags); in get_amixer_rsc()
272 mgr_put_resource(&mgr->mgr, 1, amixer->idx[i]); in get_amixer_rsc()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/
Ddrm_dp_mst_topology.c64 static bool dump_dp_payload_table(struct drm_dp_mst_topology_mgr *mgr,
69 static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,
73 static int drm_dp_send_dpcd_read(struct drm_dp_mst_topology_mgr *mgr,
76 static int drm_dp_send_dpcd_write(struct drm_dp_mst_topology_mgr *mgr,
80 static int drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr,
84 drm_dp_send_clear_payload_id_table(struct drm_dp_mst_topology_mgr *mgr,
87 static int drm_dp_send_enum_path_resources(struct drm_dp_mst_topology_mgr *mgr,
90 static bool drm_dp_validate_guid(struct drm_dp_mst_topology_mgr *mgr,
95 static void drm_dp_mst_kick_tx(struct drm_dp_mst_topology_mgr *mgr);
1229 static int drm_dp_mst_assign_payload_id(struct drm_dp_mst_topology_mgr *mgr, in drm_dp_mst_assign_payload_id() argument
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/amdgpu/
Damdgpu_gtt_mgr.c91 struct amdgpu_gtt_mgr *mgr = &adev->mman.gtt_mgr; in amdgpu_gtt_mgr_init() local
92 struct ttm_resource_manager *man = &mgr->manager; in amdgpu_gtt_mgr_init()
103 drm_mm_init(&mgr->mm, start, size); in amdgpu_gtt_mgr_init()
104 spin_lock_init(&mgr->lock); in amdgpu_gtt_mgr_init()
105 atomic64_set(&mgr->available, gtt_size >> PAGE_SHIFT); in amdgpu_gtt_mgr_init()
118 ttm_set_driver_manager(&adev->mman.bdev, TTM_PL_TT, &mgr->manager); in amdgpu_gtt_mgr_init()
133 struct amdgpu_gtt_mgr *mgr = &adev->mman.gtt_mgr; in amdgpu_gtt_mgr_fini() local
134 struct ttm_resource_manager *man = &mgr->manager; in amdgpu_gtt_mgr_fini()
143 spin_lock(&mgr->lock); in amdgpu_gtt_mgr_fini()
144 drm_mm_takedown(&mgr->mm); in amdgpu_gtt_mgr_fini()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/lima/
Dlima_ctx.c9 int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id) in lima_ctx_create() argument
26 err = xa_alloc(&mgr->handles, id, ctx, xa_limit_32b, GFP_KERNEL); in lima_ctx_create()
52 int lima_ctx_free(struct lima_ctx_mgr *mgr, u32 id) in lima_ctx_free() argument
57 mutex_lock(&mgr->lock); in lima_ctx_free()
58 ctx = xa_erase(&mgr->handles, id); in lima_ctx_free()
63 mutex_unlock(&mgr->lock); in lima_ctx_free()
67 struct lima_ctx *lima_ctx_get(struct lima_ctx_mgr *mgr, u32 id) in lima_ctx_get() argument
71 mutex_lock(&mgr->lock); in lima_ctx_get()
72 ctx = xa_load(&mgr->handles, id); in lima_ctx_get()
75 mutex_unlock(&mgr->lock); in lima_ctx_get()
[all …]
/kernel/linux/linux-5.10/drivers/tee/
Dtee_shm_pool.c112 struct tee_shm_pool_mgr *mgr; in tee_shm_pool_mgr_alloc_res_mem() local
119 mgr = kzalloc(sizeof(*mgr), GFP_KERNEL); in tee_shm_pool_mgr_alloc_res_mem()
120 if (!mgr) in tee_shm_pool_mgr_alloc_res_mem()
123 mgr->private_data = gen_pool_create(min_alloc_order, -1); in tee_shm_pool_mgr_alloc_res_mem()
124 if (!mgr->private_data) { in tee_shm_pool_mgr_alloc_res_mem()
129 gen_pool_set_algo(mgr->private_data, gen_pool_best_fit, NULL); in tee_shm_pool_mgr_alloc_res_mem()
130 rc = gen_pool_add_virt(mgr->private_data, vaddr, paddr, size, -1); in tee_shm_pool_mgr_alloc_res_mem()
132 gen_pool_destroy(mgr->private_data); in tee_shm_pool_mgr_alloc_res_mem()
136 mgr->ops = &pool_ops_generic; in tee_shm_pool_mgr_alloc_res_mem()
138 return mgr; in tee_shm_pool_mgr_alloc_res_mem()
[all …]

123456