[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <68676e01003090301s5bb40d4hac1224a9658339ac@mail.gmail.com>
Date: Tue, 9 Mar 2010 12:01:18 +0100
From: Luca Tettamanti <kronos.it@...il.com>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: LKML <linux-kernel@...r.kernel.org>,
Matthew Garrett <mjg59@...f.ucam.org>,
Linux PCI <linux-pci@...r.kernel.org>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
pm list <linux-pm@...ts.linux-foundation.org>,
dri-devel@...ts.sourceforge.net
Subject: Re: [Q] How to tell we're using the KMS (during suspend/resume)
outside the graphics driver
On Sat, Mar 6, 2010 at 10:36 PM, Rafael J. Wysocki <rjw@...k.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(), because that has a potential to mess up with the GPU
> (it actually is known to do that on at least one system).
>
> 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 two
> graphics adapters with different drivers in the system and so forth.
Inside the kernel? If you have a struct pci_dev you can get the
associated struct drm_device with pci_get_drvdata and then check the
KMS feature: drm_core_check_feature(dev, DRIVER_MODESET).
I'm note sure how to check that a device is graphic card though :|
Luca
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists