Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Apr 2012 22:41:23 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Jose Garcia Juanino <jjuanino@gmail.com>
Cc:        freebsd-x11@freebsd.org
Subject:   Re: Loading i915 module panics my system after patching with Intel GPU patch 14.4 for stable/9
Message-ID:  <20120424194123.GC2358@deviant.kiev.zoral.com.ua>
In-Reply-To: <20120424184459.GB2455@banach>
References:  <20120424184459.GB2455@banach>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Tue, Apr 24, 2012 at 08:45:00PM +0200, Jose Garcia Juanino wrote:
> Hi,
> 
> Scenario: 9.0-STABLE FreeBSD r234656M:
> 
> VGA chipset is:
> 
> vgapci0@pci0:0:2:0:     class=0x030000 card=0x01631028 chip=0x35828086
> rev=0x02 hdr=0x00
> vendor     = 'Intel Corporation'
> device     = '82852/855GM Integrated Graphics Device'
> class      = display
> subclass   = VGA
> vgapci1@pci0:0:2:1:     class=0x038000 card=0x01631028
> chip=0x35828086 rev=0x02 hdr=0x00
> vendor     = 'Intel Corporation'
> device     = '82852/855GM Integrated Graphics
> Device'
> class      = display
> 
> Before apply drm-all.14.4-stable9.1.patch, I can kldload i915, and I
> get:
> 
> drm0: <Intel i852GM/i855GM GMCH> on vgapci0
> info: [drm] AGP at 0xf0000000 128MB
> info: [drm] Initialized i915 1.6.0 20080730
> 
> After applying the patch, I get a panic:
> 
> http://www.mipaginapersonal.movistar.es/web3/jjuanino/core.txt.1
> 
> Any advice will be wellcome.

Apply the patch below on top of 14.4. Most likely, it would cure the
panic on agp attach failure.

Anyway, enable verbose booting, and show me the kernel messages after
kldload i915 is initiated for 14.4 + patch below.

commit 068914b4d6e4ed34d030f7d4dca361afb3a413af
Author: Konstantin Belousov <kib@freebsd.org>
Date:   Tue Apr 24 22:36:05 2012 +0300

    Try to fix the panic on emergency unload.
    Be more informative when reporting memory config problems.
    
    Reported by:	Jose Garcia Juanino <jjuanino@gmail.com>

diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c
index 54777d3..1b0c60d 100644
--- a/sys/dev/agp/agp_i810.c
+++ b/sys/dev/agp/agp_i810.c
@@ -991,7 +991,9 @@ agp_i830_get_stolen_size(device_t dev)
 		break;
 	default:
 		sc->stolen = 0;
-		device_printf(dev, "unknown memory configuration, disabling\n");
+		device_printf(dev,
+		    "unknown memory configuration, disabling (GCC1 %x)\n",
+		    gcc1);
 		return (EINVAL);
 	}
 	return (0);
@@ -1125,7 +1127,9 @@ agp_i915_get_stolen_size(device_t dev)
 			stolen = 0;
 		break;
 	default:
-		device_printf(dev, "unknown memory configuration, disabling\n");
+		device_printf(dev,
+		    "unknown memory configuration, disabling (GCC1 %x)\n",
+		    gcc1);
 		return (EINVAL);
 	}
 
diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c
index b9b8504..1be544f 100644
--- a/sys/dev/drm/drm_drv.c
+++ b/sys/dev/drm/drm_drv.c
@@ -575,7 +575,8 @@ error:
 	DRM_LOCK();
 	drm_lastclose(dev);
 	DRM_UNLOCK();
-	destroy_dev(dev->devnode);
+	if (dev->devnode != NULL)
+		destroy_dev(dev->devnode);
 
 	mtx_destroy(&dev->drw_lock);
 	mtx_destroy(&dev->vbl_lock);
@@ -594,7 +595,8 @@ static void drm_unload(struct drm_device *dev)
 	DRM_DEBUG("\n");
 
 	drm_sysctl_cleanup(dev);
-	destroy_dev(dev->devnode);
+	if (dev->devnode != NULL)
+		destroy_dev(dev->devnode);
 
 	drm_ctxbitmap_cleanup(dev);
 

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iEYEARECAAYFAk+XAeIACgkQC3+MBN1Mb4ilywCg3c9JJeuXvCZ/+pWTDKrwvmAK
0lQAn1nQGhwwaVGWQDZp1lYY7QwF7CA3
=oJT5
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120424194123.GC2358>