From nobody@FreeBSD.org  Tue Jan 30 23:04:20 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 86D6216A402
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Jan 2007 23:04:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 603D313C442
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Jan 2007 23:04:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l0UN4KcF051552
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Jan 2007 23:04:20 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l0UN4KlX051541;
	Tue, 30 Jan 2007 23:04:20 GMT
	(envelope-from nobody)
Message-Id: <200701302304.l0UN4KlX051541@www.freebsd.org>
Date: Tue, 30 Jan 2007 23:04:20 GMT
From: Chris Billington<billington.chris@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: White square cursor i915 DRI Xorg 6.9.0 AGP
X-Send-Pr-Version: www-3.0

>Number:         108582
>Category:       kern
>Synopsis:       [agp] White square cursor i915 DRI Xorg 6.9.0 AGP
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 30 23:10:15 GMT 2007
>Closed-Date:    Wed Feb 21 10:36:26 GMT 2007
>Last-Modified:  Wed Feb 21 10:36:26 GMT 2007
>Originator:     Chris Billington
>Release:        6.2-STABLE
>Organization:
>Environment:
FreeBSD presto.emulti.net 6.2-STABLE FreeBSD 6.2-STABLE #5: Sun Jan 28 15:12:32 CET 2007     cbillington@presto.emulti.net:/usr/obj/usr/src/sys/PRESTO  i386
>Description:
When DRI loaded on 6-Stable, with i915GM chipset hardware cursor displays as white square

%dmesg|grep agp
agp0: <Intel 82915GM (915GM GMCH) SVGA controller> port 0xec00-0xec07 mem 0xffe80000-0xffefffff,0xd0000000-0xdfffffff,0xffe40000-0xffe7ffff irq 16 at device 2.0 on pci0
agp0: detected 16124k stolen memory
agp0: aperture size is 256M
drmsub0: <Intel i915GM>: (child of agp_i810.c) on agp0

%dmesg | grep drm
drmsub0: <Intel i915GM>: (child of agp_i810.c) on agp0
info: [drm] AGP at 0xffe80000 0MB
info: [drm] Initialized i915 1.4.0 20060119

%grep ALLOC /var/log/Xorg.0.log
(WW) ****INVALID MEM ALLOCATION**** b: 0xffe80000 e: 0xffefffff correcting
(WW) ****INVALID MEM ALLOCATION**** b: 0xffe40000 e: 0xffe7ffff correcting

%grep 0:2 /var/log/Xorg.0.log
(--) PCI:*(0:2:0) Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller rev 3, Mem @ 0xffe80000/19, 0xd0000000/28, 0xffe40000/18, I/O @ 0xec00/3
(--) PCI: (0:2:1) Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller rev 3
(WW) I810: No matching Device section for instance (BusID PCI:0:2:1) found


Kernel compiled with

device          agp             # support several AGP chipsets
device          drm             # drm compiled in
device          i915drm         # for i915 chipset

xorg.conf:
        Driver      "i810"
        VendorName  "Intel Corporation"
        BoardName   "Mobile 915GM/GMS/910GML Express Graphics Controller"
#       BusID       "PCI:0:2:0"
        VideoRam    65536
        Screen      0
        Option      "SWcursor"
        Option      "DRI"
        Option      "NoDDC"

When SWCursor is not enabled, mouse cursor shows as white square. Direct rendering shows as enabled and accelerated video appears to work. 

Note memory addresses detected during AGP attach are 'corrected' by xorg 6.9.0 - don't know how to control this behaviour for testing (also tried xorg-snapshot Jan 2007)
- Note AGP at 0xffe80000 0MB not 256 or other size
- In Windows, AGP aperture is detected as 192MB not 256MB.

Tried different values of VideoRAM, same result.
Tried enabling busid, same result.



>How-To-Repeat:
Configure dri/drm as instructed on dri.freedesktop.org

This could be an error in Xorg 6.9.0 but I suspect agp memory range and
attach in Freebsd i810_agp.c is the causal factor. 

AGP aperture of 192MB (Windows) unusual

Please help! All logs available if needed.
>Fix:
Enabling SWcursor corrects white square cursor but no accelerated video:
xv and OpenGL etc video does not work (blue screen for xv, OpenGL hangs.
Tested with vlc, Mplayer, Xine.
>Release-Note:
>Audit-Trail:

From: "Chris Billington" <cbillington@emulti.net>
To: bug-followup@freebsd.org, billington.chris@gmail.com
Cc:  
Subject: Re: i386/108582: White square cursor i915 DRI Xorg 6.9.0 AGP
Date: Wed, 31 Jan 2007 23:55:03 +0100

 mis-categorised as serious, should be 'non-critical', as system functions  
 ok with no dri, just can't play video etc, xv disabled too.
 
 While similar to previous reports in effects, the error about memory  
 allocations is new symptom.
 
 Xorg version 6.9.0, but same result obtains with xorg-server-snap of 30  
 January 07.
 
 pkg_info:
 dri-6.4.1,2
 libdrm-2.0.2
 libglut-6.4.2
 xorg-server-6.9.0_5
 xorg-clients-6.9.0_3
 
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Feb 13 00:56:02 UTC 2007 
Responsible-Changed-Why:  
This does not sound i386-specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=108582 

From: "Chris Billington" <cbillington@emulti.net>
To: bug-followup@freebsd.org, billington.chris@gmail.com
Cc:  
Subject: Re: kern/108582: [agp] White square cursor i915 DRI Xorg 6.9.0 AGP
Date: Wed, 21 Feb 2007 00:39:32 +0100

 Chasing these errors:
 
 %grep ALLOC /var/log/Xorg.0.log
 (WW) ****INVALID MEM ALLOCATION**** b: 0xffe80000 e: 0xffefffff correcti=
 ng
 (WW) ****INVALID MEM ALLOCATION**** b: 0xffe40000 e: 0xffe7ffff correcti=
 ng
 
 A slightly dirty hack has fixed this problem.
 
 I followed the suggestion at  =
 
 http://leaf.dragonflybsd.org/mailarchive/users/2006-12/msg00109.html
 
 By removing the new lines in the RemoveOverlaps code since version 1.3 o=
 f  =
 
 xorg 6.9.0 xf86.c, that is reverting to the old 6.8.2 version of the  =
 
 overlap removal code:
 
 http://webcvs.freedesktop.org/xorg/xc/programs/Xserver/hw/xfree86/common=
 /xf86Bus.c?r1=3D1.3&r2=3D1.8
 
 Then recompile and reinstall Xorg 6.9.0 from ports
 
 After enabling DRI and HWCursor, accelerated Xorg works.
 
 glxgears gives 1150 fps and video/dvd etc plays very smoothly with xvide=
 o  =
 
 acceleration and xorg.conf VideoRam parameter set to 65536 (the default)=
 .
 
 It therefore appears this error was caused by a bug in the PCI bus  =
 
 scanning in Xorg 6.9.0 rather than the AGP attach code.
 I could have downgraded the port to xorg-server 6.8.2 but shied away fro=
 m  =
 
 recompiling loads of dependencies.
 
 I hope this is useful to someone and the fix makes it into the new drive=
 r  =
 
 in modular Xorg.
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Wed Feb 21 10:36:24 UTC 2007 
State-Changed-Why:  
This seems to be a problem in the Xorg code itself (pci bus scanning) 
instead of in our code. A workaround would be to downgrade to a former 
version of Xorg, and perhaps the new modular Xorg when that is 
'released'. 

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