[Intel-gfx] xf86-video-intel: Commit 08ebde4715b87867184d42b60762cd774e151f5c breaks kernel memory manager allocation
Wu Fengguang
fengguang.wu at intel.com
Wed Apr 22 14:00:03 CEST 2009
On Wed, Apr 22, 2009 at 07:56:37PM +0800, Wu Fengguang wrote:
> On Wed, Apr 22, 2009 at 06:06:18PM +0800, Magnus Kessler wrote:
> > On Wednesday 22 Apr 2009 01:40:05 Zhenyu Wang wrote:
> > > On 2009.04.21 20:29:26 +0800, Magnus Kessler wrote:
> > > > Hi Zhenyu,
> > > >
> > > > your commit 08ebde4715b87867184d42b60762cd774e151f5c to the intel video
> > > > driver breaks kernel memory allocation for me on a 64 bit platform.
> > > > Reverting the patch gets me back to a working driver. The relevant output
> > > > from xorg.log is:
> > >
> > > sorry, I didn't test Fengguang's patch on 64 bit system, on which his patch
> > > aims to fix a compiler warning...
> > >
> > > Fengguang, have you tested this on x86_64 with recent kernel?
>
> Sorry I just tested it out - I found the drm mode was not enabled
> because of another bug (which I'll report later).
>
> My configurations are:
> - 64bit kernel/user space
> - kernel is 2.6.30-rc2-next-20090417
> - intel gfx driver is 2.7.99.1.
>
> The interesting thing is that the lines
>
> pScrn->videoRam = ~0UL / KB(1);
> or
> pScrn->videoRam = UINT_MAX / KB(1);
> or
> pScrn->videoRam = INT_MAX / KB(1);
>
> produce output
>
> (==) intel(0): VideoRam: -1 KB
> or
> (==) intel(0): VideoRam: 4194303 KB
> or
> (EE) intel(0): Failed to allocate space for kernel memory manager
> (==) intel(0): VideoRam: 2097151 KB
>
> The first two produces no further error messages in my system, and
> _all_ have cluttered display (which I'm not sure if is related to the
> videoRam madness).
>
> > > Magnus, any possible to ErrorF some debug message on why memory manager
> > > allocation failed?
> >
> > I'm happy to try out any suggestion. What part of the code do you want
> > additional debug output for?
> >
> > As a general observation I note that the VideoRam size value goes through a
> > succession of (int) <-> (unsigned long) conversions before reaching
> > i830_allocate_aperture, which ultimately fails with commit 08ebde47. This
> > strikes me as not particularly 64-bit clean.
>
> Yep, 'unsigned long' should be better for 'videoRam' in the long term.
Oh, it looks like the change of type is discouraged:
/*
* ScrnInfoRec
*
* There is one of these for each screen, and it holds all the screen-specific
* information.
*
* Note: the size and layout must be kept the same across versions. New
* fields are to be added in place of the "reserved*" fields. No fields
* are to be dependent on compile-time defines.
*/
Thanks,
Fengguang
> > The failure was with kernel 2.6.29.1 + tiling patch, in case this matters.
> >
> > >
> > > > (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
> > > > i810-dc100, i810e, i815, i830M, 845G, 852GM/855GM, 865G, 915G,
> > > > E7221 (i915), 915GM, 945G, 945GM, 945GME, IGD_GM, IGD_G, 965G, G35,
> > > > 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
> > > > Mobile IntelĀ® GM45 Express Chipset,
> > > > Intel Integrated Graphics Device, G45/G43, Q45/Q43, G41
> > > > (II) Primary Device is: PCI 00 at 00:02:0
> > > > (II) resource ranges after xf86ClaimFixedResources() call:
> > > > [0] -1 0 0xffffffff - 0xffffffff (0x1) MX[B]
> > > > [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B]
> > > > [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B]
> > > > [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B]
> > > > [4] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B]
> > > > [5] -1 0 0x00000000 - 0x00000000 (0x1) IX[B]
> > > > (II) resource ranges after probing:
> > > > [0] -1 0 0xffffffff - 0xffffffff (0x1) MX[B]
> > > > [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B]
> > > > [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B]
> > > > [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B]
> > > > [4] 0 0 0x000a0000 - 0x000affff (0x10000) MS[B]
> > > > [5] 0 0 0x000b0000 - 0x000b7fff (0x8000) MS[B]
> > > > [6] 0 0 0x000b8000 - 0x000bffff (0x8000) MS[B]
> > > > [7] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B]
> > > > [8] -1 0 0x00000000 - 0x00000000 (0x1) IX[B]
> > > > [9] 0 0 0x000003b0 - 0x000003bb (0xc) IS[B]
> > > > [10] 0 0 0x000003c0 - 0x000003df (0x20) IS[B]
> > > > (II) intel(0): Creating default Display subsection in Screen section
> > > > "G35 Screen 0" for depth/fbbpp 24/32
> > > > (==) intel(0): Depth 24, (--) framebuffer bpp 32
> > > > (==) intel(0): RGB weight 888
> > > > (==) intel(0): Default visual is TrueColor
> > > > (**) intel(0): Option "AccelMethod" "UXA"
> > > > (**) intel(0): Option "XvMC" "true"
> > > > (II) intel(0): Integrated Graphics Chipset: Intel(R) G35
> > > > (--) intel(0): Chipset: "G35"
> > > > (WW) intel(0): libpciaccess reported 0 rom size, guessing 64kB
> > > > (II) intel(0): Resizable framebuffer: available (0 4)
> > > > drmOpenDevice: node name is /dev/dri/card0
> > > > drmOpenDevice: open result is 8, (OK)
> > > > drmOpenDevice: node name is /dev/dri/card0
> > > > drmOpenDevice: open result is 8, (OK)
> > > > drmOpenByBusid: Searching for BusID pci:0000:00:02.0
> > > > drmOpenDevice: node name is /dev/dri/card0
> > > > drmOpenDevice: open result is 8, (OK)
> > > > drmOpenByBusid: drmOpenMinor returns 8
> > > > drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
> > > > (II) [drm] DRM interface version 1.3
> > > > (II) [drm] DRM open master succeeded.
> > > > (II) intel(0): Output VGA1 using monitor section SyncMaster 173P
> > > > (II) intel(0): EDID vendor "SAM", prod id 211
> > > > (II) intel(0): Using EDID range info for horizontal sync
> > > > (II) intel(0): Using EDID range info for vertical refresh
> > > > (II) intel(0): Printing DDC gathered Modelines:
> > > > (II) intel(0): Output VGA1 connected
> > > > (II) intel(0): Using exact sizes for initial modes
> > > > (II) intel(0): Output VGA1 using initial mode 1280x1024
> > > > (II) intel(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise
> > > > stated. (==) intel(0): video overlay key set to 0x101fe
> > > > (**) intel(0): Display dimensions: (338, 270) mm
> > > > (**) intel(0): DPI set to (96, 96)
> > > > (II) Loading sub module "fb"
> > > > (II) LoadModule: "fb"
> > > > (II) Loading /usr/lib64/xorg/modules/libfb.so
> > > > (II) Module fb: vendor="X.Org Foundation"
> > > > compiled for 1.6.99.1, module version = 1.0.0
> > > > ABI class: X.Org ANSI C Emulation, version 0.4
> > > > (==) Depth 24 pixmap format is 32 bpp
> > > > (II) do I need RAC? No, I don't.
> > > > (II) resource ranges after preInit:
> > > > [0] -1 0 0xffffffff - 0xffffffff (0x1) MX[B]
> > > > [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B]
> > > > [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B]
> > > > [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B]
> > > > [4] 0 0 0x000a0000 - 0x000affff (0x10000) MS[B]
> > > > [5] 0 0 0x000b0000 - 0x000b7fff (0x8000) MS[B]
> > > > [6] 0 0 0x000b8000 - 0x000bffff (0x8000) MS[B]
> > > > [7] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B]
> > > > [8] -1 0 0x00000000 - 0x00000000 (0x1) IX[B]
> > > > [9] 0 0 0x000003b0 - 0x000003bb (0xc) IS[B]
> > > > [10] 0 0 0x000003c0 - 0x000003df (0x20) IS[B]
> > > > (II) intel(0): [DRI2] Setup complete
> > > > (**) intel(0): Framebuffer compression disabled
> > > > (**) intel(0): Tiling enabled
> > > > (EE) intel(0): Failed to allocate space for kernel memory manager
> > > > (==) intel(0): VideoRam: 2097151 KB
> > > > (II) intel(0): Attempting memory allocation with tiled buffers.
> > > > (II) intel(0): Tiled allocation successful.
> > > > (II) UXA(0): Driver registered support for the following operations:
> > > > (II) solid
> > > > (II) copy
> > > > (II) composite (RENDER acceleration)
> > > > (==) intel(0): Backing store disabled
> > > > (==) intel(0): Silken mouse enabled
> > > > (II) intel(0): Initializing HW Cursor
> > > > (II) intel(0): No memory allocations
> > > > (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled
> > > > message. (**) intel(0): DPMS enabled
> > > > (==) intel(0): Intel XvMC decoder disabled
> > > > (II) intel(0): Set up textured video
> > > > (II) intel(0): direct rendering: DRI2 Enabled
> > > >
> > > > Without the kernel memory manager I see garbled portions of the screen
> > > > (tiling issue?) from the adobe flash plugin and when logging out of KDE
> > > > 4.2, similar to the screenshots published at
> > > > https://qa.mandriva.com/show_bug.cgi?id=50071.
> > > >
> > > > Thanks for having a look at this.
> > > >
> > > > Magnus Kessler
> >
>
>
More information about the Intel-gfx
mailing list