Bug 109724

Summary: [agp] X11 fonts corrupt when loading i915 at boot time
Product: Base System Reporter: FUJIMOTO Kou <fujimoto>
Component: kernAssignee: Eric Anholt <anholt>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 6.2-STABLE   
Hardware: Any   
OS: Any   

Description FUJIMOTO Kou 2007-03-01 16:20:05 UTC
When I load i915.ko at /boot/loader.conf (or enabled in kernel), kernel
recognize my 855GME internal VGA controller as: 
=====================================================================
agp1: <Intel 82855GME (855GME GMCH) SVGA controller> port 0xe300-0xe307 mem 0xe0000000-0xe7ffffff,0xe8100000-0xe817ffff irq 16 at device 2.0 on pci0
agp1: detected 32636k stolen memory
agp1: aperture size is 128M
drmsub0: <Intel i852GM/i855GM GMCH>: (child of agp_i810.c) on agp1
info: [drm] AGP at 0xd0000000 256MB
info: [drm] Initialized i915 1.5.0 20060119
=====================================================================
After finishing boot sequence, X works but fonts looks like corrupted. 
Kernel reports "agp_generic_alloc_memory: unsupported type 2" 
messages 3 times.

Just unloading all related KLMs (i915, drm and agp) and reloading them, 
kernel messages are as follows:
=====================================================================
drmsub0: detached
agp1: detached
agp_intel_detach: set MCHCFG to 1
agp_intel_detach: set NBXCFG to 540101
agp0: detached
agp0: <Intel 82855GME (855GME GMCH) SVGA controller> port 0xe300-0xe307 mem 0xe0000000-0xe7ffffff,0xe8100000-0xe817ffff irq 16 at device 2.0 on pci0
agp0: detected 32636k stolen memory
agp0: aperture size is 128M
drmsub0: <Intel i852GM/i855GM GMCH>: (child of agp_i810.c) on agp0
info: [drm] AGP at 0xe0000000 128MB
info: [drm] Initialized i915 1.5.0 20060119
=====================================================================
X works fine and all fonts are displayed without any corruption.

Fix: 

1. Configuring kernel without agp, drm and i915drm.
2. Boot without loading i915.
3. "kldload i915" at command prompt.
How-To-Repeat: i915_enable="YES" in /boot/loader.conf, or build agp, drm and i915drm 
devices into kernel.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2007-07-09 20:05:29 UTC
Responsible Changed
From-To: freebsd-bugs->anholt

anholt wants agp PRs.
Comment 2 dfilter service freebsd_committer freebsd_triage 2007-07-13 17:28:20 UTC
anholt      2007-07-13 16:28:12 UTC

  FreeBSD src repository

  Modified files:
    sys/pci              agp.c agp_i810.c agppriv.h agpreg.h 
  Log:
  Add support for G965/Q965/GM965/GME965/GME945 AGP.
  
  This adds a function to agp.c to set the aperture resource ID if it's
  not the usual AGP_APBASE.  Previously, agp.c had been assuming
  AGP_APBASE, which resulted in incorrect agp_info, and contortions by
  agp_i810.c to work around it.
  
  This also adds functions to agp.c for default AGP_GET_APERTURE() and
  AGP_SET_APERTURE(), which return the aperture resource size and disallow
  aperture size changes.  Moving to these for our AGP drivers will likely
  result in stability improvements.  This should fix 855-class aperture
  size detection.
  
  Additionally, refuse to attach agp_i810 when some RAM is above 4GB and
  the GART can't reference memory that high.  This should be very rare.
  The correct solution would be bus_dma conversion for agp, which is
  beyond the scope of this change.  Other AGP drivers could likely use
  this change as well.
  
  G33/Q35/Q33 AGP support is also included, but disconnected by default
  due to lack of testing.
  
  PR:             kern/109724 (855 aperture issue)
  Submitted by:   FUJIMOTO Kou<fujimoto@j.dendai.ac.jp>
  Approved by:    re (hrs)
  
  Revision  Changes    Path
  1.56      +52 -5     src/sys/pci/agp.c
  1.40      +306 -224  src/sys/pci/agp_i810.c
  1.6       +5 -0      src/sys/pci/agppriv.h
  1.19      +25 -2     src/sys/pci/agpreg.h
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Eric Anholt freebsd_committer freebsd_triage 2007-07-13 17:40:03 UTC
State Changed
From-To: open->feedback

I think this should be fixed in -current.  Could you re-test?
Comment 4 Remko Lodder freebsd_committer freebsd_triage 2007-11-09 09:25:44 UTC
State Changed
From-To: feedback->closed

No reply since  july of this year, this is resolved unless stated else.