NetBSD-Bugs archive

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

Re: kern/49424: DRMKMS failure on Lenovo T410s with amd64/7.0_BETA



The following reply was made to PR kern/49424; it has been noted by GNATS.

From: Havard Eidnes <he%NetBSD.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/49424: DRMKMS failure on Lenovo T410s with amd64/7.0_BETA
Date: Wed, 03 Dec 2014 09:15:35 +0100 (CET)

 >  agp0 at pchb0: G4X-family chipset
 >  agp0: detected 32252k stolen memory
 >  agp0: aperture at 0xd0000000, size 0x10000000
 >  i915drmkms0 at pci0 dev 2 function 0: Intel Iron Lake Integrated Graphics Device (rev. 0x02)
 >  drm: Memory usable by graphics device: 512M
 >  panic: lockdebug_lookup: uninitialized lock (lock=0xffffffff81158000, from=ffffffff8053c715)
 >  fatal breakpoint trap in supervisor mode
 ...
 >  db{0}> trace
 >  breakpoint() at netbsd:breakpoint+0x5
 >  vpanic() at netbsd:vpanic+0x13c
 >  snprintf() at netbsd:snprintf
 >  lockdebug_locked() at netbsd:lockdebug_locked
 >  mutex_enter() at netbsd:mutex_enter+0x43f
 >  intel_disable_gt_powersave() at netbsd:intel_disable_gt_powersave+0x104
 >  intel_uncore_sanitize() at netbsd:intel_uncore_sanitize+0x13
 >  i915_driver_load() at netbsd:i915_driver_load+0x8da
 
 And ... it looks indeed like i915_driver_load() does not
 initialize the lock for the power management sub-struct,
 dev_priv->rps.hw_lock after zero-allocating dev_priv.  May I
 suggest:
 
 Index: i915_dma.c
 ===================================================================
 RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c,v
 retrieving revision 1.12
 diff -u -r1.12 i915_dma.c
 --- i915_dma.c  5 Nov 2014 23:46:09 -0000       1.12
 +++ i915_dma.c  3 Dec 2014 08:05:21 -0000
 @@ -1645,9 +1645,11 @@ int i915_driver_load(struct drm_device *
  #ifdef __NetBSD__
         linux_mutex_init(&dev_priv->dpio_lock);
         linux_mutex_init(&dev_priv->modeset_restore_lock);
 +       linux_mutex_init(&dev_priv->rps.hw_lock);
  #else
         mutex_init(&dev_priv->dpio_lock);
         mutex_init(&dev_priv->modeset_restore_lock);
 +       mutex_init(&dev_priv->rps.hw_lock);
  #endif
  
         intel_pm_setup(dev);
 
 There's already a release of this mutex with an XXX comment near
 the end of this function:
 
 free_priv:
         /* XXX intel_pm_fini */
         linux_mutex_destroy(&dev_priv->rps.hw_lock);
 
 and another in i915_driver_unload(), but there's neither an
 intel_pm_fini nor an intel_pm_init anywhere to be seen.
 
 I'll test this change shortly.
 
 Regards,
 
 - Havard
 


Home | Main Index | Thread Index | Old Index