Lines Matching refs:intf
292 int adf_vsync_wait(struct adf_interface *intf, long timeout) in adf_vsync_wait() argument
298 read_lock_irqsave(&intf->vsync_lock, flags); in adf_vsync_wait()
299 timestamp = intf->vsync_timestamp; in adf_vsync_wait()
300 read_unlock_irqrestore(&intf->vsync_lock, flags); in adf_vsync_wait()
302 adf_vsync_get(intf); in adf_vsync_wait()
304 ret = wait_event_interruptible_timeout(intf->vsync_wait, in adf_vsync_wait()
306 intf->vsync_timestamp), in adf_vsync_wait()
308 if (ret == 0 && ktime_equal(timestamp, intf->vsync_timestamp)) in adf_vsync_wait()
311 ret = wait_event_interruptible(intf->vsync_wait, in adf_vsync_wait()
313 intf->vsync_timestamp)); in adf_vsync_wait()
315 adf_vsync_put(intf); in adf_vsync_wait()
369 void adf_vsync_notify(struct adf_interface *intf, ktime_t timestamp) in adf_vsync_notify() argument
374 write_lock_irqsave(&intf->vsync_lock, flags); in adf_vsync_notify()
375 intf->vsync_timestamp = timestamp; in adf_vsync_notify()
376 write_unlock_irqrestore(&intf->vsync_lock, flags); in adf_vsync_notify()
378 wake_up_interruptible_all(&intf->vsync_wait); in adf_vsync_notify()
383 adf_event_queue(&intf->base, &event.base); in adf_vsync_notify()
387 void adf_hotplug_notify(struct adf_interface *intf, bool connected, in adf_hotplug_notify() argument
394 write_lock_irqsave(&intf->hotplug_modelist_lock, flags); in adf_hotplug_notify()
395 old_modelist = intf->modelist; in adf_hotplug_notify()
396 intf->hotplug_detect = connected; in adf_hotplug_notify()
397 intf->modelist = modelist; in adf_hotplug_notify()
398 intf->n_modes = n_modes; in adf_hotplug_notify()
399 write_unlock_irqrestore(&intf->hotplug_modelist_lock, flags); in adf_hotplug_notify()
406 adf_event_queue(&intf->base, &event.base); in adf_hotplug_notify()
424 int adf_hotplug_notify_connected(struct adf_interface *intf, in adf_hotplug_notify_connected() argument
438 adf_hotplug_notify(intf, true, modelist_copy, n_modes); in adf_hotplug_notify_connected()
452 void adf_hotplug_notify_disconnected(struct adf_interface *intf) in adf_hotplug_notify_disconnected() argument
454 adf_hotplug_notify(intf, false, NULL, 0); in adf_hotplug_notify_disconnected()
645 int adf_interface_init(struct adf_interface *intf, struct adf_device *dev, in adf_interface_init() argument
671 memset(intf, 0, sizeof(*intf)); in adf_interface_init()
674 ret = adf_obj_init(&intf->base, ADF_OBJ_INTERFACE, &dev->interfaces, in adf_interface_init()
680 intf->type = type; in adf_interface_init()
681 intf->idx = idx; in adf_interface_init()
682 intf->flags = flags; in adf_interface_init()
683 intf->ops = ops; in adf_interface_init()
684 intf->dpms_state = DRM_MODE_DPMS_OFF; in adf_interface_init()
685 init_waitqueue_head(&intf->vsync_wait); in adf_interface_init()
686 rwlock_init(&intf->vsync_lock); in adf_interface_init()
687 rwlock_init(&intf->hotplug_modelist_lock); in adf_interface_init()
689 ret = adf_interface_sysfs_init(intf); in adf_interface_init()
697 adf_obj_destroy(&intf->base, &dev->interfaces); in adf_interface_init()
707 void adf_interface_destroy(struct adf_interface *intf) in adf_interface_destroy() argument
709 struct adf_device *dev = adf_interface_parent(intf); in adf_interface_destroy()
714 if (entry->attachment.interface == intf) { in adf_interface_destroy()
720 if (entry->attachment.interface == intf) { in adf_interface_destroy()
722 entry->attachment.overlay_engine, intf); in adf_interface_destroy()
727 kfree(intf->modelist); in adf_interface_destroy()
728 adf_interface_sysfs_destroy(intf); in adf_interface_destroy()
729 adf_obj_destroy(&intf->base, &dev->interfaces); in adf_interface_destroy()
843 struct adf_overlay_engine *eng, struct adf_interface *intf) in adf_attachment_find() argument
847 if (entry->attachment.interface == intf && in adf_attachment_find()
855 struct adf_overlay_engine *eng, struct adf_interface *intf) in adf_attachment_validate() argument
857 struct adf_device *intf_dev = adf_interface_parent(intf); in adf_attachment_validate()
862 intf->base.name, intf_dev->base.name); in adf_attachment_validate()
891 struct adf_overlay_engine *eng, struct adf_interface *intf) in adf_attachment_allow() argument
896 ret = adf_attachment_validate(dev, eng, intf); in adf_attachment_allow()
907 if (adf_attachment_find(&dev->attach_allowed, eng, intf)) { in adf_attachment_allow()
918 entry->attachment.interface = intf; in adf_attachment_allow()
960 const char *adf_interface_type_str(struct adf_interface *intf) in adf_interface_type_str() argument
962 switch (intf->type) { in adf_interface_type_str()
985 if (intf->type >= ADF_INTF_TYPE_DEVICE_CUSTOM) { in adf_interface_type_str()
986 if (intf->ops && intf->ops->type_str) in adf_interface_type_str()
987 return intf->ops->type_str(intf); in adf_interface_type_str()