Here it is.
Maarten.
On 10/2/07, Maarten Maathuis <[EMAIL PROTECTED]> wrote:
> You seem to be correct, i must have added the tmp variable in attempt
> to solve something, that i ended up solving differently.
>
> I will redo the patch and send again.
>
> Maarten.
>
> On 10/2/07, Ian Romanick <[EMAIL PROTECTED]> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Maarten Maathuis wrote:
> > > Please check the first patch, the second is only to give you an idea
> > > why i would want this. Only implemented for linux, since i lack a bsd
> > > system.
> > >
> > > Anything wrong with this?
> >
> >
> > I guess I don't understand the need for the extra pdev_tmp variable.
> > Couldn't you get the same result by just adding the following at the
> > head of the loop?
> >
> > if ((pid->class != 0)
> > && ((pdev->class & pid->class_mask) != pid->class)) {
> > continue;
> > }
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.7 (GNU/Linux)
> >
> > iD8DBQFHAp6qX1gOwKyEAw8RAvJjAJ0X1M8jcnltRxj0h9sZZx1L2sXi4gCfTHlR
> > vU+ZkjghLs4x/2Al41Q+DF8=
> > =eowq
> > -----END PGP SIGNATURE-----
> >
>
From 014c78d6e63f0f715cdca2d33e3c0c4aa1c62370 Mon Sep 17 00:00:00 2001
From: Maarten Maathuis <[EMAIL PROTECTED]>
Date: Tue, 2 Oct 2007 21:54:37 +0200
Subject: [PATCH] linux-drm: Obey device class requirements when detecting devices.
---
linux-core/drm_drv.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 7359889..a09fa96 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -321,6 +321,11 @@ int drm_init(struct drm_driver *driver,
while ((pdev =
pci_get_subsys(pid->vendor, pid->device, pid->subvendor,
pid->subdevice, pdev))) {
+ /* Are there device class requirements? */
+ if ((pid->class != 0)
+ && ((pdev->class & pid->class_mask) != pid->class)) {
+ continue;
+ }
/* is there already a driver loaded, or (short circuit saves work) */
/* does something like VesaFB have control of the memory region? */
if (pci_dev_driver(pdev)
@@ -347,6 +352,11 @@ int drm_init(struct drm_driver *driver,
pci_get_subsys(pid->vendor, pid->device,
pid->subvendor, pid->subdevice,
pdev))) {
+ /* Are there device class requirements? */
+ if ((pid->class != 0)
+ && ((pdev->class & pid->class_mask) != pid->class)) {
+ continue;
+ }
/* stealth mode requires a manual probe */
pci_dev_get(pdev);
if ((rc = drm_get_dev(pdev, &pciidlist[i], driver))) {
--
1.5.3.3
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel