Home
last modified time | relevance | path

Searched refs:mbo (Results 1 – 9 of 9) sorted by relevance

/linux/drivers/most/
H A Dcore.c91 struct mbo *_mbo = list_first_entry(ptr, struct mbo, list); \
100 static void most_free_mbo_coherent(struct mbo *mbo) in most_free_mbo_coherent() argument
102 struct most_channel *c = mbo->context; in most_free_mbo_coherent()
106 c->iface->dma_free(mbo, coherent_buf_size); in most_free_mbo_coherent()
108 kfree(mbo->virt_address); in most_free_mbo_coherent()
109 kfree(mbo); in most_free_mbo_coherent()
121 struct mbo *mbo, *tmp; in flush_channel_fifos() local
127 list_for_each_entry_safe(mbo, tmp, &c->fifo, list) { in flush_channel_fifos()
128 list_del(&mbo->list); in flush_channel_fifos()
130 most_free_mbo_coherent(mbo); in flush_channel_fifos()
[all …]
H A Dmost_cdev.c41 DECLARE_KFIFO_PTR(fifo, typeof(struct mbo *));
55 static inline struct mbo *ch_get_mbo(struct comp_channel *c, struct mbo **mbo) in ch_get_mbo() argument
57 if (!kfifo_peek(&c->fifo, mbo)) { in ch_get_mbo()
58 *mbo = most_get_mbo(c->iface, c->channel_id, &comp.cc); in ch_get_mbo()
59 if (*mbo) in ch_get_mbo()
60 kfifo_in(&c->fifo, mbo, 1); in ch_get_mbo()
62 return *mbo; in ch_get_mbo()
83 struct mbo *mbo; in stop_channel() local
85 while (kfifo_out((struct kfifo *)&c->fifo, &mbo, 1)) in stop_channel()
86 most_put_mbo(mbo); in stop_channel()
[all …]
H A Dmost_usb.c276 static int hdm_add_padding(struct most_dev *mdev, int channel, struct mbo *mbo) in hdm_add_padding() argument
284 num_frames = mbo->buffer_length / frame_size; in hdm_add_padding()
293 memmove(mbo->virt_address + j * USB_MTU, in hdm_add_padding()
294 mbo->virt_address + j * frame_size, in hdm_add_padding()
296 mbo->buffer_length = num_frames * USB_MTU; in hdm_add_padding()
310 struct mbo *mbo) in hdm_remove_padding() argument
318 num_frames = mbo->processed_length / USB_MTU; in hdm_remove_padding()
321 memmove(mbo->virt_address + frame_size * j, in hdm_remove_padding()
322 mbo->virt_address + USB_MTU * j, in hdm_remove_padding()
325 mbo->processed_length = frame_size * num_frames; in hdm_remove_padding()
[all …]
H A Dmost_snd.c181 static bool copy_data(struct channel *channel, struct mbo *mbo) in copy_data() argument
190 frames = mbo->processed_length / frame_bytes; in copy_data()
192 frames = mbo->buffer_length / frame_bytes; in copy_data()
196 mbo->virt_address, in copy_data()
202 mbo->virt_address + fr0 * frame_bytes, in copy_data()
232 struct mbo *mbo = NULL; in playback_thread() local
239 (mbo = most_get_mbo(channel->iface, channel->id, in playback_thread()
241 if (!mbo) in playback_thread()
245 period_elapsed = copy_data(channel, mbo); in playback_thread()
247 memset(mbo->virt_address, 0, mbo->buffer_length); in playback_thread()
[all …]
/linux/include/linux/
H A Dmost.h176 struct mbo { struct
188 void (*complete)(struct mbo *mbo); argument
239 void *(*dma_alloc)(struct mbo *mbo, u32 size);
240 void (*dma_free)(struct mbo *mbo, u32 size);
244 struct mbo *mbo);
272 int (*rx_completion)(struct mbo *mbo);
293 void most_submit_mbo(struct mbo *mbo);
313 struct mbo *most_get_mbo(struct most_interface *iface, int channel_idx,
315 void most_put_mbo(struct mbo *mbo);
/linux/drivers/staging/most/dim2/
H A Ddim2.c167 struct mbo *mbo; in try_start_dim_transfer() local
185 mbo = list_first_entry(head, struct mbo, list); in try_start_dim_transfer()
186 buf_size = mbo->buffer_length; in try_start_dim_transfer()
193 BUG_ON(mbo->bus_address == 0); in try_start_dim_transfer()
194 if (!dim_enqueue_buffer(&hdm_ch->ch, mbo->bus_address, buf_size)) { in try_start_dim_transfer()
197 mbo->processed_length = 0; in try_start_dim_transfer()
198 mbo->status = MBO_E_INVAL; in try_start_dim_transfer()
199 mbo->complete(mbo); in try_start_dim_transfer()
245 static void retrieve_netinfo(struct dim2_hdm *dev, struct mbo *mbo) in retrieve_netinfo() argument
247 u8 *data = mbo->virt_address; in retrieve_netinfo()
[all …]
/linux/drivers/staging/most/net/
H A Dnet.c75 static int skb_to_mamac(const struct sk_buff *skb, struct mbo *mbo) in skb_to_mamac() argument
77 u8 *buff = mbo->virt_address; in skb_to_mamac()
89 if (mbo->buffer_length < mdp_len) { in skb_to_mamac()
91 mbo->buffer_length, mdp_len); in skb_to_mamac()
127 mbo->buffer_length = mdp_len; in skb_to_mamac()
131 static int skb_to_mep(const struct sk_buff *skb, struct mbo *mbo) in skb_to_mep() argument
133 u8 *buff = mbo->virt_address; in skb_to_mep()
141 if (mbo->buffer_length < mep_len) { in skb_to_mep()
143 mbo->buffer_length, mep_len); in skb_to_mep()
158 mbo->buffer_length = mep_len; in skb_to_mep()
[all …]
/linux/drivers/staging/most/video/
H A Dvideo.c68 static inline struct mbo *get_top_mbo(struct most_video_dev *mdev) in get_top_mbo()
70 return list_first_entry(&mdev->pending_mbos, struct mbo, list); in get_top_mbo()
123 struct mbo *mbo, *tmp; in comp_vdev_close() local
140 list_for_each_entry_safe(mbo, tmp, &free_list, list) { in comp_vdev_close()
141 list_del_init(&mbo->list); in comp_vdev_close()
142 most_put_mbo(mbo); in comp_vdev_close()
179 struct mbo *const mbo = get_top_mbo(mdev); in comp_vdev_read() local
180 int const rem = mbo->processed_length - fh->offs; in comp_vdev_read()
183 if (copy_to_user(buf, mbo->virt_address + fh->offs, cnt)) { in comp_vdev_read()
198 list_del(&mbo->list); in comp_vdev_read()
[all …]
/linux/drivers/s390/cio/
H A Dcmf.c172 [mbo] "d" (virt_to_phys(area)) in cmf_activate()