Re: X hangs with radeon drm ever since the introduction of intr_shared_edge into i386

2011-12-06 Thread Mark Kettenis
 Date: Mon, 5 Dec 2011 16:21:23 -0500
 From: Stuart Cassoff s...@bell.net
 
   Ever since the commit of 2011/04/15
   (http://marc.info/?l=openbsd-cvsm=130291453723298) which
   enables intr_shared_edge, X will hang on startup if radeom drm
   is enabled.  I have tested many kernels and have pinpointed it
   to this.  I am able to make it work with the snapshots of Dec
   1, 2011 and kernel as of today, Dec 5, 2011, with the small
   change detailed below.

What happens if you disable esa(4)?



Re: X hangs with radeon drm ever since the introduction of intr_shared_edge into i386

2011-12-06 Thread Stuart Cassoff
On 12/06/11 06:28, Mark Kettenis wrote:
 Date: Mon, 5 Dec 2011 16:21:23 -0500
 From: Stuart Cassoff s...@bell.net

  Ever since the commit of 2011/04/15
  (http://marc.info/?l=openbsd-cvsm=130291453723298) which
  enables intr_shared_edge, X will hang on startup if radeom drm
  is enabled.  I have tested many kernels and have pinpointed it
  to this.  I am able to make it work with the snapshots of Dec
  1, 2011 and kernel as of today, Dec 5, 2011, with the small
  change detailed below.
 
 What happens if you disable esa(4)?

With esa(4) disabled, X will start up just fine, kernel snapshot of Dec 1, 2011.



Re: X hangs with radeon drm ever since the introduction of intr_shared_edge into i386

2011-12-06 Thread Mark Kettenis
 Date: Tue, 6 Dec 2011 08:00:57 -0500
 From: Stuart Cassoff s...@bell.net
 
 On 12/06/11 06:28, Mark Kettenis wrote:
  Date: Mon, 5 Dec 2011 16:21:23 -0500
  From: Stuart Cassoff s...@bell.net
 
 Ever since the commit of 2011/04/15
 (http://marc.info/?l=openbsd-cvsm=130291453723298) which
 enables intr_shared_edge, X will hang on startup if radeom drm
 is enabled.  I have tested many kernels and have pinpointed it
 to this.  I am able to make it work with the snapshots of Dec
 1, 2011 and kernel as of today, Dec 5, 2011, with the small
 change detailed below.
  
  What happens if you disable esa(4)?
 
 With esa(4) disabled, X will start up just fine, kernel snapshot of Dec 1, 
 2011.

Great!  Can you try the attached diff?

Index: esa.c
===
RCS file: /cvs/src/sys/dev/pci/esa.c,v
retrieving revision 1.23
diff -u -p -u -p -r1.23 esa.c
--- esa.c   3 Apr 2011 15:36:02 -   1.23
+++ esa.c   6 Dec 2011 14:51:04 -
@@ -874,7 +874,7 @@ esa_intr(void *hdl)
u_int32_t diff;
u_int32_t play_blksize, play_bufsize;
u_int32_t rec_blksize, rec_bufsize;
-   int i;
+   int i, claimed = 0;
 
status = bus_space_read_1(iot, ioh, ESA_HOST_INT_STATUS);
if (status == 0xff)
@@ -901,6 +901,7 @@ esa_intr(void *hdl)
break;
}
bus_space_write_1(iot, ioh, ESA_HW_VOL_COUNTER_MASTER, 0x88);
+   claimed = 1;
}
 
if (status  ESA_ASSP_INT_PENDING) {
@@ -945,9 +946,10 @@ esa_intr(void *hdl)
}
}
}
+   claimed = 1;
}
 
-   return (1);
+   return (claimed);
 }
 
 int