• Home
  • Raw
  • Download

Lines Matching refs:video

207 	struct acpi_video_bus *video;  member
222 static void acpi_video_device_rebind(struct acpi_video_bus *video);
223 static void acpi_video_device_bind(struct acpi_video_bus *video,
225 static int acpi_video_device_enumerate(struct acpi_video_bus *video);
275 struct acpi_video_device *video = acpi_driver_data(device); in video_get_max_state() local
277 *state = video->brightness->count - 3; in video_get_max_state()
285 struct acpi_video_device *video = acpi_driver_data(device); in video_get_cur_state() local
289 if (acpi_video_device_lcd_get_level_current(video, &level, false)) in video_get_cur_state()
291 for (offset = 2; offset < video->brightness->count; offset++) in video_get_cur_state()
292 if (level == video->brightness->levels[offset]) { in video_get_cur_state()
293 *state = video->brightness->count - offset - 1; in video_get_cur_state()
304 struct acpi_video_device *video = acpi_driver_data(device); in video_set_cur_state() local
307 if (state >= video->brightness->count - 2) in video_set_cur_state()
310 state = video->brightness->count - state; in video_set_cur_state()
311 level = video->brightness->levels[state - 1]; in video_set_cur_state()
312 return acpi_video_device_lcd_set_level(video, level); in video_set_cur_state()
667 acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag) in acpi_video_bus_DOS() argument
671 if (!video->cap._DOS) in acpi_video_bus_DOS()
676 video->dos_setting = (lcd_flag << 2) | bios_flag; in acpi_video_bus_DOS()
677 status = acpi_execute_simple_method(video->device->handle, "_DOS", in acpi_video_bus_DOS()
935 static void acpi_video_bus_find_cap(struct acpi_video_bus *video) in acpi_video_bus_find_cap() argument
937 if (acpi_has_method(video->device->handle, "_DOS")) in acpi_video_bus_find_cap()
938 video->cap._DOS = 1; in acpi_video_bus_find_cap()
939 if (acpi_has_method(video->device->handle, "_DOD")) in acpi_video_bus_find_cap()
940 video->cap._DOD = 1; in acpi_video_bus_find_cap()
941 if (acpi_has_method(video->device->handle, "_ROM")) in acpi_video_bus_find_cap()
942 video->cap._ROM = 1; in acpi_video_bus_find_cap()
943 if (acpi_has_method(video->device->handle, "_GPD")) in acpi_video_bus_find_cap()
944 video->cap._GPD = 1; in acpi_video_bus_find_cap()
945 if (acpi_has_method(video->device->handle, "_SPD")) in acpi_video_bus_find_cap()
946 video->cap._SPD = 1; in acpi_video_bus_find_cap()
947 if (acpi_has_method(video->device->handle, "_VPO")) in acpi_video_bus_find_cap()
948 video->cap._VPO = 1; in acpi_video_bus_find_cap()
956 static int acpi_video_bus_check(struct acpi_video_bus *video) in acpi_video_bus_check() argument
961 if (!video) in acpi_video_bus_check()
964 dev = acpi_get_pci_dev(video->device->handle); in acpi_video_bus_check()
975 if (video->cap._DOS || video->cap._DOD) { in acpi_video_bus_check()
976 if (!video->cap._DOS) { in acpi_video_bus_check()
979 acpi_device_bid(video->device)); in acpi_video_bus_check()
981 video->flags.multihead = 1; in acpi_video_bus_check()
986 if (video->cap._ROM) { in acpi_video_bus_check()
987 video->flags.rom = 1; in acpi_video_bus_check()
992 if (video->cap._GPD && video->cap._SPD && video->cap._VPO) { in acpi_video_bus_check()
993 video->flags.post = 1; in acpi_video_bus_check()
1008 acpi_video_get_device_attr(struct acpi_video_bus *video, unsigned long device_id) in acpi_video_get_device_attr() argument
1013 for (i = 0; i < video->attached_count; i++) { in acpi_video_get_device_attr()
1014 ids = &video->attached_array[i]; in acpi_video_get_device_attr()
1023 acpi_video_get_device_type(struct acpi_video_bus *video, in acpi_video_get_device_type() argument
1029 for (i = 0; i < video->attached_count; i++) { in acpi_video_get_device_type()
1030 ids = &video->attached_array[i]; in acpi_video_get_device_type()
1040 struct acpi_video_bus *video) in acpi_video_bus_get_one_device() argument
1062 data->video = video; in acpi_video_bus_get_one_device()
1067 attribute = acpi_video_get_device_attr(video, device_id); in acpi_video_bus_get_one_device()
1091 device_type = acpi_video_get_device_type(video, device_id); in acpi_video_bus_get_one_device()
1108 acpi_video_device_bind(video, data); in acpi_video_bus_get_one_device()
1111 mutex_lock(&video->device_list_lock); in acpi_video_bus_get_one_device()
1112 list_add_tail(&data->entry, &video->video_device_list); in acpi_video_bus_get_one_device()
1113 mutex_unlock(&video->device_list_lock); in acpi_video_bus_get_one_device()
1130 static void acpi_video_device_rebind(struct acpi_video_bus *video) in acpi_video_device_rebind() argument
1134 mutex_lock(&video->device_list_lock); in acpi_video_device_rebind()
1136 list_for_each_entry(dev, &video->video_device_list, entry) in acpi_video_device_rebind()
1137 acpi_video_device_bind(video, dev); in acpi_video_device_rebind()
1139 mutex_unlock(&video->device_list_lock); in acpi_video_device_rebind()
1156 acpi_video_device_bind(struct acpi_video_bus *video, in acpi_video_device_bind() argument
1162 for (i = 0; i < video->attached_count; i++) { in acpi_video_device_bind()
1163 ids = &video->attached_array[i]; in acpi_video_device_bind()
1173 struct acpi_video_bus *video = device->video; in acpi_video_device_in_dod() local
1181 if (!video->attached_count || video->child_count > 8) in acpi_video_device_in_dod()
1184 for (i = 0; i < video->attached_count; i++) { in acpi_video_device_in_dod()
1185 if ((video->attached_array[i].value.int_val & 0xfff) == in acpi_video_device_in_dod()
1204 static int acpi_video_device_enumerate(struct acpi_video_bus *video) in acpi_video_device_enumerate() argument
1214 if (!video->cap._DOD) in acpi_video_device_enumerate()
1217 status = acpi_evaluate_object(video->device->handle, "_DOD", NULL, &buffer); in acpi_video_device_enumerate()
1258 kfree(video->attached_array); in acpi_video_device_enumerate()
1260 video->attached_array = active_list; in acpi_video_device_enumerate()
1261 video->attached_count = count; in acpi_video_device_enumerate()
1351 struct acpi_video_bus *video; in acpi_video_get_edid() local
1360 video = acpi_driver_data(device); in acpi_video_get_edid()
1362 for (i = 0; i < video->attached_count; i++) { in acpi_video_get_edid()
1363 video_device = video->attached_array[i].bind_info; in acpi_video_get_edid()
1417 acpi_video_bus_get_devices(struct acpi_video_bus *video, in acpi_video_bus_get_devices() argument
1428 acpi_video_device_enumerate(video); in acpi_video_bus_get_devices()
1432 status = acpi_video_bus_get_one_device(dev, video); in acpi_video_bus_get_devices()
1437 video->child_count++; in acpi_video_bus_get_devices()
1448 static int acpi_video_bus_start_devices(struct acpi_video_bus *video) in acpi_video_bus_start_devices() argument
1450 return acpi_video_bus_DOS(video, 0, in acpi_video_bus_start_devices()
1454 static int acpi_video_bus_stop_devices(struct acpi_video_bus *video) in acpi_video_bus_stop_devices() argument
1456 return acpi_video_bus_DOS(video, 0, in acpi_video_bus_stop_devices()
1462 struct acpi_video_bus *video = acpi_driver_data(device); in acpi_video_bus_notify() local
1466 if (!video || !video->input) in acpi_video_bus_notify()
1469 input = video->input; in acpi_video_bus_notify()
1479 acpi_video_device_enumerate(video); in acpi_video_bus_notify()
1480 acpi_video_device_rebind(video); in acpi_video_bus_notify()
1536 bus = video_device->video; in acpi_video_device_notify()
1581 struct acpi_video_bus *video; in acpi_video_resume() local
1592 video = container_of(nb, struct acpi_video_bus, pm_nb); in acpi_video_resume()
1594 dev_info(&video->device->dev, "Restoring backlight state\n"); in acpi_video_resume()
1596 for (i = 0; i < video->attached_count; i++) { in acpi_video_resume()
1597 video_device = video->attached_array[i].bind_info; in acpi_video_resume()
1704 static void acpi_video_run_bcl_for_osi(struct acpi_video_bus *video) in acpi_video_run_bcl_for_osi() argument
1709 mutex_lock(&video->device_list_lock); in acpi_video_run_bcl_for_osi()
1710 list_for_each_entry(dev, &video->video_device_list, entry) { in acpi_video_run_bcl_for_osi()
1714 mutex_unlock(&video->device_list_lock); in acpi_video_run_bcl_for_osi()
1733 static int acpi_video_bus_register_backlight(struct acpi_video_bus *video) in acpi_video_bus_register_backlight() argument
1737 if (video->backlight_registered) in acpi_video_bus_register_backlight()
1740 acpi_video_run_bcl_for_osi(video); in acpi_video_bus_register_backlight()
1745 mutex_lock(&video->device_list_lock); in acpi_video_bus_register_backlight()
1746 list_for_each_entry(dev, &video->video_device_list, entry) { in acpi_video_bus_register_backlight()
1750 mutex_unlock(&video->device_list_lock); in acpi_video_bus_register_backlight()
1752 video->backlight_registered = true; in acpi_video_bus_register_backlight()
1754 video->pm_nb.notifier_call = acpi_video_resume; in acpi_video_bus_register_backlight()
1755 video->pm_nb.priority = 0; in acpi_video_bus_register_backlight()
1756 return register_pm_notifier(&video->pm_nb); in acpi_video_bus_register_backlight()
1778 static int acpi_video_bus_unregister_backlight(struct acpi_video_bus *video) in acpi_video_bus_unregister_backlight() argument
1783 if (!video->backlight_registered) in acpi_video_bus_unregister_backlight()
1786 error = unregister_pm_notifier(&video->pm_nb); in acpi_video_bus_unregister_backlight()
1788 mutex_lock(&video->device_list_lock); in acpi_video_bus_unregister_backlight()
1789 list_for_each_entry(dev, &video->video_device_list, entry) in acpi_video_bus_unregister_backlight()
1791 mutex_unlock(&video->device_list_lock); in acpi_video_bus_unregister_backlight()
1793 video->backlight_registered = false; in acpi_video_bus_unregister_backlight()
1811 static int acpi_video_bus_add_notify_handler(struct acpi_video_bus *video) in acpi_video_bus_add_notify_handler() argument
1817 video->input = input = input_allocate_device(); in acpi_video_bus_add_notify_handler()
1823 error = acpi_video_bus_start_devices(video); in acpi_video_bus_add_notify_handler()
1827 snprintf(video->phys, sizeof(video->phys), in acpi_video_bus_add_notify_handler()
1828 "%s/video/input0", acpi_device_hid(video->device)); in acpi_video_bus_add_notify_handler()
1830 input->name = acpi_device_name(video->device); in acpi_video_bus_add_notify_handler()
1831 input->phys = video->phys; in acpi_video_bus_add_notify_handler()
1834 input->dev.parent = &video->device->dev; in acpi_video_bus_add_notify_handler()
1849 mutex_lock(&video->device_list_lock); in acpi_video_bus_add_notify_handler()
1850 list_for_each_entry(dev, &video->video_device_list, entry) in acpi_video_bus_add_notify_handler()
1852 mutex_unlock(&video->device_list_lock); in acpi_video_bus_add_notify_handler()
1857 acpi_video_bus_stop_devices(video); in acpi_video_bus_add_notify_handler()
1860 video->input = NULL; in acpi_video_bus_add_notify_handler()
1874 static void acpi_video_bus_remove_notify_handler(struct acpi_video_bus *video) in acpi_video_bus_remove_notify_handler() argument
1878 mutex_lock(&video->device_list_lock); in acpi_video_bus_remove_notify_handler()
1879 list_for_each_entry(dev, &video->video_device_list, entry) in acpi_video_bus_remove_notify_handler()
1881 mutex_unlock(&video->device_list_lock); in acpi_video_bus_remove_notify_handler()
1883 acpi_video_bus_stop_devices(video); in acpi_video_bus_remove_notify_handler()
1884 input_unregister_device(video->input); in acpi_video_bus_remove_notify_handler()
1885 video->input = NULL; in acpi_video_bus_remove_notify_handler()
1888 static int acpi_video_bus_put_devices(struct acpi_video_bus *video) in acpi_video_bus_put_devices() argument
1892 mutex_lock(&video->device_list_lock); in acpi_video_bus_put_devices()
1893 list_for_each_entry_safe(dev, next, &video->video_device_list, entry) { in acpi_video_bus_put_devices()
1897 mutex_unlock(&video->device_list_lock); in acpi_video_bus_put_devices()
1906 struct acpi_video_bus *video; in acpi_video_bus_add() local
1924 video = kzalloc(sizeof(struct acpi_video_bus), GFP_KERNEL); in acpi_video_bus_add()
1925 if (!video) in acpi_video_bus_add()
1941 video->device = device; in acpi_video_bus_add()
1944 device->driver_data = video; in acpi_video_bus_add()
1946 acpi_video_bus_find_cap(video); in acpi_video_bus_add()
1947 error = acpi_video_bus_check(video); in acpi_video_bus_add()
1951 mutex_init(&video->device_list_lock); in acpi_video_bus_add()
1952 INIT_LIST_HEAD(&video->video_device_list); in acpi_video_bus_add()
1954 error = acpi_video_bus_get_devices(video, device); in acpi_video_bus_add()
1960 video->flags.multihead ? "yes" : "no", in acpi_video_bus_add()
1961 video->flags.rom ? "yes" : "no", in acpi_video_bus_add()
1962 video->flags.post ? "yes" : "no"); in acpi_video_bus_add()
1964 list_add_tail(&video->entry, &video_bus_head); in acpi_video_bus_add()
1967 acpi_video_bus_register_backlight(video); in acpi_video_bus_add()
1968 acpi_video_bus_add_notify_handler(video); in acpi_video_bus_add()
1973 acpi_video_bus_put_devices(video); in acpi_video_bus_add()
1974 kfree(video->attached_array); in acpi_video_bus_add()
1976 kfree(video); in acpi_video_bus_add()
1984 struct acpi_video_bus *video = NULL; in acpi_video_bus_remove() local
1990 video = acpi_driver_data(device); in acpi_video_bus_remove()
1992 acpi_video_bus_remove_notify_handler(video); in acpi_video_bus_remove()
1993 acpi_video_bus_unregister_backlight(video); in acpi_video_bus_remove()
1994 acpi_video_bus_put_devices(video); in acpi_video_bus_remove()
1997 list_del(&video->entry); in acpi_video_bus_remove()
2000 kfree(video->attached_array); in acpi_video_bus_remove()
2001 kfree(video); in acpi_video_bus_remove()
2084 struct acpi_video_bus *video; in acpi_video_unregister_backlight() local
2089 list_for_each_entry(video, &video_bus_head, entry) in acpi_video_unregister_backlight()
2090 acpi_video_bus_unregister_backlight(video); in acpi_video_unregister_backlight()