[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-07 Thread Rafael J. Wysocki
On Monday, February 07, 2011, Matthew Garrett wrote: > On Mon, Feb 07, 2011 at 02:32:35PM -0700, Bjorn Helgaas wrote: > > > I'm not familiar with video devices, but I agree, this situation does > > feel broken. Is it the case that there's a PCI device as well as an > > ACPI namespace Device for

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-07 Thread Matthew Garrett
On Mon, Feb 07, 2011 at 02:32:35PM -0700, Bjorn Helgaas wrote: > I'm not familiar with video devices, but I agree, this situation does > feel broken. Is it the case that there's a PCI device as well as an > ACPI namespace Device for the same piece of hardware? If so, I assume > the reason for

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-07 Thread Bjorn Helgaas
On Sunday, February 06, 2011 04:34:43 pm Rafael J. Wysocki wrote: > > Still, IMO, there is a design issue in the entire ACPI subsystem, because the > idea of "ACPI device" really is not well defined, so to speak. Sometimes > they are just "device interfaces" that can be used to ask the firmware

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-07 Thread Rafael J. Wysocki
On Monday, February 07, 2011, Matthew Garrett wrote: > On Mon, Feb 07, 2011 at 12:01:25AM +0100, Rafael J. Wysocki wrote: > > > Yes, it seems so, but I'm not sure what the short term consequences of that > > change will be. Perhaps there will be none. :-) > > Ok, I'll have a play with that.

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-07 Thread Rafael J. Wysocki
On Sunday, February 06, 2011, Matthew Garrett wrote: > On Sun, Feb 06, 2011 at 11:41:19PM +0100, Rafael J. Wysocki wrote: > > On Sunday, February 06, 2011, Matthew Garrett wrote: > > > Ugh. Ok, how can we fix this? > > > > Not nicely, I'm afraid. > > > > One possible way is to use

Re: [PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-07 Thread Matthew Garrett
On Mon, Feb 07, 2011 at 02:32:35PM -0700, Bjorn Helgaas wrote: I'm not familiar with video devices, but I agree, this situation does feel broken. Is it the case that there's a PCI device as well as an ACPI namespace Device for the same piece of hardware? If so, I assume the reason for the

Re: [PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-07 Thread Bjorn Helgaas
On Sunday, February 06, 2011 04:34:43 pm Rafael J. Wysocki wrote: Still, IMO, there is a design issue in the entire ACPI subsystem, because the idea of ACPI device really is not well defined, so to speak. Sometimes they are just device interfaces that can be used to ask the firmware for

Re: [PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-07 Thread Rafael J. Wysocki
On Monday, February 07, 2011, Matthew Garrett wrote: On Mon, Feb 07, 2011 at 02:32:35PM -0700, Bjorn Helgaas wrote: I'm not familiar with video devices, but I agree, this situation does feel broken. Is it the case that there's a PCI device as well as an ACPI namespace Device for the same

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-06 Thread Rafael J. Wysocki
On Sunday, February 06, 2011, Matthew Garrett wrote: > On Sun, Feb 06, 2011 at 09:35:07PM +0100, Rafael J. Wysocki wrote: > > > + acpi_get_parent(device->dev->handle, _parent); > > > + > > > + pdev = acpi_get_pci_dev(acpi_parent); > > > + if (pdev) { > > > +

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-06 Thread Matthew Garrett
On Mon, Feb 07, 2011 at 12:01:25AM +0100, Rafael J. Wysocki wrote: > Yes, it seems so, but I'm not sure what the short term consequences of that > change will be. Perhaps there will be none. :-) Ok, I'll have a play with that. Maybe we should be fixing this up somehow in the acpi-pci glue

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-06 Thread Matthew Garrett
On Sun, Feb 06, 2011 at 11:41:19PM +0100, Rafael J. Wysocki wrote: > On Sunday, February 06, 2011, Matthew Garrett wrote: > > Ugh. Ok, how can we fix this? > > Not nicely, I'm afraid. > > One possible way is to use device_pm_move_after() to rearrange the devices in > the PM core's suspend list,

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-06 Thread Rafael J. Wysocki
On Friday, January 14, 2011, Matthew Garrett wrote: > Dual-GPU machines may provide more than one ACPI backlight interface. Tie > the backlight device to the GPU in order to allow userspace to identify > the correct interface. > > Signed-off-by: Matthew Garrett Sorry for the late response, but

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-06 Thread Matthew Garrett
On Sun, Feb 06, 2011 at 09:35:07PM +0100, Rafael J. Wysocki wrote: > > + acpi_get_parent(device->dev->handle, _parent); > > + > > + pdev = acpi_get_pci_dev(acpi_parent); > > + if (pdev) { > > + parent = >dev; > > +

Re: [PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-06 Thread Rafael J. Wysocki
On Friday, January 14, 2011, Matthew Garrett wrote: Dual-GPU machines may provide more than one ACPI backlight interface. Tie the backlight device to the GPU in order to allow userspace to identify the correct interface. Signed-off-by: Matthew Garrett m...@redhat.com Sorry for the late

Re: [PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-06 Thread Matthew Garrett
On Sun, Feb 06, 2011 at 09:35:07PM +0100, Rafael J. Wysocki wrote: + acpi_get_parent(device-dev-handle, acpi_parent); + + pdev = acpi_get_pci_dev(acpi_parent); + if (pdev) { + parent = pdev-dev; + pci_dev_put(pdev); +

Re: [PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-06 Thread Matthew Garrett
On Sun, Feb 06, 2011 at 11:41:19PM +0100, Rafael J. Wysocki wrote: On Sunday, February 06, 2011, Matthew Garrett wrote: Ugh. Ok, how can we fix this? Not nicely, I'm afraid. One possible way is to use device_pm_move_after() to rearrange the devices in the PM core's suspend list, but that

Re: [PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-06 Thread Rafael J. Wysocki
On Sunday, February 06, 2011, Matthew Garrett wrote: On Sun, Feb 06, 2011 at 11:41:19PM +0100, Rafael J. Wysocki wrote: On Sunday, February 06, 2011, Matthew Garrett wrote: Ugh. Ok, how can we fix this? Not nicely, I'm afraid. One possible way is to use device_pm_move_after() to

Re: [PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-06 Thread Matthew Garrett
On Mon, Feb 07, 2011 at 12:01:25AM +0100, Rafael J. Wysocki wrote: Yes, it seems so, but I'm not sure what the short term consequences of that change will be. Perhaps there will be none. :-) Ok, I'll have a play with that. Maybe we should be fixing this up somehow in the acpi-pci glue code?

Re: [PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-02-06 Thread Rafael J. Wysocki
On Monday, February 07, 2011, Matthew Garrett wrote: On Mon, Feb 07, 2011 at 12:01:25AM +0100, Rafael J. Wysocki wrote: Yes, it seems so, but I'm not sure what the short term consequences of that change will be. Perhaps there will be none. :-) Ok, I'll have a play with that. Maybe we

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-01-14 Thread Matthew Garrett
Dual-GPU machines may provide more than one ACPI backlight interface. Tie the backlight device to the GPU in order to allow userspace to identify the correct interface. Signed-off-by: Matthew Garrett m...@redhat.com --- drivers/acpi/video.c | 15 ++- 1 files changed, 14

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2010-11-19 Thread Matthew Garrett
Dual-GPU machines may provide more than one ACPI backlight interface. Tie the backlight device to the GPU in order to allow userspace to identify the correct interface. Signed-off-by: Matthew Garrett --- drivers/acpi/video.c | 15 ++- 1 files changed, 14 insertions(+), 1