Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/radeon disable drmkms on r100 and most...



details:   https://anonhg.NetBSD.org/src/rev/1e2afcd81f9f
branches:  trunk
changeset: 338523:1e2afcd81f9f
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri May 29 05:48:46 2015 +0000

description:
disable drmkms on r100 and most r200.  works around PR#49744, etc.

diffstat:

 sys/external/bsd/drm2/radeon/radeon_pci.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r 92c73a5ba9df -r 1e2afcd81f9f sys/external/bsd/drm2/radeon/radeon_pci.c
--- a/sys/external/bsd/drm2/radeon/radeon_pci.c Fri May 29 02:06:46 2015 +0000
+++ b/sys/external/bsd/drm2/radeon/radeon_pci.c Fri May 29 05:48:46 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_pci.c,v 1.9 2015/04/19 01:08:56 mrg Exp $       */
+/*     $NetBSD: radeon_pci.c,v 1.10 2015/05/29 05:48:46 mrg Exp $      */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.9 2015/04/19 01:08:56 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.10 2015/05/29 05:48:46 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "vga.h"
@@ -118,10 +118,14 @@
 extern const struct pci_device_id *const radeon_device_ids;
 extern const size_t radeon_n_device_ids;
 
+/* Set this to false if you want to match R100/R200 */
+bool radeon_pci_ignore_r100_r200 = true;
+
 static bool
 radeon_pci_lookup(const struct pci_attach_args *pa, unsigned long *flags)
 {
        size_t i;
+       enum radeon_family fam;
 
        for (i = 0; i < radeon_n_device_ids; i++) {
                if ((PCI_VENDOR(pa->pa_id) == radeon_device_ids[i].vendor) &&
@@ -133,6 +137,11 @@
        if (i == radeon_n_device_ids)
                return false;
 
+       /* NetBSD drm2 fails on R100 and many R200 chipsets, disable for now  */
+       fam = radeon_device_ids[i].driver_data & RADEON_FAMILY_MASK;
+       if (radeon_pci_ignore_r100_r200 && fam < CHIP_RV280)
+               return false;
+
        if (flags)
                *flags = radeon_device_ids[i].driver_data;
        return true;



Home | Main Index | Thread Index | Old Index