Lines Matching refs:uif
29 static inline u32 vsp1_uif_read(struct vsp1_uif *uif, u32 reg) in vsp1_uif_read() argument
31 return vsp1_read(uif->entity.vsp1, in vsp1_uif_read()
32 uif->entity.index * VI6_UIF_OFFSET + reg); in vsp1_uif_read()
35 static inline void vsp1_uif_write(struct vsp1_uif *uif, in vsp1_uif_write() argument
38 vsp1_dl_body_write(dlb, reg + uif->entity.index * VI6_UIF_OFFSET, data); in vsp1_uif_write()
41 u32 vsp1_uif_get_crc(struct vsp1_uif *uif) in vsp1_uif_get_crc() argument
43 return vsp1_uif_read(uif, VI6_UIF_DISCOM_DOCMCCRCR); in vsp1_uif_get_crc()
88 struct vsp1_uif *uif = to_uif(subdev); in uif_get_selection() local
96 mutex_lock(&uif->entity.lock); in uif_get_selection()
98 config = vsp1_entity_get_pad_config(&uif->entity, sd_state, in uif_get_selection()
108 format = vsp1_entity_get_pad_format(&uif->entity, config, in uif_get_selection()
117 sel->r = *vsp1_entity_get_pad_selection(&uif->entity, config, in uif_get_selection()
127 mutex_unlock(&uif->entity.lock); in uif_get_selection()
135 struct vsp1_uif *uif = to_uif(subdev); in uif_set_selection() local
145 mutex_lock(&uif->entity.lock); in uif_set_selection()
147 config = vsp1_entity_get_pad_config(&uif->entity, sd_state, in uif_set_selection()
155 format = vsp1_entity_get_pad_format(&uif->entity, config, UIF_PAD_SINK); in uif_set_selection()
165 selection = vsp1_entity_get_pad_selection(&uif->entity, config, in uif_set_selection()
170 mutex_unlock(&uif->entity.lock); in uif_set_selection()
201 struct vsp1_uif *uif = to_uif(&entity->subdev); in uif_configure_stream() local
206 vsp1_uif_write(uif, dlb, VI6_UIF_DISCOM_DOCMPMR, in uif_configure_stream()
216 if (uif->m3w_quirk) { in uif_configure_stream()
221 vsp1_uif_write(uif, dlb, VI6_UIF_DISCOM_DOCMSPXR, left); in uif_configure_stream()
222 vsp1_uif_write(uif, dlb, VI6_UIF_DISCOM_DOCMSPYR, crop->top); in uif_configure_stream()
223 vsp1_uif_write(uif, dlb, VI6_UIF_DISCOM_DOCMSZXR, width); in uif_configure_stream()
224 vsp1_uif_write(uif, dlb, VI6_UIF_DISCOM_DOCMSZYR, crop->height); in uif_configure_stream()
226 vsp1_uif_write(uif, dlb, VI6_UIF_DISCOM_DOCMCR, in uif_configure_stream()
245 struct vsp1_uif *uif; in vsp1_uif_create() local
249 uif = devm_kzalloc(vsp1->dev, sizeof(*uif), GFP_KERNEL); in vsp1_uif_create()
250 if (!uif) in vsp1_uif_create()
254 uif->m3w_quirk = true; in vsp1_uif_create()
256 uif->entity.ops = &uif_entity_ops; in vsp1_uif_create()
257 uif->entity.type = VSP1_ENTITY_UIF; in vsp1_uif_create()
258 uif->entity.index = index; in vsp1_uif_create()
262 ret = vsp1_entity_init(vsp1, &uif->entity, name, 2, &uif_ops, in vsp1_uif_create()
267 return uif; in vsp1_uif_create()