Re: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-04-06 Thread Rafał Miłecki
2010/3/10 Matthew Garrett mj...@srcf.ucam.org: On Wed, Mar 10, 2010 at 10:15:26PM +0100, Rafael J. Wysocki wrote: On Wednesday 10 March 2010, Matthew Garrett wrote: As far as the ACPI video driver goes, acpi_get_physical_pci_device() will give you something to work with. Hmm.  Did you mean

Re: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-03-11 Thread Matthew Garrett
On Wed, Mar 10, 2010 at 10:15:26PM +0100, Rafael J. Wysocki wrote: On Wednesday 10 March 2010, Matthew Garrett wrote: As far as the ACPI video driver goes, acpi_get_physical_pci_device() will give you something to work with. Hmm. Did you mean acpi_get_physical_device()? Ah, no,

Re: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-03-11 Thread Matthew Garrett
As far as the ACPI video driver goes, acpi_get_physical_pci_device() will give you something to work with. For the console-switching case, I think the most reasonable plan is probably to add a flag to the console drivers to indicate whether or not they support reprogramming the hardware

Re: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-03-10 Thread Pauli Nieminen
On Wed, Mar 10, 2010 at 7:50 AM, Paul Mundt let...@linux-sh.org wrote: On Tue, Mar 09, 2010 at 10:08:28PM +0100, Rafael J. Wysocki wrote: On Tuesday 09 March 2010, James Simmons wrote: Second, in the KMS case, we'd be able to skip the kernel VT switch, because the KMS driver

Re: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-03-10 Thread Rafael J. Wysocki
On Wednesday 10 March 2010, Matthew Garrett wrote: As far as the ACPI video driver goes, acpi_get_physical_pci_device() will give you something to work with. Hmm. Did you mean acpi_get_physical_device()? Which acpi_device should I call that for? For the console-switching case, I think the

Re: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-03-09 Thread Rafael J. Wysocki
On Tuesday 09 March 2010, Luca Tettamanti wrote: On Sat, Mar 6, 2010 at 10:36 PM, Rafael J. Wysocki r...@sisk.pl wrote: Hi, For at least two reasons it would be beneficial for some code outisde the graphics driver(s) to know if the KMS are used. First, in the non-KMS (ie. UMS) case we

Re: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-03-09 Thread Luca Tettamanti
On Sat, Mar 6, 2010 at 10:36 PM, Rafael J. Wysocki r...@sisk.pl wrote: Hi, For at least two reasons it would be beneficial for some code outisde the graphics driver(s) to know if the KMS are used. First, in the non-KMS (ie. UMS) case we probably wouldn't want to call acpi_video_resume(),

Re: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-03-09 Thread Rafał Miłecki
2010/3/9 Rafael J. Wysocki r...@sisk.pl: On Tuesday 09 March 2010, Luca Tettamanti wrote: I'm note sure how to check that a device is graphic card though :| Well, that's the outside of the graphics driver part of my question. :-) Can we use the same way userspace (DDX) uses to check for KMS?

Re: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-03-09 Thread James Simmons
Second, in the KMS case, we'd be able to skip the kernel VT switch, because the KMS driver uses its own framebuffer anyway. So, is there any reasonable way to check that from the outside of the graphics driver? It should be general enough to cover the cases when there are

Re: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-03-09 Thread Rafael J. Wysocki
On Tuesday 09 March 2010, James Simmons wrote: Second, in the KMS case, we'd be able to skip the kernel VT switch, because the KMS driver uses its own framebuffer anyway. So, is there any reasonable way to check that from the outside of the graphics driver? It

Re: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-03-09 Thread Paul Mundt
On Tue, Mar 09, 2010 at 10:08:28PM +0100, Rafael J. Wysocki wrote: On Tuesday 09 March 2010, James Simmons wrote: Second, in the KMS case, we'd be able to skip the kernel VT switch, because the KMS driver uses its own framebuffer anyway. So, is there any reasonable

[Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-03-06 Thread Rafael J. Wysocki
Hi, For at least two reasons it would be beneficial for some code outisde the graphics driver(s) to know if the KMS are used. First, in the non-KMS (ie. UMS) case we probably wouldn't want to call acpi_video_resume(), because that has a potential to mess up with the GPU (it actually is known to