From owner-freebsd-x11@FreeBSD.ORG Thu Dec 10 20:19:38 2009 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A92E1106566C for ; Thu, 10 Dec 2009 20:19:38 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 6F7458FC0C for ; Thu, 10 Dec 2009 20:19:38 +0000 (UTC) Received: from [192.168.1.4] (adsl-156-16-112.bna.bellsouth.net [70.156.16.112]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id nBAKJYWS042820 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 10 Dec 2009 15:19:35 -0500 (EST) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Steve Polyack In-Reply-To: <4B215405.2080502@comcast.net> References: <4B213D8F.6080906@comcast.net> <1260474623.2281.8.camel@balrog.2hip.net> <4B215405.2080502@comcast.net> Content-Type: text/plain Organization: FreeBSD Date: Thu, 10 Dec 2009 14:19:29 -0600 Message-Id: <1260476369.2281.16.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RDNS_DYNAMIC, SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: freebsd-x11 Subject: Re: PCI Radeon 9250 - DRI/DRM in 8.0-RELEASE X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2009 20:19:38 -0000 On Thu, 2009-12-10 at 15:03 -0500, Steve Polyack wrote: > Robert Noland wrote: > > On Thu, 2009-12-10 at 13:27 -0500, Steve Polyack wrote: > > > >> (II) RADEON(0): [pci] 8192 kB allocated with handle 0xe9b02000 > >> (II) RADEON(0): [pci] ring handle = 0xe9b02000 > >> (II) RADEON(0): [pci] Ring mapped at 0x28a7d000 > >> (II) RADEON(0): [pci] Ring contents 0x00eeeeec > >> (II) RADEON(0): [pci] ring read ptr handle = 0xe9c03000 > >> (II) RADEON(0): [pci] Ring read ptr mapped at 0x286ff000 > >> (II) RADEON(0): [pci] Ring read ptr contents 0x00ffffff > >> (II) RADEON(0): [pci] vertex/indirect buffers handle = 0xe9c04000 > >> (II) RADEON(0): [pci] Vertex/indirect buffers mapped at 0x30c00000 > >> (II) RADEON(0): [pci] Vertex/indirect buffers contents 0x00ffffff > >> (II) RADEON(0): [pci] GART texture map handle = 0xe9e04000 > >> (II) RADEON(0): [pci] GART Texture map mapped at 0x30e00000 > >> (II) RADEON(0): [drm] register handle = 0xfe5d0000 > >> > > > > > > The corruption is due to the ring not being zeroed as it should be. > > This seems to only occur on i386 builds and even then, only sometimes. > > I'm trying to look into this issue again and I've previously eliminated > > everything except libdrm and the kernel from this issue by testing with > > a small sample program that directly interacts with drm without X > > running. All of the pointers seem to be correct and valid, but the > > contents during startup should always be 0. > > > > Can you do a "sysctl hw.busdma" while X is up with drm enabled? > > > > > Here's the sysctl output: > hw.busdma.total_bpages: 288 > hw.busdma.zone0.total_bpages: 288 > hw.busdma.zone0.free_bpages: 288 > hw.busdma.zone0.reserved_bpages: 0 > hw.busdma.zone0.active_bpages: 0 > hw.busdma.zone0.total_bounced: 0 > hw.busdma.zone0.total_deferred: 0 > hw.busdma.zone0.lowaddr: 0xffffffff > hw.busdma.zone0.alignment: 4096 Ok, it doesn't seem to be related to bounce pages... But it was worth a shot... > It doesn't seem to change whether I'm in X with DRM disabled or enabled > with the display corruption. Also, it took me a few starts of X to get > it to even happen, as it seems there is occasionally a pci Out of memory > (-12) error causing DRM to be disabled as well: The ENOMEM case should be returned if the kernel is not able to allocate 32MB of contiguous memory for for the scatter gather pages backing the GART. It technically doesn't need to be contiguous, but current methods don't give us a choice. If I could figure out what bit of code to look at, it would help a lot... Right now, I still don't see any issues in the drm code, so I'm having to try and poke around in bus_dma and the vm to see if I can find a bug there. We set the flags for those pages to be zeroed, but it seems like it doesn't get flushed somehow. robert. > drmOpenDevice: node name is /dev/dri/card0 > drmOpenDevice: open result is 10, (OK) > drmOpenDevice: node name is /dev/dri/card0 > drmOpenDevice: open result is 10, (OK) > drmOpenByBusid: Searching for BusID pci:0000:04:00.0 > drmOpenDevice: node name is /dev/dri/card0 > drmOpenDevice: open result is 10, (OK) > drmOpenByBusid: drmOpenMinor returns 10 > drmOpenByBusid: drmGetBusid reports pci:0000:04:00.0 > (II) [drm] DRM interface version 1.2 > (II) [drm] DRM open master succeeded. > (II) RADEON(0): [drm] Using the DRM lock SAREA also for drawables. > (II) RADEON(0): [drm] framebuffer handle = 0xe8000000 > (II) RADEON(0): [drm] added 1 reserved context for kernel > (II) RADEON(0): X context handle = 0x1 > (II) RADEON(0): [drm] installed DRM signal handler > (EE) RADEON(0): [pci] Out of memory (-12) > (EE) RADEON(0): [pci] PCI failed to initialize. Disabling the DRI. > (II) RADEON(0): [drm] removed 1 reserved context for kernel > (II) RADEON(0): [drm] unmapping 8192 bytes of SAREA 0xd06f8000 at 0x286fd000 > (II) RADEON(0): [drm] Closed DRM master. > (II) RADEON(0): RADEONRestoreMemMapRegisters() : > (II) RADEON(0): MC_FB_LOCATION : 0xefffe000 0x1fff0000 > (II) RADEON(0): MC_AGP_LOCATION : 0xffffffc0 > (==) RADEON(0): Backing store disabled > (WW) RADEON(0): Direct rendering disabled > (II) RADEON(0): Render acceleration enabled for R200 type cards. > (II) RADEON(0): Setting EXA maxPitchBytes > > Thanks for taking a look at this again. > > _______________________________________________ > freebsd-x11@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-x11 > To unsubscribe, send any mail to "freebsd-x11-unsubscribe@freebsd.org" -- Robert Noland FreeBSD