Re: Xorg causes panics with multiple drivers (Was: panic: resource_list_alloc: resource entry is busy)

2014-09-26 Thread John Baldwin
On Monday, September 15, 2014 11:25:47 AM John Baldwin wrote:
 On Saturday, September 13, 2014 10:57:53 AM d...@gmx.com wrote:
  John Baldwin wrote on 09/12/2014 23:06:
   X loaded i915kms automatically and
   i915 and i915kms do not get along.  i915 had already allocated the IRQ
   when i915kms tried to alloc the same IRQ causing the issue.
  
  Who is to blame? The user who tried to manually load an unsupported
  combination of modules, or the system, which should have handled things
  gracefully (whether by automatically unloading the first driver, or
  producing a soft-error upon loading the 2nd driver)?
  
  On a side-note, I also had a resource_list_alloc: resource entry is busy
  panic right after switching from the 10.0-supported Xorg to the new
  Xorg;
  I exited Xorg, enabled FreeBSD_new_Xorg, ran pkg upgrade, then ran
  startx, and got the panic. Surely this wasn't my fault!
 
 I can turn the panic into a resource allocation failure, but specifically
 with KMS I am unsure if it will actually be better. 

FYI, I wrote a test for the patch I sent to make this not panic and verified 
it worked ok and committed it.

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Xorg causes panics with multiple drivers (Was: panic: resource_list_alloc: resource entry is busy)

2014-09-15 Thread John Baldwin
On Saturday, September 13, 2014 10:57:53 AM d...@gmx.com wrote:
 John Baldwin wrote on 09/12/2014 23:06:
  X loaded i915kms automatically and
  i915 and i915kms do not get along.  i915 had already allocated the IRQ
  when i915kms tried to alloc the same IRQ causing the issue.
 
 Who is to blame? The user who tried to manually load an unsupported
 combination of modules, or the system, which should have handled things
 gracefully (whether by automatically unloading the first driver, or
 producing a soft-error upon loading the 2nd driver)?
 
 On a side-note, I also had a resource_list_alloc: resource entry is busy
 panic right after switching from the 10.0-supported Xorg to the new Xorg;
 I exited Xorg, enabled FreeBSD_new_Xorg, ran pkg upgrade, then ran
 startx, and got the panic. Surely this wasn't my fault!

I can turn the panic into a resource allocation failure, but specifically with 
KMS I am unsure if it will actually be better.  It depends on when the driver 
does this IRQ allocation.   You may very well end up with a black screen and a 
seemingly hung system (though it would not actually be hung).

I do think we should fix i915kms to fail fast if i915 is loaded, or more 
likely I think we should probably look at removing the old i915 driver from 
HEAD entirely so that 11 doesn't ship with it.  It won't work with the Xorg we 
are shipping with 11, so it's really dead code at this point.

The proposed diff would be:

Index: subr_bus.c
===
--- subr_bus.c  (revision 271627)
+++ subr_bus.c  (working copy)
@@ -3301,7 +3301,10 @@ resource_list_alloc(struct resource_list *rl, devi
rle-flags |= RLE_ALLOCATED;
return (rle-res);
}
-   panic(resource_list_alloc: resource entry is busy);
+   device_printf(bus,
+   resource entry %#x type %d for child %s is busy\n, *rid,
+   type, device_get_nameunit(child));
+   return (NULL);
}
 
if (isdefault) {

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Xorg causes panics with multiple drivers (Was: panic: resource_list_alloc: resource entry is busy)

2014-09-13 Thread dt71

John Baldwin wrote on 09/12/2014 23:06:

X loaded i915kms automatically and
i915 and i915kms do not get along.  i915 had already allocated the IRQ
when i915kms tried to alloc the same IRQ causing the issue.


Who is to blame? The user who tried to manually load an unsupported combination 
of modules, or the system, which should have handled things gracefully (whether 
by automatically unloading the first driver, or producing a soft-error upon 
loading the 2nd driver)?

On a side-note, I also had a resource_list_alloc: resource entry is busy panic right after switching from the 
10.0-supported Xorg to the new Xorg; I exited Xorg, enabled FreeBSD_new_Xorg, ran pkg 
upgrade, then ran startx, and got the panic. Surely this wasn't my fault!

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org