Bug 13845

Summary: [intel] server crashs at startup (signal 11)
Product: xorg Reporter: Patrick Lamaiziere <patpr>
Component: Driver/intelAssignee: Jesse Barnes <jbarnes>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: eric
Version: 7.3 (2007.09)   
Hardware: x86 (IA32)   
OS: FreeBSD   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Trace of the core dump
none
test patch none

Description Patrick Lamaiziere 2007-12-28 16:27:23 UTC
[Xorg 7.3, FreeBSD 7.0 RC1 i386]

Hello,

With the driver Intel version 2.2.0 (compiled by hand), X crashs at startup with a "signal 11". It works fine with the version 2.1.1

I tried with a fresh xorg.conf (X -configure), with the same result.

I don't know if it is related, but the driver seems to have some problem to allocate memory.

With version 2.2.0 :
(==) intel(0): VideoRam: 131072 KB
(**) intel(0): Framebuffer compression enabled
(**) intel(0): Tiling enabled
(==) intel(0): Write-combining range (0xfaf80000,0x80000) was already
clear 
(II) intel(0): Attempting memory allocation with tiled buffers.
(WW) intel(0): xf86AllocateGARTMemory: allocation of 10 pages failed
(Cannot allocate memory) 
(WW) intel(0): xf86AllocateGARTMemory: allocation of 4 pages failed
(Cannot allocate memory)

With version 2.1.1, it seems ok :
(==) intel(0): VideoRam: 131072 KB
(==) intel(0): Write-combining range (0xfaf80000,0x80000) was already
clear 
(II) intel(0): Attempting memory allocation with tiled buffers and
               large DRI memory manager reservation:
(II) intel(0): Allocating 5112 scanlines for pixmap cache
(II) intel(0): Success.
(II) intel(0): Memory allocation layout:
(II) intel(0): 0x00000000-0x0001ffff: ring buffer (128 kB)
[...]

Complete Xorg's log 
Intel 2.1.1 :
http://user.lamaiziere.net/patrick/intel211.log.txt

Intel 2.2.0 :
http://user.lamaiziere.net/patrick/intel220.log.txt

Best regards.
Comment 1 Patrick Lamaiziere 2008-01-02 11:18:11 UTC
Created attachment 13460 [details]
Trace of the core dump

I managed to get a backtrace of the core dump, let me know if i shall provide more informations or testing.
Comment 2 Jesse Barnes 2008-01-03 11:11:48 UTC
So this only occurs on BSD?  Eric, have you tried 2.2.0 recently?  Any ideas about this one?
Comment 3 Wang Zhenyu 2008-01-06 21:25:06 UTC
Created attachment 13554 [details] [review]
test patch

This should fix the xserver fault if hw cursor memory allocation fails.
I don't know the detail on randr-1.2 relate cursor code, so this patch might still fail someplace, or there's a better complete approach.
Comment 4 Patrick Lamaiziere 2008-01-07 10:49:36 UTC
(In reply to comment #3)
> Created an attachment (id=13554) [details]
> test patch
> 
> This should fix the xserver fault if hw cursor memory allocation fails.
> I don't know the detail on randr-1.2 relate cursor code, so this patch might
> still fail someplace, or there's a better complete approach.

Thanks. With your patch, Xorg starts well and it seems to work quite fine.

I loose the DRI acceleration because HW cursor are not allocated. And i've got an error message from the FreeBSD's module i915.ko : 
drm0: <Intel i852GM/i855GM GMCH> on vgapci0
info: [drm] AGP at 0xf0000000 128MB
info: [drm] Initialized i915 1.5.0 20060119
drm1: <Intel i852GM/i855GM GMCH> on vgapci1
info: [drm] AGP at 0xf0000000 128MB
info: [drm] Initialized i915 1.5.0 20060119
error: [drm:pid1432:i915_getparam] *ERROR* i915_getparam called with no initialization

New Xorg.log with this patch :
(In reply to comment #3)
> Created an attachment (id=13554) [details]
> test patch
> 
> This should fix the xserver fault if hw cursor memory allocation fails.
> I don't know the detail on randr-1.2 relate cursor code, so this patch might
> still fail someplace, or there's a better complete approach.

Thanks! With this patch Xorg starts and it seems to work quite fine.

My new Xorg.log with patch : http://user.lamaiziere.net/patrick/intel2.2-patch.txt

I loose the DRI rendering because HW cursors are disabled and i've got an error message from the FreeBSD module i915.ko (drm) :

-----
drm0: <Intel i852GM/i855GM GMCH> on vgapci0
info: [drm] AGP at 0xf0000000 128MB
info: [drm] Initialized i915 1.5.0 20060119
drm1: <Intel i852GM/i855GM GMCH> on vgapci1
info: [drm] AGP at 0xf0000000 128MB
info: [drm] Initialized i915 1.5.0 20060119
error: [drm:pid1432:i915_getparam] *ERROR* i915_getparam called with no initialization
-----

Regards and happy new year.
Comment 5 Eric Anholt 2008-01-31 21:09:52 UTC
The fact that your AGP driver is refusing to allocate the physical-addressed memory for the cursors should be reported to FreeBSD.  But, the patch to fix your issue that resulted from it has been pushed.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.