From nobody@FreeBSD.org  Mon Feb  4 17:24:50 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 273D816A419
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  4 Feb 2008 17:24:50 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 1445713C447
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  4 Feb 2008 17:24:50 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m14HMpqG085237
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 4 Feb 2008 17:22:51 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m14HMpr8085236;
	Mon, 4 Feb 2008 17:22:51 GMT
	(envelope-from nobody)
Message-Id: <200802041722.m14HMpr8085236@www.freebsd.org>
Date: Mon, 4 Feb 2008 17:22:51 GMT
From: John Smith <p9_gkvye@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: 6.3-RELEASE i386; [drm] "0MB"; no dri with i915G
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         120262
>Category:       kern
>Synopsis:       [drm] "0MB"; no dri with i915G [regression]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rnoland
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 04 17:30:02 UTC 2008
>Closed-Date:    Tue Mar 01 06:06:30 UTC 2011
>Last-Modified:  Tue Mar 01 06:06:30 UTC 2011
>Originator:     John Smith
>Release:        6.3-RELEASE
>Organization:
>Environment:
FreeBSD localhost.localdomain 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Sun Jan 20 11:35:22 EST 2008     root@localhost.localdomain:/usr/obj/usr/src/sys/SMP01  i386
>Description:
I have an Intel i915G onboard graphics device that uses 8MB of shared
memory.  After installing 6.3-RELEASE i386, I compiled a kernel with the
drm and i915drm devices enabled (and leaving the agp device enabled).

On boot, agp0 detects 8MB of memory for the i915G, and /dev/agpgart is
created.  But [drm] reports 0MB.  Consequently (?), the kernel reports
0 memory available to the i810 driver in xorg, and dri is disabled.
(The new "intel" display driver is worse -- xorg won't even run,
complaining of insufficient memory.)

When I was using 6.1-RELEASE on this same hardware back in 2006, I
implemented Eric Anholt's May, 2006, source modifications in
/usr/src/sys/dev/drm.  Then, with the drm and i915drm devices in the
kernel, [drm] reported 8MB of memory, and dri in xorg worked after
persuading the BIOS that there were 12MB.  I'm therefore inclined to
deem the present condition a regression.

The 2006 drm patches won't compile in 6.3, apparently owing to
subsequent changes in the code for the agp or pci devices.  The 6.3
version of drm_agpsupport.c treats 6.3 the way Mr. Anholt's 2006
version treated 7.x, skipping some detection routines.

====================

processor & RAM:
Pentium 4, 2.8 GHz, HTT enabled
2.25 GB RAM

====================

kernel configuration:
GENERIC/SMP except: device drm and device i915drm added; options SC_PIXEL_MODE added; cpu I486_CPU and cpu I586_CPU removed

====================

from pciconf:
agp0@pci0:2:0:  class=0x030000 card=0x819c104d chip=0x25828086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82915G/GV/GL, 82910GL Integrated Graphics Device'
    class      = display
    subclass   = VGA
    cap 01[d0] = powerspec 2  supports D0 D3  current D0

====================

