/drivers/gpu/drm/scheduler/ |
D | sched_entity.c | 51 int drm_sched_entity_init(struct drm_sched_entity *entity, in drm_sched_entity_init() argument 58 if (!(entity && rq_list && (num_rq_list == 0 || rq_list[0]))) in drm_sched_entity_init() 61 memset(entity, 0, sizeof(struct drm_sched_entity)); in drm_sched_entity_init() 62 INIT_LIST_HEAD(&entity->list); in drm_sched_entity_init() 63 entity->rq = NULL; in drm_sched_entity_init() 64 entity->guilty = guilty; in drm_sched_entity_init() 65 entity->num_rq_list = num_rq_list; in drm_sched_entity_init() 66 entity->rq_list = kcalloc(num_rq_list, sizeof(struct drm_sched_rq *), in drm_sched_entity_init() 68 if (!entity->rq_list) in drm_sched_entity_init() 72 entity->rq_list[i] = rq_list[i]; in drm_sched_entity_init() [all …]
|
D | sched_main.c | 89 struct drm_sched_entity *entity) in drm_sched_rq_add_entity() argument 91 if (!list_empty(&entity->list)) in drm_sched_rq_add_entity() 94 list_add_tail(&entity->list, &rq->entities); in drm_sched_rq_add_entity() 107 struct drm_sched_entity *entity) in drm_sched_rq_remove_entity() argument 109 if (list_empty(&entity->list)) in drm_sched_rq_remove_entity() 112 list_del_init(&entity->list); in drm_sched_rq_remove_entity() 113 if (rq->current_entity == entity) in drm_sched_rq_remove_entity() 128 struct drm_sched_entity *entity; in drm_sched_rq_select_entity() local 132 entity = rq->current_entity; in drm_sched_rq_select_entity() 133 if (entity) { in drm_sched_rq_select_entity() [all …]
|
/drivers/media/usb/uvc/ |
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 …]
|
D | uvc_ctrl.c | 38 .entity = UVC_GUID_UVC_PROCESSING, 47 .entity = UVC_GUID_UVC_PROCESSING, 56 .entity = UVC_GUID_UVC_PROCESSING, 66 .entity = UVC_GUID_UVC_PROCESSING, 75 .entity = UVC_GUID_UVC_PROCESSING, 84 .entity = UVC_GUID_UVC_PROCESSING, 93 .entity = UVC_GUID_UVC_PROCESSING, 103 .entity = UVC_GUID_UVC_PROCESSING, 113 .entity = UVC_GUID_UVC_PROCESSING, 122 .entity = UVC_GUID_UVC_PROCESSING, [all …]
|
D | uvc_driver.c | 354 struct uvc_entity *entity; in uvc_entity_by_id() local 356 list_for_each_entry(entity, &dev->entities, list) { in uvc_entity_by_id() 357 if (entity->id == id) in uvc_entity_by_id() 358 return entity; in uvc_entity_by_id() 365 int id, struct uvc_entity *entity) in uvc_entity_by_reference() argument 369 if (entity == NULL) in uvc_entity_by_reference() 370 entity = list_entry(&dev->entities, struct uvc_entity, list); in uvc_entity_by_reference() 372 list_for_each_entry_continue(entity, &dev->entities, list) { in uvc_entity_by_reference() 373 for (i = 0; i < entity->bNrInPins; ++i) in uvc_entity_by_reference() 374 if (entity->baSourceID[i] == id) in uvc_entity_by_reference() [all …]
|
/drivers/media/platform/vsp1/ |
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() 72 void vsp1_entity_configure_stream(struct vsp1_entity *entity, in vsp1_entity_configure_stream() argument 77 if (entity->ops->configure_stream) in vsp1_entity_configure_stream() [all …]
|
D | vsp1_uds.c | 33 vsp1_dl_body_write(dlb, reg + uds->entity.index * VI6_UDS_OFFSET, data); in vsp1_uds_write() 40 void vsp1_uds_set_alpha(struct vsp1_entity *entity, struct vsp1_dl_body *dlb, in vsp1_uds_set_alpha() argument 43 struct vsp1_uds *uds = to_uds(&entity->subdev); in vsp1_uds_set_alpha() 135 config = vsp1_entity_get_pad_config(&uds->entity, cfg, fse->which); in uds_enum_frame_size() 139 format = vsp1_entity_get_pad_format(&uds->entity, config, in uds_enum_frame_size() 142 mutex_lock(&uds->entity.lock); in uds_enum_frame_size() 162 mutex_unlock(&uds->entity.lock); in uds_enum_frame_size() 187 format = vsp1_entity_get_pad_format(&uds->entity, config, in uds_try_format() 211 mutex_lock(&uds->entity.lock); in uds_set_format() 213 config = vsp1_entity_get_pad_config(&uds->entity, cfg, fmt->which); in uds_set_format() [all …]
|
D | vsp1_brx.c | 103 return v4l2_subdev_get_try_compose(&brx->entity.subdev, cfg, pad); in brx_get_compose() 122 format = vsp1_entity_get_pad_format(&brx->entity, config, in brx_try_format() 143 mutex_lock(&brx->entity.lock); in brx_set_format() 145 config = vsp1_entity_get_pad_config(&brx->entity, cfg, fmt->which); in brx_set_format() 153 format = vsp1_entity_get_pad_format(&brx->entity, config, fmt->pad); 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() 172 format = vsp1_entity_get_pad_format(&brx->entity, in brx_set_format() 179 mutex_unlock(&brx->entity.lock); in brx_set_format() 190 if (sel->pad == brx->entity.source_pad) in brx_get_selection() [all …]
|
D | vsp1_sru.c | 130 config = vsp1_entity_get_pad_config(&sru->entity, cfg, fse->which); in sru_enum_frame_size() 134 format = vsp1_entity_get_pad_format(&sru->entity, config, SRU_PAD_SINK); in sru_enum_frame_size() 136 mutex_lock(&sru->entity.lock); in sru_enum_frame_size() 162 mutex_unlock(&sru->entity.lock); in sru_enum_frame_size() 187 format = vsp1_entity_get_pad_format(&sru->entity, config, in sru_try_format() 227 mutex_lock(&sru->entity.lock); in sru_set_format() 229 config = vsp1_entity_get_pad_config(&sru->entity, cfg, fmt->which); in sru_set_format() 237 format = vsp1_entity_get_pad_format(&sru->entity, config, fmt->pad); in sru_set_format() 242 format = vsp1_entity_get_pad_format(&sru->entity, config, in sru_set_format() 250 mutex_unlock(&sru->entity.lock); in sru_set_format() [all …]
|
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 = vsp1_entity_get_pad_format(&wpf->entity, in vsp1_wpf_set_rotation() 69 wpf->entity.config, in vsp1_wpf_set_rotation() 71 source_format = vsp1_entity_get_pad_format(&wpf->entity, in vsp1_wpf_set_rotation() 72 wpf->entity.config, in vsp1_wpf_set_rotation() 75 mutex_lock(&wpf->entity.lock); in vsp1_wpf_set_rotation() 87 mutex_unlock(&wpf->entity.lock); in vsp1_wpf_set_rotation() 136 struct vsp1_device *vsp1 = wpf->entity.vsp1; in wpf_init_controls() 141 if (wpf->entity.index != 0) { in wpf_init_controls() 181 wpf->entity.index); in wpf_init_controls() [all …]
|
D | vsp1_drv.c | 63 vsp1_pipeline_frame_end(wpf->entity.pipe); in vsp1_irq_handler() 92 struct media_entity *entity = &sink->subdev.entity; in vsp1_create_sink_links() local 114 for (pad = 0; pad < entity->num_pads; ++pad) { in vsp1_create_sink_links() 115 if (!(entity->pads[pad].flags & MEDIA_PAD_FL_SINK)) in vsp1_create_sink_links() 118 ret = media_create_pad_link(&source->subdev.entity, in vsp1_create_sink_links() 120 entity, pad, flags); in vsp1_create_sink_links() 134 struct vsp1_entity *entity; in vsp1_uapi_create_links() local 138 list_for_each_entry(entity, &vsp1->entities, list_dev) { in vsp1_uapi_create_links() 139 if (entity->type == VSP1_ENTITY_LIF || in vsp1_uapi_create_links() 140 entity->type == VSP1_ENTITY_RPF) in vsp1_uapi_create_links() [all …]
|
D | vsp1_uif.c | 31 return vsp1_read(uif->entity.vsp1, in vsp1_uif_read() 32 uif->entity.index * VI6_UIF_OFFSET + reg); in vsp1_uif_read() 38 vsp1_dl_body_write(dlb, reg + uif->entity.index * VI6_UIF_OFFSET, data); in vsp1_uif_write() 95 mutex_lock(&uif->entity.lock); in uif_get_selection() 97 config = vsp1_entity_get_pad_config(&uif->entity, cfg, sel->which); in uif_get_selection() 106 format = vsp1_entity_get_pad_format(&uif->entity, config, in uif_get_selection() 115 sel->r = *vsp1_entity_get_pad_selection(&uif->entity, config, in uif_get_selection() 125 mutex_unlock(&uif->entity.lock); in uif_get_selection() 143 mutex_lock(&uif->entity.lock); in uif_set_selection() 145 config = vsp1_entity_get_pad_config(&uif->entity, cfg, sel->which); in uif_set_selection() [all …]
|
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() 199 format = vsp1_entity_get_pad_format(&pipe->output->entity, in vsp1_video_calculate_partition() 200 pipe->output->entity.config, in vsp1_video_calculate_partition() 254 struct vsp1_device *vsp1 = pipe->output->entity.vsp1; in vsp1_video_pipeline_setup_partitions() 256 struct vsp1_entity *entity; in vsp1_video_pipeline_setup_partitions() local 264 format = vsp1_entity_get_pad_format(&pipe->output->entity, in vsp1_video_pipeline_setup_partitions() 265 pipe->output->entity.config, in vsp1_video_pipeline_setup_partitions() 274 list_for_each_entry(entity, &pipe->entities, list_pipe) { in vsp1_video_pipeline_setup_partitions() 277 if (!entity->ops->max_width) in vsp1_video_pipeline_setup_partitions() [all …]
|
D | vsp1_rpf.c | 42 vsp1_dl_body_write(dlb, reg + rpf->entity.index * VI6_RPF_OFFSET, in vsp1_rpf_write() 58 static void rpf_configure_stream(struct vsp1_entity *entity, in rpf_configure_stream() argument 63 struct vsp1_rwpf *rpf = to_rwpf(&entity->subdev); in rpf_configure_stream() 91 sink_format = vsp1_entity_get_pad_format(&rpf->entity, in rpf_configure_stream() 92 rpf->entity.config, in rpf_configure_stream() 94 source_format = vsp1_entity_get_pad_format(&rpf->entity, in rpf_configure_stream() 95 rpf->entity.config, in rpf_configure_stream() 158 if (entity->vsp1->info->gen == 3) { in rpf_configure_stream() 210 auto_fld = &auto_fld[rpf->entity.index]; in vsp1_rpf_configure_autofld() 223 cmd->flags |= VI6_DL_EXT_AUTOFLD_INT | BIT(16 + rpf->entity.index); in vsp1_rpf_configure_autofld() [all …]
|
D | vsp1_rwpf.c | 22 return v4l2_subdev_get_try_crop(&rwpf->entity.subdev, config, in vsp1_rwpf_get_crop() 68 mutex_lock(&rwpf->entity.lock); in vsp1_rwpf_set_format() 70 config = vsp1_entity_get_pad_config(&rwpf->entity, cfg, fmt->which); in vsp1_rwpf_set_format() 82 format = vsp1_entity_get_pad_format(&rwpf->entity, config, fmt->pad); in vsp1_rwpf_set_format() 104 if (rwpf->entity.type == VSP1_ENTITY_RPF) { in vsp1_rwpf_set_format() 116 format = vsp1_entity_get_pad_format(&rwpf->entity, config, in vsp1_rwpf_set_format() 126 mutex_unlock(&rwpf->entity.lock); in vsp1_rwpf_set_format() 143 if (rwpf->entity.type == VSP1_ENTITY_WPF || sel->pad != RWPF_PAD_SINK) in vsp1_rwpf_get_selection() 146 mutex_lock(&rwpf->entity.lock); in vsp1_rwpf_get_selection() 148 config = vsp1_entity_get_pad_config(&rwpf->entity, cfg, sel->which); in vsp1_rwpf_get_selection() [all …]
|
D | vsp1_drm.c | 130 crop = &vsp1->drm->inputs[rpf->entity.index].crop; in vsp1_du_pipeline_setup_rpf() 140 ret = v4l2_subdev_call(&rpf->entity.subdev, pad, set_fmt, NULL, in vsp1_du_pipeline_setup_rpf() 148 format.format.code, rpf->entity.index); in vsp1_du_pipeline_setup_rpf() 156 ret = v4l2_subdev_call(&rpf->entity.subdev, pad, set_selection, NULL, in vsp1_du_pipeline_setup_rpf() 164 rpf->entity.index); in vsp1_du_pipeline_setup_rpf() 172 ret = v4l2_subdev_call(&rpf->entity.subdev, pad, get_fmt, NULL, in vsp1_du_pipeline_setup_rpf() 180 format.format.code, rpf->entity.index); in vsp1_du_pipeline_setup_rpf() 184 ret = v4l2_subdev_call(&rpf->entity.subdev, pad, set_fmt, NULL, in vsp1_du_pipeline_setup_rpf() 190 ret = vsp1_du_insert_uif(vsp1, pipe, uif, &rpf->entity, RWPF_PAD_SOURCE, in vsp1_du_pipeline_setup_rpf() 209 sel.r = vsp1->drm->inputs[rpf->entity.index].compose; in vsp1_du_pipeline_setup_rpf() [all …]
|
D | vsp1_lif.c | 29 vsp1_dl_body_write(dlb, reg + lif->entity.index * VI6_LIF_OFFSET, in vsp1_lif_write() 85 static void lif_configure_stream(struct vsp1_entity *entity, in lif_configure_stream() argument 91 struct vsp1_lif *lif = to_lif(&entity->subdev); in lif_configure_stream() 96 format = vsp1_entity_get_pad_format(&lif->entity, lif->entity.config, in lif_configure_stream() 99 switch (entity->vsp1->version & VI6_IP_VERSION_MODEL_MASK) { in lif_configure_stream() 137 if ((entity->vsp1->version & VI6_IP_VERSION_MASK) == in lif_configure_stream() 161 lif->entity.ops = &lif_entity_ops; in vsp1_lif_create() 162 lif->entity.type = VSP1_ENTITY_LIF; in vsp1_lif_create() 163 lif->entity.index = index; in vsp1_lif_create() 170 ret = vsp1_entity_init(vsp1, &lif->entity, "lif", 2, &lif_ops, in vsp1_lif_create()
|
D | vsp1_clu.c | 172 static void clu_configure_stream(struct vsp1_entity *entity, in clu_configure_stream() argument 177 struct vsp1_clu *clu = to_clu(&entity->subdev); in clu_configure_stream() 184 format = vsp1_entity_get_pad_format(&clu->entity, in clu_configure_stream() 185 clu->entity.config, in clu_configure_stream() 190 static void clu_configure_frame(struct vsp1_entity *entity, in clu_configure_frame() argument 195 struct vsp1_clu *clu = to_clu(&entity->subdev); in clu_configure_frame() 221 static void clu_destroy(struct vsp1_entity *entity) in clu_destroy() argument 223 struct vsp1_clu *clu = to_clu(&entity->subdev); in clu_destroy() 249 clu->entity.ops = &clu_entity_ops; in vsp1_clu_create() 250 clu->entity.type = VSP1_ENTITY_CLU; in vsp1_clu_create() [all …]
|
/drivers/media/mc/ |
D | mc-entity.c | 126 pad->entity->name, pad->index); in dev_dbg_obj() 197 int media_entity_pads_init(struct media_entity *entity, u16 num_pads, in media_entity_pads_init() argument 200 struct media_device *mdev = entity->graph_obj.mdev; in media_entity_pads_init() 206 entity->num_pads = num_pads; in media_entity_pads_init() 207 entity->pads = pads; in media_entity_pads_init() 213 pads[i].entity = entity; in media_entity_pads_init() 217 &entity->pads[i].graph_obj); in media_entity_pads_init() 232 media_entity_other(struct media_entity *entity, struct media_link *link) in media_entity_other() argument 234 if (link->source->entity == entity) in media_entity_other() 235 return link->sink->entity; in media_entity_other() [all …]
|
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 …]
|
/drivers/media/v4l2-core/ |
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 …]
|
/drivers/staging/media/imx/ |
D | imx-media-dev-common.c | 78 struct media_entity *entity = srcpad->entity; in imx_media_add_vdev_to_pad() local 86 if (!is_media_entity_v4l2_subdev(entity)) in imx_media_add_vdev_to_pad() 89 sd = media_entity_to_v4l2_subdev(entity); in imx_media_add_vdev_to_pad() 94 entity->name, srcpad->index); in imx_media_add_vdev_to_pad() 109 vdev->vfd->entity.name, entity->name, srcpad->index); in imx_media_add_vdev_to_pad() 120 for (i = 0; i < entity->num_pads; i++) { in imx_media_add_vdev_to_pad() 121 struct media_pad *pad = &entity->pads[i]; in imx_media_add_vdev_to_pad() 126 list_for_each_entry(link, &entity->links, list) { in imx_media_add_vdev_to_pad() 147 struct media_entity *entity; in imx_media_alloc_pad_vdev_lists() local 152 entity = &sd->entity; in imx_media_alloc_pad_vdev_lists() [all …]
|
/drivers/media/usb/au0828/ |
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 …]
|
/drivers/media/dvb-core/ |
D | dvbdev.c | 214 if (dvbdev->entity) { in dvb_media_device_free() 215 media_device_unregister_entity(dvbdev->entity); in dvb_media_device_free() 216 kfree(dvbdev->entity); in dvb_media_device_free() 218 dvbdev->entity = NULL; in dvb_media_device_free() 271 struct media_entity *entity = &dvbdev->tsout_entity[i]; in dvb_create_tsout_entity() local 273 entity->name = kasprintf(GFP_KERNEL, "%s #%d", name, i); in dvb_create_tsout_entity() 274 if (!entity->name) in dvb_create_tsout_entity() 277 entity->function = MEDIA_ENT_F_IO_DTV; in dvb_create_tsout_entity() 280 ret = media_entity_pads_init(entity, 1, pads); in dvb_create_tsout_entity() 285 entity); in dvb_create_tsout_entity() [all …]
|
/drivers/media/platform/xilinx/ |
D | xilinx-vipp.c | 38 struct media_entity *entity; member 56 struct xvip_graph_entity *entity; in xvip_graph_find_entity() local 60 entity = to_xvip_entity(asd); in xvip_graph_find_entity() 61 if (entity->asd.match.fwnode == fwnode) in xvip_graph_find_entity() 62 return entity; in xvip_graph_find_entity() 69 struct xvip_graph_entity *entity) in xvip_graph_build_one() argument 72 struct media_entity *local = entity->entity; in xvip_graph_build_one() 85 ep = fwnode_graph_get_next_endpoint(entity->asd.match.fwnode, in xvip_graph_build_one() 137 remote = ent->entity; in xvip_graph_build_one() 239 if (link.remote_port >= ent->entity->num_pads) { in xvip_graph_build_dma() [all …]
|