| /linux/drivers/gpu/drm/scheduler/ |
| H A D | sched_entity.c | 58 int drm_sched_entity_init(struct drm_sched_entity *entity, in drm_sched_entity_init() argument 64 if (!(entity && sched_list && (num_sched_list == 0 || sched_list[0]))) in drm_sched_entity_init() 67 memset(entity, 0, sizeof(struct drm_sched_entity)); in drm_sched_entity_init() 68 INIT_LIST_HEAD(&entity->list); in drm_sched_entity_init() 69 entity->rq = NULL; in drm_sched_entity_init() 70 entity->guilty = guilty; in drm_sched_entity_init() 71 entity->num_sched_list = num_sched_list; in drm_sched_entity_init() 72 entity->priority = priority; in drm_sched_entity_init() 73 entity->last_user = current->group_leader; in drm_sched_entity_init() 79 entity->sched_list = num_sched_list > 1 ? sched_list : NULL; in drm_sched_entity_init() [all …]
|
| H A D | sched_main.c | 116 struct drm_sched_entity *entity) in drm_sched_can_queue() argument 120 s_job = drm_sched_entity_queue_peek(entity); in drm_sched_can_queue() 145 static void drm_sched_rq_remove_fifo_locked(struct drm_sched_entity *entity, in drm_sched_rq_remove_fifo_locked() argument 148 if (!RB_EMPTY_NODE(&entity->rb_tree_node)) { in drm_sched_rq_remove_fifo_locked() 149 rb_erase_cached(&entity->rb_tree_node, &rq->rb_tree_root); in drm_sched_rq_remove_fifo_locked() 150 RB_CLEAR_NODE(&entity->rb_tree_node); in drm_sched_rq_remove_fifo_locked() 154 void drm_sched_rq_update_fifo_locked(struct drm_sched_entity *entity, in drm_sched_rq_update_fifo_locked() argument 163 lockdep_assert_held(&entity->lock); in drm_sched_rq_update_fifo_locked() 166 drm_sched_rq_remove_fifo_locked(entity, rq); in drm_sched_rq_update_fifo_locked() 168 entity->oldest_job_waiting = ts; in drm_sched_rq_update_fifo_locked() [all …]
|
| H A D | sched_internal.h | 16 struct drm_sched_entity *entity); 18 struct drm_sched_entity *entity); 20 void drm_sched_rq_update_fifo_locked(struct drm_sched_entity *entity, 23 void drm_sched_entity_select_rq(struct drm_sched_entity *entity); 24 struct drm_sched_job *drm_sched_entity_pop_job(struct drm_sched_entity *entity); 29 struct drm_sched_entity *entity); 46 drm_sched_entity_queue_pop(struct drm_sched_entity *entity) in drm_sched_entity_queue_pop() argument 50 node = spsc_queue_pop(&entity->job_queue); in drm_sched_entity_queue_pop() 67 drm_sched_entity_queue_peek(struct drm_sched_entity *entity) in drm_sched_entity_queue_peek() argument 71 node = spsc_queue_peek(&entity->job_queue); in drm_sched_entity_queue_peek() [all …]
|
| /linux/block/ |
| H A D | bfq-wf2q.c | 30 static unsigned int bfq_class_idx(struct bfq_entity *entity) in bfq_class_idx() argument 32 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); in bfq_class_idx() 194 static bool bfq_no_longer_next_in_service(struct bfq_entity *entity) in bfq_no_longer_next_in_service() argument 198 if (bfq_entity_to_bfqq(entity)) in bfq_no_longer_next_in_service() 201 bfqg = container_of(entity, struct bfq_group, entity); in bfq_no_longer_next_in_service() 221 static void bfq_inc_active_entities(struct bfq_entity *entity) in bfq_inc_active_entities() argument 223 struct bfq_sched_data *sd = entity->sched_data; in bfq_inc_active_entities() 230 static void bfq_dec_active_entities(struct bfq_entity *entity) in bfq_dec_active_entities() argument 232 struct bfq_sched_data *sd = entity->sched_data; in bfq_dec_active_entities() 246 static bool bfq_no_longer_next_in_service(struct bfq_entity *entity) in bfq_no_longer_next_in_service() argument [all …]
|
| H A D | bfq-cgroup.c | 305 struct bfq_entity *group_entity = bfqq->entity.parent; in bfqq_group() 308 entity) : in bfqq_group() 417 void bfq_init_entity(struct bfq_entity *entity, struct bfq_group *bfqg) in bfq_init_entity() argument 419 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); in bfq_init_entity() 421 entity->weight = entity->new_weight; in bfq_init_entity() 422 entity->orig_weight = entity->new_weight; in bfq_init_entity() 432 entity->parent = bfqg->my_entity; /* NULL for root group */ in bfq_init_entity() 433 entity->sched_data = &bfqg->sched_data; in bfq_init_entity() 534 struct bfq_entity *entity = &bfqg->entity; in bfq_pd_init() local 537 entity->orig_weight = entity->weight = entity->new_weight = d->weight; in bfq_pd_init() [all …]
|
| /linux/drivers/media/usb/uvc/ |
| H A D | uvc_entity.c | 18 struct uvc_entity *entity) in uvc_mc_create_links() argument 25 sink = (UVC_ENTITY_TYPE(entity) == UVC_TT_STREAMING) in uvc_mc_create_links() 26 ? (entity->vdev ? &entity->vdev->entity : NULL) in uvc_mc_create_links() 27 : &entity->subdev.entity; in uvc_mc_create_links() 31 for (i = 0; i < entity->num_pads; ++i) { in uvc_mc_create_links() 36 if (!(entity->pads[i].flags & MEDIA_PAD_FL_SINK)) in uvc_mc_create_links() 39 remote = uvc_entity_by_id(chain->dev, entity->baSourceID[i]); in uvc_mc_create_links() 44 ? (remote->vdev ? &remote->vdev->entity : NULL) in uvc_mc_create_links() 45 : &remote->subdev.entity; in uvc_mc_create_links() 62 void uvc_mc_cleanup_entity(struct uvc_entity *entity) in uvc_mc_cleanup_entity() argument [all …]
|
| H A D | uvc_ctrl.c | 41 .entity = UVC_GUID_UVC_PROCESSING, 50 .entity = UVC_GUID_UVC_PROCESSING, 59 .entity = UVC_GUID_UVC_PROCESSING, 69 .entity = UVC_GUID_UVC_PROCESSING, 78 .entity = UVC_GUID_UVC_PROCESSING, 87 .entity = UVC_GUID_UVC_PROCESSING, 96 .entity = UVC_GUID_UVC_PROCESSING, 106 .entity = UVC_GUID_UVC_PROCESSING, 116 .entity = UVC_GUID_UVC_PROCESSING, 125 .entity = UVC_GUID_UVC_PROCESSING, [all …]
|
| /linux/drivers/media/platform/renesas/vsp1/ |
| H A D | vsp1_entity.c | 23 void vsp1_entity_route_setup(struct vsp1_entity *entity, in vsp1_entity_route_setup() argument 30 if (entity->type == VSP1_ENTITY_HGO) { in vsp1_entity_route_setup() 37 source = entity->sources[0]; in vsp1_entity_route_setup() 38 smppt = (pipe->output->entity.index << VI6_DPR_SMPPT_TGW_SHIFT) in vsp1_entity_route_setup() 43 } else if (entity->type == VSP1_ENTITY_HGT) { in vsp1_entity_route_setup() 50 source = entity->sources[0]; in vsp1_entity_route_setup() 51 smppt = (pipe->output->entity.index << VI6_DPR_SMPPT_TGW_SHIFT) in vsp1_entity_route_setup() 58 source = entity; in vsp1_entity_route_setup() 77 void vsp1_entity_configure_stream(struct vsp1_entity *entity, in vsp1_entity_configure_stream() argument 83 if (entity->ops->configure_stream) in vsp1_entity_configure_stream() [all …]
|
| H A D | vsp1_drv.c | 66 if ((status & VI6_WPF_IRQ_STA_UND) && wpf->entity.pipe) { in vsp1_irq_handler() 67 wpf->entity.pipe->underrun_count++; in vsp1_irq_handler() 71 i, wpf->entity.pipe->underrun_count); in vsp1_irq_handler() 75 vsp1_pipeline_frame_end(wpf->entity.pipe); in vsp1_irq_handler() 104 struct media_entity *entity = &sink->subdev.entity; in vsp1_create_sink_links() local 126 for (pad = 0; pad < entity->num_pads; ++pad) { in vsp1_create_sink_links() 127 if (!(entity->pads[pad].flags & MEDIA_PAD_FL_SINK)) in vsp1_create_sink_links() 130 ret = media_create_pad_link(&source->subdev.entity, in vsp1_create_sink_links() 132 entity, pad, flags); in vsp1_create_sink_links() 146 struct vsp1_entity *entity; in vsp1_uapi_create_links() local [all …]
|
| H A D | vsp1_video.c | 54 if (!remote || !is_media_entity_v4l2_subdev(remote->entity)) in vsp1_video_remote_subdev() 60 return media_entity_to_v4l2_subdev(remote->entity); in vsp1_video_remote_subdev() 209 struct vsp1_pipeline *pipe = video->rwpf->entity.pipe; in vsp1_video_complete_buffer() 263 struct vsp1_entity *entity; in vsp1_video_pipeline_run_partition() local 265 list_for_each_entry(entity, &pipe->entities, list_pipe) in vsp1_video_pipeline_run_partition() 266 vsp1_entity_configure_partition(entity, pipe, part, dl, dlb); in vsp1_video_pipeline_run_partition() 271 struct vsp1_device *vsp1 = pipe->output->entity.vsp1; in vsp1_video_pipeline_run() 272 struct vsp1_entity *entity; in vsp1_video_pipeline_run() local 290 list_for_each_entry(entity, &pipe->entities, list_pipe) in vsp1_video_pipeline_run() 291 vsp1_entity_configure_frame(entity, pipe, dl, dlb); in vsp1_video_pipeline_run() [all …]
|
| H A D | vsp1_brx.c | 143 mutex_lock(&brx->entity.lock); in brx_set_format() 145 state = vsp1_entity_get_state(&brx->entity, sd_state, fmt->which); in brx_set_format() 157 if (fmt->pad != brx->entity.source_pad) { in brx_set_format() 171 for (i = 0; i <= brx->entity.source_pad; ++i) { in brx_set_format() 178 mutex_unlock(&brx->entity.lock); in brx_set_format() 189 if (sel->pad == brx->entity.source_pad) in brx_get_selection() 201 state = vsp1_entity_get_state(&brx->entity, sd_state, in brx_get_selection() 206 mutex_lock(&brx->entity.lock); in brx_get_selection() 208 mutex_unlock(&brx->entity.lock); in brx_get_selection() 226 if (sel->pad == brx->entity.source_pad) in brx_set_selection() [all …]
|
| H A D | vsp1_wpf.c | 32 vsp1_dl_body_write(dlb, reg + wpf->entity.index * VI6_WPF_OFFSET, data); in vsp1_wpf_write() 68 sink_format = v4l2_subdev_state_get_format(wpf->entity.state, in vsp1_wpf_set_rotation() 70 source_format = v4l2_subdev_state_get_format(wpf->entity.state, in vsp1_wpf_set_rotation() 73 mutex_lock(&wpf->entity.lock); in vsp1_wpf_set_rotation() 85 mutex_unlock(&wpf->entity.lock); in vsp1_wpf_set_rotation() 134 struct vsp1_device *vsp1 = wpf->entity.vsp1; in wpf_init_controls() 140 if (wpf->entity.index != 0) { in wpf_init_controls() 192 struct vsp1_device *vsp1 = wpf->entity.vsp1; in vsp1_wpf_stop() 198 vsp1_write(vsp1, VI6_WPF_IRQ_ENB(wpf->entity.index), 0); in vsp1_wpf_stop() 199 vsp1_write(vsp1, wpf->entity.index * VI6_WPF_OFFSET + in vsp1_wpf_stop() [all …]
|
| H A D | vsp1_entity.h | 81 void (*destroy)(struct vsp1_entity *entity); 82 void (*configure_stream)(struct vsp1_entity *entity, 87 void (*configure_frame)(struct vsp1_entity *entity, 91 void (*configure_partition)(struct vsp1_entity *entity, 96 unsigned int (*max_width)(struct vsp1_entity *entity, 99 void (*partition)(struct vsp1_entity *entity, 139 int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity, 142 void vsp1_entity_destroy(struct vsp1_entity *entity); 144 int vsp1_entity_link_setup(struct media_entity *entity, 149 vsp1_entity_get_state(struct vsp1_entity *entity, [all …]
|
| H A D | vsp1_drm.c | 122 const struct vsp1_drm_input *input = &vsp1->drm->inputs[rpf->entity.index]; in vsp1_du_pipeline_setup_rpf() 143 ret = v4l2_subdev_call(&rpf->entity.subdev, pad, set_fmt, NULL, in vsp1_du_pipeline_setup_rpf() 151 format.format.code, rpf->entity.index); in vsp1_du_pipeline_setup_rpf() 157 ret = v4l2_subdev_call(&rpf->entity.subdev, pad, set_selection, NULL, in vsp1_du_pipeline_setup_rpf() 165 rpf->entity.index); in vsp1_du_pipeline_setup_rpf() 173 ret = v4l2_subdev_call(&rpf->entity.subdev, pad, get_fmt, NULL, in vsp1_du_pipeline_setup_rpf() 181 format.format.code, rpf->entity.index); in vsp1_du_pipeline_setup_rpf() 185 ret = v4l2_subdev_call(&rpf->entity.subdev, pad, set_fmt, NULL, in vsp1_du_pipeline_setup_rpf() 191 ret = vsp1_du_insert_uif(vsp1, pipe, uif, &rpf->entity, RWPF_PAD_SOURCE, in vsp1_du_pipeline_setup_rpf() 210 sel.r = vsp1->drm->inputs[rpf->entity.index].compose; in vsp1_du_pipeline_setup_rpf() [all …]
|
| /linux/sound/soc/sdca/ |
| H A D | sdca_asoc.c | 36 static bool exported_control(struct sdca_entity *entity, struct sdca_control *control) in exported_control() argument 38 switch (SDCA_CTL_TYPE(entity->type, control->sel)) { in exported_control() 85 struct sdca_entity *entity = &function->entities[i]; in sdca_asoc_count_component() local 88 switch (entity->type) { in sdca_asoc_count_component() 91 *num_routes += !!entity->iot.clock; in sdca_asoc_count_component() 92 *num_routes += !!entity->iot.is_dataport; in sdca_asoc_count_component() 93 *num_controls += !entity->iot.is_dataport; in sdca_asoc_count_component() 94 *num_dais += !!entity->iot.is_dataport; in sdca_asoc_count_component() 97 *num_routes += entity->pde.num_managed; in sdca_asoc_count_component() 103 if (entity->group) in sdca_asoc_count_component() [all …]
|
| H A D | sdca_ump.c | 24 * @entity: Pointer to the SDCA Entity. 32 struct sdca_entity *entity, in sdca_ump_get_owner_host() argument 38 reg = SDW_SDCA_CTL(function->desc->adr, entity->id, control->sel, 0); in sdca_ump_get_owner_host() 42 entity->label, ret); in sdca_ump_get_owner_host() 47 dev_err(dev, "%s: host is not the UMP owner\n", entity->label); in sdca_ump_get_owner_host() 60 * @entity: Pointer to the SDCA Entity. 68 struct sdca_entity *entity, in sdca_ump_set_owner_device() argument 74 reg = SDW_SDCA_CTL(function->desc->adr, entity->id, control->sel, 0); in sdca_ump_set_owner_device() 78 entity->label, ret); in sdca_ump_set_owner_device() 90 * @entity 110 sdca_ump_read_message(struct device * dev,struct regmap * device_regmap,struct regmap * function_regmap,struct sdca_function_data * function,struct sdca_entity * entity,unsigned int offset_sel,unsigned int length_sel,void ** msg) sdca_ump_read_message() argument 191 sdca_ump_write_message(struct device * dev,struct regmap * device_regmap,struct regmap * function_regmap,struct sdca_function_data * function,struct sdca_entity * entity,unsigned int offset_sel,unsigned int msg_offset,unsigned int length_sel,void * msg,int msg_len) sdca_ump_write_message() argument [all...] |
| H A D | sdca_regmap.c | 33 entity_find_control(struct sdca_entity *entity, unsigned int reg) in entity_find_control() argument 37 for (i = 0; i < entity->num_controls; i++) { in entity_find_control() 38 if (SDW_SDCA_CTL_CSEL(reg) == entity->controls[i].sel) in entity_find_control() 39 return &entity->controls[i]; in entity_find_control() 48 struct sdca_entity *entity; in function_find_control() local 50 entity = function_find_entity(function, reg); in function_find_control() 51 if (!entity) in function_find_control() 54 return entity_find_control(entity, reg); in function_find_control() 218 struct sdca_entity *entity = &function->entities[i]; in sdca_regmap_count_constants() local 220 for (j = 0; j < entity in sdca_regmap_count_constants() 252 struct sdca_entity *entity = &function->entities[i]; sdca_regmap_populate_constants() local 280 populate_control_defaults(struct device * dev,struct regmap * regmap,struct sdca_function_data * function,struct sdca_entity * entity,struct sdca_control * control) populate_control_defaults() argument 343 struct sdca_entity *entity = &function->entities[i]; sdca_regmap_write_defaults() local [all...] |
| H A D | sdca_functions.c | 247 const struct sdca_entity *entity, in find_sdca_control_label() argument 250 switch (SDCA_CTL_TYPE(entity->type, control->sel)) { in find_sdca_control_label() 540 static unsigned int find_sdca_control_bits(const struct sdca_entity *entity, in find_sdca_control_bits() argument 543 switch (SDCA_CTL_TYPE(entity->type, control->sel)) { in find_sdca_control_bits() 609 find_sdca_control_datatype(const struct sdca_entity *entity, in find_sdca_control_datatype() argument 612 switch (SDCA_CTL_TYPE(entity->type, control->sel)) { in find_sdca_control_datatype() 780 static bool find_sdca_control_volatile(const struct sdca_entity *entity, in find_sdca_control_volatile() argument 794 switch (SDCA_CTL_TYPE(entity->type, control->sel)) { in find_sdca_control_volatile() 874 static int find_sdca_control_value(struct device *dev, struct sdca_entity *entity, in find_sdca_control_value() argument 911 static int find_sdca_control_reset(const struct sdca_entity *entity, in find_sdca_control_reset() argument [all …]
|
| /linux/drivers/media/v4l2-core/ |
| H A D | v4l2-mc.c | 25 struct media_entity *entity; in v4l2_mc_create_media_graph() local 36 media_device_for_each_entity(entity, mdev) { in v4l2_mc_create_media_graph() 37 switch (entity->function) { in v4l2_mc_create_media_graph() 39 if_vid = entity; in v4l2_mc_create_media_graph() 42 if_aud = entity; in v4l2_mc_create_media_graph() 45 tuner = entity; in v4l2_mc_create_media_graph() 48 decoder = entity; in v4l2_mc_create_media_graph() 51 io_v4l = entity; in v4l2_mc_create_media_graph() 54 io_vbi = entity; in v4l2_mc_create_media_graph() 57 io_swradio = entity; in v4l2_mc_create_media_graph() [all …]
|
| /linux/include/media/ |
| H A D | media-entity.h | 92 struct media_entity *entity; member 187 struct media_entity *entity; member 238 struct media_entity *entity; member 279 int (*get_fwnode_pad)(struct media_entity *entity, 281 int (*link_setup)(struct media_entity *entity, 285 bool (*has_pad_interdep)(struct media_entity *entity, unsigned int pad0, 383 #define media_entity_for_each_pad(entity, iter) \ argument 384 for (iter = (entity)->pads; \ 385 iter < &(entity)->pads[(entity)->num_pads]; \ 431 static inline u32 media_entity_id(struct media_entity *entity) in media_entity_id() argument [all …]
|
| /linux/drivers/gpu/drm/scheduler/tests/ |
| H A D | tests_basic.c | 41 struct drm_mock_sched_entity *entity; in drm_sched_basic_submit() local 51 entity = drm_mock_sched_entity_new(test, in drm_sched_basic_submit() 54 job = drm_mock_sched_job_new(test, entity); in drm_sched_basic_submit() 70 drm_mock_sched_entity_free(entity); in drm_sched_basic_submit() 123 struct drm_mock_sched_entity **entity; in drm_sched_basic_test() local 127 entity = kunit_kcalloc(test, params->num_entities, sizeof(*entity), in drm_sched_basic_test() 129 KUNIT_ASSERT_NOT_NULL(test, entity); in drm_sched_basic_test() 132 entity[i] = drm_mock_sched_entity_new(test, in drm_sched_basic_test() 137 job = drm_mock_sched_job_new(test, entity[cur_ent++]); in drm_sched_basic_test() 151 drm_mock_sched_entity_free(entity[i]); in drm_sched_basic_test() [all …]
|
| /linux/drivers/media/mc/ |
| H A D | mc-entity.c | 123 pad->entity->name, pad->index); in dev_dbg_obj() 194 int media_entity_pads_init(struct media_entity *entity, u16 num_pads, in media_entity_pads_init() argument 197 struct media_device *mdev = entity->graph_obj.mdev; in media_entity_pads_init() 205 entity->num_pads = num_pads; in media_entity_pads_init() 206 entity->pads = pads; in media_entity_pads_init() 211 media_entity_for_each_pad(entity, iter) { in media_entity_pads_init() 212 iter->entity = entity; in media_entity_pads_init() 227 media_entity_for_each_pad(entity, iter) in media_entity_pads_init() 266 static bool media_entity_has_pad_interdep(struct media_entity *entity, in media_entity_has_pad_interdep() argument 269 if (pad0 >= entity->num_pads || pad1 >= entity->num_pads) in media_entity_has_pad_interdep() [all …]
|
| H A D | mc-device.c | 83 struct media_entity *entity; in find_entity() local 88 media_device_for_each_entity(entity, mdev) { in find_entity() 89 if (((media_entity_id(entity) == id) && !next) || in find_entity() 90 ((media_entity_id(entity) > id) && next)) { in find_entity() 91 return entity; in find_entity() 146 upad->entity = media_entity_id(kpad->entity); in media_device_kpad_to_upad() 154 struct media_entity *entity; in media_device_enum_links() local 156 entity = find_entity(mdev, links->entity); in media_device_enum_links() 157 if (entity == NULL) in media_device_enum_links() 163 for (p = 0; p < entity->num_pads; p++) { in media_device_enum_links() [all …]
|
| /linux/drivers/staging/media/imx/ |
| H A D | imx-media-dev-common.c | 55 struct media_entity *entity = srcpad->entity; in imx_media_add_vdev_to_pad() local 63 if (!is_media_entity_v4l2_subdev(entity)) in imx_media_add_vdev_to_pad() 66 sd = media_entity_to_v4l2_subdev(entity); in imx_media_add_vdev_to_pad() 71 entity->name, srcpad->index); in imx_media_add_vdev_to_pad() 86 vdev->vfd->entity.name, entity->name, srcpad->index); in imx_media_add_vdev_to_pad() 97 for (i = 0; i < entity->num_pads; i++) { in imx_media_add_vdev_to_pad() 98 struct media_pad *pad = &entity->pads[i]; in imx_media_add_vdev_to_pad() 103 list_for_each_entry(link, &entity->links, list) { in imx_media_add_vdev_to_pad() 124 struct media_entity *entity; in imx_media_alloc_pad_vdev_lists() local 129 entity = &sd->entity; in imx_media_alloc_pad_vdev_lists() [all …]
|
| /linux/drivers/media/usb/au0828/ |
| H A D | au0828-core.c | 216 struct media_entity *entity, *mixer = NULL, *decoder = NULL; in au0828_media_graph_notify() local 224 media_device_for_each_entity(entity, dev->media_dev) { in au0828_media_graph_notify() 225 if (entity->function == MEDIA_ENT_F_AUDIO_MIXER) in au0828_media_graph_notify() 226 mixer = entity; in au0828_media_graph_notify() 227 else if (entity->function == MEDIA_ENT_F_ATV_DECODER) in au0828_media_graph_notify() 228 decoder = entity; in au0828_media_graph_notify() 241 media_device_for_each_entity(entity, dev->media_dev) { in au0828_media_graph_notify() 242 if (entity->function == MEDIA_ENT_F_AUDIO_MIXER) in au0828_media_graph_notify() 243 mixer = entity; in au0828_media_graph_notify() 266 struct media_entity *entity) in au0828_is_link_shareable() argument [all …]
|