lkml.org 
[lkml]   [2010]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver
Date
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 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).
> >
> > Yeah, I know that.
> >
> > > 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. :-)
>
> if ((pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA)
> ....

I'm not sure if searching through all PCI devices really is an option.

Thanks anyway.

Rafael


\
 
 \ /
  Last update: 2010-03-09 22:07    [W:2.200 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site