Loading Documentation/kernel-parameters.txt +12 −0 Original line number Diff line number Diff line Loading @@ -198,6 +198,18 @@ and is between 256 and 4096 characters. It is defined in the file that require a timer override, but don't have HPET acpi_backlight= [HW,ACPI] acpi_backlight=vendor acpi_backlight=video If set to vendor, prefer vendor specific driver (e.g. thinkpad_acpi, sony_acpi, etc.) instead of the ACPI video.ko driver. acpi_display_output= [HW,ACPI] acpi_display_output=vendor acpi_display_output=video See above. acpi.debug_layer= [HW,ACPI,ACPI_DEBUG] acpi.debug_level= [HW,ACPI,ACPI_DEBUG] Format: <int> Loading drivers/acpi/Makefile +4 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,10 @@ obj-$(CONFIG_ACPI_BUTTON) += button.o obj-$(CONFIG_ACPI_FAN) += fan.o obj-$(CONFIG_ACPI_DOCK) += dock.o obj-$(CONFIG_ACPI_VIDEO) += video.o ifdef CONFIG_ACPI_VIDEO obj-y += video_detect.o endif obj-y += pci_root.o pci_link.o pci_irq.o pci_bind.o obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o obj-$(CONFIG_ACPI_PROCESSOR) += processor.o Loading drivers/acpi/glue.c +40 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,46 @@ struct device *acpi_get_physical_device(acpi_handle handle) EXPORT_SYMBOL(acpi_get_physical_device); /* ToDo: When a PCI bridge is found, return the PCI device behind the bridge * This should work in general, but did not on a Lenovo T61 for the * graphics card. But this must be fixed when the PCI device is * bound and the kernel device struct is attached to the acpi device * Note: A success call will increase reference count by one * Do call put_device(dev) on the returned device then */ struct device *acpi_get_physical_pci_device(acpi_handle handle) { struct device *dev; long long device_id; acpi_status status; status = acpi_evaluate_integer(handle, "_ADR", NULL, &device_id); if (ACPI_FAILURE(status)) return NULL; /* We need to attempt to determine whether the _ADR refers to a PCI device or not. There's no terribly good way to do this, so the best we can hope for is to assume that there'll never be a device in the host bridge */ if (device_id >= 0x10000) { /* It looks like a PCI device. Does it exist? */ dev = acpi_get_physical_device(handle); } else { /* It doesn't look like a PCI device. Does its parent exist? */ acpi_handle phandle; if (acpi_get_parent(handle, &phandle)) return NULL; dev = acpi_get_physical_device(phandle); } if (!dev) return NULL; return dev; } EXPORT_SYMBOL(acpi_get_physical_pci_device); static int acpi_bind_one(struct device *dev, acpi_handle handle) { struct acpi_device *acpi_dev; Loading drivers/acpi/scan.c +1 −31 Original line number Diff line number Diff line Loading @@ -919,36 +919,6 @@ static void acpi_device_get_busid(struct acpi_device *device, } } static int acpi_video_bus_match(struct acpi_device *device) { acpi_handle h_dummy; if (!device) return -EINVAL; /* Since there is no HID, CID for ACPI Video drivers, we have * to check well known required nodes for each feature we support. */ /* Does this device able to support video switching ? */ if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) && ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy))) return 0; /* Does this device able to retrieve a video ROM ? */ if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy))) return 0; /* Does this device able to configure which video head to be POSTed ? */ if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy)) && ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy)) && ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy))) return 0; return -ENODEV; } /* * acpi_bay_match - see if a device is an ejectable driver bay * Loading Loading @@ -1031,7 +1001,7 @@ static void acpi_device_set_id(struct acpi_device *device, will get autoloaded and the device might still match against another driver. */ if (ACPI_SUCCESS(acpi_video_bus_match(device))) if (acpi_is_video_device(device)) cid_add = ACPI_VIDEO_HID; else if (ACPI_SUCCESS(acpi_bay_match(device))) cid_add = ACPI_BAY_HID; Loading drivers/acpi/video.c +22 −13 Original line number Diff line number Diff line Loading @@ -738,6 +738,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) device->cap._DSS = 1; } if (acpi_video_backlight_support()) max_level = acpi_video_init_brightness(device); if (device->cap._BCL && device->cap._BCM && max_level > 0) { Loading Loading @@ -784,8 +785,11 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) printk(KERN_ERR PREFIX "Create sysfs link\n"); } if (acpi_video_display_switch_support()) { if (device->cap._DCS && device->cap._DSS) { static int count = 0; static int count; char *name; name = kzalloc(MAX_NAME_LEN, GFP_KERNEL); if (!name) Loading @@ -795,7 +799,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) NULL, device, &acpi_output_properties); kfree(name); } return; } } /* Loading Loading @@ -841,11 +845,16 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video) static int acpi_video_bus_check(struct acpi_video_bus *video) { acpi_status status = -ENOENT; struct device *dev; if (!video) return -EINVAL; dev = acpi_get_physical_pci_device(video->device->handle); if (!dev) return -ENODEV; put_device(dev); /* Since there is no HID, CID and so on for VGA driver, we have * to check well known required nodes. */ Loading Loading
Documentation/kernel-parameters.txt +12 −0 Original line number Diff line number Diff line Loading @@ -198,6 +198,18 @@ and is between 256 and 4096 characters. It is defined in the file that require a timer override, but don't have HPET acpi_backlight= [HW,ACPI] acpi_backlight=vendor acpi_backlight=video If set to vendor, prefer vendor specific driver (e.g. thinkpad_acpi, sony_acpi, etc.) instead of the ACPI video.ko driver. acpi_display_output= [HW,ACPI] acpi_display_output=vendor acpi_display_output=video See above. acpi.debug_layer= [HW,ACPI,ACPI_DEBUG] acpi.debug_level= [HW,ACPI,ACPI_DEBUG] Format: <int> Loading
drivers/acpi/Makefile +4 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,10 @@ obj-$(CONFIG_ACPI_BUTTON) += button.o obj-$(CONFIG_ACPI_FAN) += fan.o obj-$(CONFIG_ACPI_DOCK) += dock.o obj-$(CONFIG_ACPI_VIDEO) += video.o ifdef CONFIG_ACPI_VIDEO obj-y += video_detect.o endif obj-y += pci_root.o pci_link.o pci_irq.o pci_bind.o obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o obj-$(CONFIG_ACPI_PROCESSOR) += processor.o Loading
drivers/acpi/glue.c +40 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,46 @@ struct device *acpi_get_physical_device(acpi_handle handle) EXPORT_SYMBOL(acpi_get_physical_device); /* ToDo: When a PCI bridge is found, return the PCI device behind the bridge * This should work in general, but did not on a Lenovo T61 for the * graphics card. But this must be fixed when the PCI device is * bound and the kernel device struct is attached to the acpi device * Note: A success call will increase reference count by one * Do call put_device(dev) on the returned device then */ struct device *acpi_get_physical_pci_device(acpi_handle handle) { struct device *dev; long long device_id; acpi_status status; status = acpi_evaluate_integer(handle, "_ADR", NULL, &device_id); if (ACPI_FAILURE(status)) return NULL; /* We need to attempt to determine whether the _ADR refers to a PCI device or not. There's no terribly good way to do this, so the best we can hope for is to assume that there'll never be a device in the host bridge */ if (device_id >= 0x10000) { /* It looks like a PCI device. Does it exist? */ dev = acpi_get_physical_device(handle); } else { /* It doesn't look like a PCI device. Does its parent exist? */ acpi_handle phandle; if (acpi_get_parent(handle, &phandle)) return NULL; dev = acpi_get_physical_device(phandle); } if (!dev) return NULL; return dev; } EXPORT_SYMBOL(acpi_get_physical_pci_device); static int acpi_bind_one(struct device *dev, acpi_handle handle) { struct acpi_device *acpi_dev; Loading
drivers/acpi/scan.c +1 −31 Original line number Diff line number Diff line Loading @@ -919,36 +919,6 @@ static void acpi_device_get_busid(struct acpi_device *device, } } static int acpi_video_bus_match(struct acpi_device *device) { acpi_handle h_dummy; if (!device) return -EINVAL; /* Since there is no HID, CID for ACPI Video drivers, we have * to check well known required nodes for each feature we support. */ /* Does this device able to support video switching ? */ if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) && ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy))) return 0; /* Does this device able to retrieve a video ROM ? */ if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy))) return 0; /* Does this device able to configure which video head to be POSTed ? */ if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy)) && ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy)) && ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy))) return 0; return -ENODEV; } /* * acpi_bay_match - see if a device is an ejectable driver bay * Loading Loading @@ -1031,7 +1001,7 @@ static void acpi_device_set_id(struct acpi_device *device, will get autoloaded and the device might still match against another driver. */ if (ACPI_SUCCESS(acpi_video_bus_match(device))) if (acpi_is_video_device(device)) cid_add = ACPI_VIDEO_HID; else if (ACPI_SUCCESS(acpi_bay_match(device))) cid_add = ACPI_BAY_HID; Loading
drivers/acpi/video.c +22 −13 Original line number Diff line number Diff line Loading @@ -738,6 +738,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) device->cap._DSS = 1; } if (acpi_video_backlight_support()) max_level = acpi_video_init_brightness(device); if (device->cap._BCL && device->cap._BCM && max_level > 0) { Loading Loading @@ -784,8 +785,11 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) printk(KERN_ERR PREFIX "Create sysfs link\n"); } if (acpi_video_display_switch_support()) { if (device->cap._DCS && device->cap._DSS) { static int count = 0; static int count; char *name; name = kzalloc(MAX_NAME_LEN, GFP_KERNEL); if (!name) Loading @@ -795,7 +799,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) NULL, device, &acpi_output_properties); kfree(name); } return; } } /* Loading Loading @@ -841,11 +845,16 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video) static int acpi_video_bus_check(struct acpi_video_bus *video) { acpi_status status = -ENOENT; struct device *dev; if (!video) return -EINVAL; dev = acpi_get_physical_pci_device(video->device->handle); if (!dev) return -ENODEV; put_device(dev); /* Since there is no HID, CID and so on for VGA driver, we have * to check well known required nodes. */ Loading