from dmesg:
FreeBSD 6.3-RELEASE #0: Sun Jan 20 11:35:22 EST 2008
    root@localhost.localdomain:/usr/obj/usr/src/sys/SMP01
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (2799.99-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf41  Stepping = 1
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x441d<SSE3,RSVD2,MON,DS_CPL,CNXT-ID,xTPR>
  AMD Features=0x100000<NX>
  Logical CPUs per core: 2
real memory  = 2406674432 (2295 MB)
avail memory = 2346762240 (2238 MB)
ACPI APIC Table: <INTEL  D915GAG >
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0 <Version 2.0> irqs 0-23 on motherboard
..
agp0: <Intel 82915G (915G GMCH) SVGA controller> port 0xec00-0xec07 mem 0xff480000-0xff4fffff,0xd0000000-0xdfffffff,0xff440000-0xff47ffff irq 16 at device 2.0 on pci0
agp0: detected 7932k stolen memory
agp0: aperture size is 256M
drmsub0: <Intel i915G>: (child of agp_i810.c) on agp0
info: [drm] AGP at 0xff480000 0MB
                              ^^^
info: [drm] Initialized i915 1.5.0 20060119

====================

from Xorg.0.log:
(II) I810(0): VESA VBE Total Mem: 7872 kB
(II) I810(0): VESA VBE OEM: Intel(r)915G/915GV/910GL Graphics Chip Accelerated VGA BIOS
(II) I810(0): VESA VBE OEM Software Rev: 1.0
(II) I810(0): VESA VBE OEM Vendor: Intel Corporation
(II) I810(0): VESA VBE OEM Product: Intel(r)915G/915GV/910GL Graphics Controller
(II) I810(0): VESA VBE OEM Product Rev: Hardware Version 0.0
(II) I810(0): Integrated Graphics Chipset: Intel(R) 915G
(--) I810(0): Chipset: "915G"
(--) I810(0): Linear framebuffer at 0xD0000000
(--) I810(0): IO registers at addr 0xFF480000
(==) I810(0): Write-combining range (0xff480000,0x80000) was already clear
(II) I810(0): 2 display pipes available.
(II) I810(0): detected 7932 kB stolen memory.
(II) I810(0): Kernel reported 0 total, 0 used
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(II) I810(0): I830CheckAvailableMemory: 0 kB available
                                        ^^^^
(WW) I810(0): /dev/agpgart is either not available, or no memory is available
for allocation.  Using pre-allocated memory only.
(II) I810(0): Will try to reserve 32768 kiB of AGP aperture space
        for the DRM memory manager.
(WW) I810(0): VideoRAM reduced to 7932 kByte (limited to available sysmem)
(--) I810(0): Pre-allocated VideoRAM: 7932 kByte
(--) I810(0): VideoRAM: 7932 kByte
..
(II) I810(0): 6632 kBytes additional video memory is required to
        enable tiling mode for DRI.
(II) I810(0): 4584 kBytes additional video memory is required to enable DRI.
(II) I810(0): Disabling DRI.

====================

% ls -l /dev/agp*
crw-------  1 root  wheel    0,  32 Feb  4 08:58 /dev/agpgart

% kldstat -v |grep drm
<not found>

% kldstat -v |grep agp
                88 agp/i915
                388 pci/agp_ali
                389 pci/agp_amd
                390 pci/agp_amd64
                391 pci/agp_ati
                392 pci/agp_i810
                393 pci/agp_intel
                394 pci/agp_nvidia
                395 pci/agp_sis
                396 pci/agp_via

END


>How-To-Repeat:
Persistent on my hardware.
>Fix:
Unknown.

>Release-Note:
>Audit-Trail:

From: p9_gkvye <p9_gkvye@yahoo.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/120262: 6.3-RELEASE i386; [drm] "0MB"; no dri with i915G
Date: Mon, 4 Feb 2008 17:31:56 -0800 (PST)

 [WORKAROUND]
 
 I now have DRI.  I removed a 256-MB RAM module,
 equalizing the RAM to 1 GB per channel, and the
 machine now operates in dual-channel mode.  On boot,
 [drm] still reports 0MB, but the i810 driver in xorg
 sees the kernel reporting positive memory, and
 I830CheckAvailableMemory finds almost 2GB available.
 
 When I wrote that I was using the same hardware as
 with 6.1 in 2006, I had forgotten about adding RAM in
 the interim.  (I had not run 6.1 since the great xorg
 upgrade last spring, and I skipped 6.2.)  At that time
 I had a single 256-MB module operating in
 single-channel mode -- apparently having the second
 channel empty did not create the same problem I've had
 recently.
 
 It seems odd that the RAM would make a difference, but
 I confirmed the workaround by re-installing the 256-MB
 module, and again lost DRI; I removed it once more,
 and DRI returned.
 
 END
 
 
 
       ____________________________________________________________________________________
 Never miss a thing.  Make Yahoo your home page. 
 http://www.yahoo.com/r/hs
 
Responsible-Changed-From-To: freebsd-bugs->anholt 
Responsible-Changed-By: remko 
Responsible-Changed-When: Tue Feb 5 06:34:26 UTC 2008 
Responsible-Changed-Why:  
Hi Eric, this might be something for you ? (drm) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120262 
Responsible-Changed-From-To: anholt->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Aug 8 00:26:30 UTC 2008 
Responsible-Changed-Why:  
Assignee has asked to resign his commit bit, so return this one to pool. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120262 
Responsible-Changed-From-To: freebsd-bugs->rnoland 
Responsible-Changed-By: joel 
Responsible-Changed-When: Mon Sep 15 16:28:11 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120262 
State-Changed-From-To: open->feedback 
State-Changed-By: rnoland 
State-Changed-When: Sun Nov 1 17:51:38 UTC 2009 
State-Changed-Why:  
Safe to close this PR? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120262 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Tue Mar 1 06:05:56 UTC 2011 
State-Changed-Why:  
Feedback timeout (> 1 year). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120262 
>Unformatted:
