• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/acpi/

Lines Matching refs:video

2  *  video.c - ACPI Video Driver ($Revision: 1.1.1.1 $)
42 #define ACPI_VIDEO_CLASS "video"
67 ACPI_MODULE_NAME("video");
77 .name = "video",
87 u8 multihead:1; /* can switch video heads */
88 u8 rom:1; /* can retrieve a video rom */
168 struct acpi_video_bus *video;
261 static void acpi_video_device_rebind(struct acpi_video_bus *video);
262 static void acpi_video_device_bind(struct acpi_video_bus *video,
264 static int acpi_video_device_enumerate(struct acpi_video_bus *video);
265 static int acpi_video_switch_output(struct acpi_video_bus *video, int event);
441 acpi_video_bus_set_POST(struct acpi_video_bus *video, unsigned long option)
451 status = acpi_evaluate_integer(video->device->handle, "_SPD", &args, &tmp);
459 acpi_video_bus_get_POST(struct acpi_video_bus *video, unsigned long *id)
463 status = acpi_evaluate_integer(video->device->handle, "_GPD", NULL, id);
469 acpi_video_bus_POST_options(struct acpi_video_bus *video,
474 status = acpi_evaluate_integer(video->device->handle, "_VPO", NULL, options);
482 * video : video bus device pointer
502 acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
514 video->dos_setting = arg0.integer.value;
515 acpi_evaluate_object(video->device->handle, "_DOS", &args, NULL);
523 * device : video output device (LCD, CRT, ..)
634 * device : video output device (VGA)
639 * Find out all required AML methods defined under the video bus device.
642 static void acpi_video_bus_find_cap(struct acpi_video_bus *video)
646 memset(&video->cap, 0, 4);
647 if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOS", &h_dummy1))) {
648 video->cap._DOS = 1;
650 if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOD", &h_dummy1))) {
651 video->cap._DOD = 1;
653 if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_ROM", &h_dummy1))) {
654 video->cap._ROM = 1;
656 if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_GPD", &h_dummy1))) {
657 video->cap._GPD = 1;
659 if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_SPD", &h_dummy1))) {
660 video->cap._SPD = 1;
662 if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_VPO", &h_dummy1))) {
663 video->cap._VPO = 1;
668 * Check whether the video bus device has required AML method to
672 static int acpi_video_bus_check(struct acpi_video_bus *video)
677 if (!video)
684 /* Does this device support video switching? */
685 if (video->cap._DOS) {
686 video->flags.multihead = 1;
690 /* Does this device support retrieving a video ROM? */
691 if (video->cap._ROM) {
692 video->flags.rom = 1;
696 /* Does this device support configuring which video device to POST? */
697 if (video->cap._GPD && video->cap._SPD && video->cap._VPO) {
698 video->flags.post = 1;
711 /* video devices */
931 vid_dev->video->dir);
991 if (!vid_dev || !vid_dev->video || !vid_dev->video->dir)
999 remove_proc_entry(acpi_device_bid(device), vid_dev->video->dir);
1006 /* video bus */
1009 struct acpi_video_bus *video = seq->private;
1012 if (!video)
1016 video->flags.multihead ? "yes" : "no");
1018 video->flags.rom ? "yes" : "no");
1020 video->flags.post ? "yes" : "no");
1034 struct acpi_video_bus *video = seq->private;
1037 if (!video)
1054 struct acpi_video_bus *video = seq->private;
1059 if (!video)
1062 status = acpi_video_bus_POST_options(video, &options);
1071 seq_printf(seq, "can POST: <integrated video>");
1073 seq_printf(seq, " <PCI video>");
1075 seq_printf(seq, " <AGP video>");
1092 struct acpi_video_bus *video = seq->private;
1097 if (!video)
1100 status = acpi_video_bus_get_POST(video, &id);
1113 struct acpi_video_bus *video = seq->private;
1116 seq_printf(seq, "DOS setting: <%d>\n", video->dos_setting);
1139 struct acpi_video_bus *video = m->private;
1144 if (!video || count + 1 > sizeof str)
1147 status = acpi_video_bus_POST_options(video, &options);
1163 status = acpi_video_bus_set_POST(video, opt);
1179 struct acpi_video_bus *video = m->private;
1184 if (!video || count + 1 > sizeof str)
1195 status = acpi_video_bus_DOS(video, opt & 0x3, (opt & 0x4) >> 2);
1206 struct acpi_video_bus *video;
1209 video = acpi_driver_data(device);
1216 video->dir = acpi_device_dir(device);
1282 struct acpi_video_bus *video;
1285 video = acpi_driver_data(device);
1306 acpi_video_get_device_attr(struct acpi_video_bus *video, unsigned long device_id)
1310 for(count = 0; count < video->attached_count; count++)
1311 if((video->attached_array[count].value.int_val & 0xffff) == device_id)
1312 return &(video->attached_array[count].value.attrib);
1318 struct acpi_video_bus *video)
1325 if (!device || !video)
1341 data->video = video;
1344 attribute = acpi_video_get_device_attr(video, device_id);
1369 acpi_video_device_bind(video, data);
1386 down(&video->sem);
1387 list_add_tail(&data->entry, &video->video_device_list);
1388 up(&video->sem);
1400 * video : video bus device
1405 * Enumerate the video device list of the video bus,
1406 * bind the ids with the corresponding video devices
1407 * under the video bus.
1410 static void acpi_video_device_rebind(struct acpi_video_bus *video)
1413 list_for_each_safe(node, next, &video->video_device_list) {
1416 acpi_video_device_bind(video, dev);
1422 * video : video bus device
1423 * device : video output device under the video
1429 * Bind the ids with the corresponding video devices
1430 * under the video bus.
1434 acpi_video_device_bind(struct acpi_video_bus *video,
1439 #define IDS_VAL(i) video->attached_array[i].value.int_val
1440 #define IDS_BIND(i) video->attached_array[i].bind_info
1443 i < video->attached_count; i++) {
1455 * video : video bus device
1464 static int acpi_video_device_enumerate(struct acpi_video_bus *video)
1474 status = acpi_evaluate_object(video->device->handle, "_DOD", NULL, &buffer);
1487 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d video heads in _DOD\n",
1518 kfree(video->attached_array);
1520 video->attached_array = active_device_list;
1521 video->attached_count = count;
1529 * video : video bus device
1540 static int acpi_video_switch_output(struct acpi_video_bus *video, int event)
1550 list_for_each_safe(node, next, &video->video_device_list) {
1626 acpi_video_bus_get_devices(struct acpi_video_bus *video,
1633 acpi_video_device_enumerate(video);
1642 status = acpi_video_bus_get_one_device(dev, video);
1655 struct acpi_video_bus *video;
1658 if (!device || !device->video)
1661 video = device->video;
1663 down(&video->sem);
1665 up(&video->sem);
1675 static int acpi_video_bus_put_devices(struct acpi_video_bus *video)
1681 list_for_each_safe(node, next, &video->video_device_list) {
1690 "hhuuhhuu bug in acpi video driver.\n");
1703 static int acpi_video_bus_start_devices(struct acpi_video_bus *video)
1705 return acpi_video_bus_DOS(video, 1, 0);
1708 static int acpi_video_bus_stop_devices(struct acpi_video_bus *video)
1710 return acpi_video_bus_DOS(video, 0, 1);
1715 struct acpi_video_bus *video = data;
1718 printk("video bus notify\n");
1720 if (!video)
1723 device = video->device;
1731 case ACPI_VIDEO_NOTIFY_PROBE: /* User plugged in or removed a video
1733 acpi_video_device_enumerate(video);
1734 acpi_video_device_rebind(video);
1735 acpi_video_switch_output(video, event);
1742 acpi_video_switch_output(video, event);
1790 struct acpi_video_bus *video = NULL;
1796 video = kzalloc(sizeof(struct acpi_video_bus), GFP_KERNEL);
1797 if (!video)
1800 video->device = device;
1803 acpi_driver_data(device) = video;
1805 acpi_video_bus_find_cap(video);
1806 result = acpi_video_bus_check(video);
1814 init_MUTEX(&video->sem);
1815 INIT_LIST_HEAD(&video->video_device_list);
1817 acpi_video_bus_get_devices(video, device);
1818 acpi_video_bus_start_devices(video);
1822 acpi_video_bus_notify, video);
1826 acpi_video_bus_stop_devices(video);
1827 acpi_video_bus_put_devices(video);
1828 kfree(video->attached_array);
1836 video->flags.multihead ? "yes" : "no",
1837 video->flags.rom ? "yes" : "no",
1838 video->flags.post ? "yes" : "no");
1842 kfree(video);
1850 struct acpi_video_bus *video = NULL;
1856 video = acpi_driver_data(device);
1858 acpi_video_bus_stop_devices(video);
1860 status = acpi_remove_notify_handler(video->device->handle,
1864 acpi_video_bus_put_devices(video);
1867 kfree(video->attached_array);
1868 kfree(video);