NetBSD-Bugs archive

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

re: xsrc/48344: X sesrver crashes with "lockup" on certain i810e-based systems



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

From: "John D. Baker" <jdbaker%mylinuxisp.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: matthew green <mrg%eterna.com.au@localhost>
Subject: re: xsrc/48344: X sesrver crashes with "lockup" on certain i810e-based
 systems
Date: Tue, 22 Jul 2014 09:20:13 -0500 (CDT)

 I took a different tack and started with r1.69, adding in what appeared
 to be the least-offensive changes toward r1.70.  The culprit that breaks
 things for the Dell GX110s is:
 
 @@ -996,7 +1001,7 @@ agp_i810_bind_memory(struct agp_softc *s
                 return EINVAL;
  
         for (i = 0; i < mem->am_size; i += AGP_PAGE_SIZE)
 -               agp_i810_write_gtt_entry(isc, offset, i | 3);
 +               agp_i810_write_gtt_entry(isc, i, i | 3);
         mem->am_is_bound = 1;
         return 0;
  }
 
 I'm pretty sure both versions are wrong.  r1.69 because it doesn't
 increment the offset in subsequent calls to "agp_i810_write_gtt_entry()",
 r1.70 because it starts at the wrong offset (0).
 
 The following patch against r1.70 of "sys/dev/pci/agp_i810c" allows the
 X server to work properly on the Dell Optiplex GX110s.  (I'm using a
 "netbsd-6" baseline with that one file reverted, so it needs the change
 in "agp_i810_vgamatch()" to appease the compiler.)
 
 There is one quirk:  the mouse pointer is invisble until the first time
 it needs to be redrawn--crossing an element boundary, button press, etc.
 
 +Index: sys/dev/pci/agp_i810.c
 +===================================================================
 +RCS file: /cvsroot/src/sys/dev/pci/agp_i810.c,v
 +retrieving revision 1.70
 +diff -u -p -r1.70 agp_i810.c
 +--- sys/dev/pci/agp_i810.c    25 Jan 2011 10:52:11 -0000      1.70
 ++++ sys/dev/pci/agp_i810.c    22 Jul 2014 14:09:15 -0000
 +@@ -147,7 +147,7 @@ agp_i810_write_gtt_entry(struct agp_i810
 + 
 + /* XXXthorpej -- duplicated code (see arch/x86/pci/pchb.c) */
 + static int
 +-agp_i810_vgamatch(struct pci_attach_args *pa)
 ++agp_i810_vgamatch(const struct pci_attach_args *pa)
 + {
 + 
 +      if (PCI_CLASS(pa->pa_class) != PCI_CLASS_DISPLAY ||
 +@@ -1001,7 +1001,7 @@ agp_i810_bind_memory(struct agp_softc *s
 +              return EINVAL;
 + 
 +      for (i = 0; i < mem->am_size; i += AGP_PAGE_SIZE)
 +-             agp_i810_write_gtt_entry(isc, i, i | 3);
 ++             agp_i810_write_gtt_entry(isc, offset+i, i | 3);
 +      mem->am_is_bound = 1;
 +      return 0;
 + }
 +@@ -1030,7 +1030,7 @@ agp_i810_unbind_memory(struct agp_softc 
 +              return EINVAL;
 + 
 +      for (i = 0; i < mem->am_size; i += AGP_PAGE_SIZE)
 +-             agp_i810_write_gtt_entry(isc, i, 0);
 ++             agp_i810_write_gtt_entry(isc, mem->am_offset+i, 0);
 +      mem->am_is_bound = 0;
 +      return 0;
 + }
 
 Now that I have the HP Pavilion something-or-other up and running, I
 need to make sure this doesn't break things on it.
 
 Then, I intend to apply a similar change to r1.73 which is the version
 of the file in the "netbsd-6" branch.
 
 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645
 


Home | Main Index | Thread Index | Old Index