From owner-freebsd-x11@FreeBSD.ORG Mon Dec 14 14:12:23 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 D68131065696 for ; Mon, 14 Dec 2009 14:12:23 +0000 (UTC) (envelope-from korvus@comcast.net) Received: from mx04.pub.collaborativefusion.com (mx04.pub.collaborativefusion.com [206.210.72.84]) by mx1.freebsd.org (Postfix) with ESMTP id 8FA4A8FC2B for ; Mon, 14 Dec 2009 14:12:23 +0000 (UTC) Received: from [192.168.2.164] ([206.210.89.202]) by mx04.pub.collaborativefusion.com (StrongMail Enterprise 4.1.1.4(4.1.1.4-47689)); Mon, 14 Dec 2009 09:12:22 -0500 X-VirtualServerGroup: Default X-MailingID: 00000::00000::00000::00000::::907 X-SMHeaderMap: mid="X-MailingID" X-Destination-ID: freebsd-x11@freebsd.org X-SMFBL: ZnJlZWJzZC14MTFAZnJlZWJzZC5vcmc= Message-ID: <4B2647C6.6080101@comcast.net> Date: Mon, 14 Dec 2009 09:12:22 -0500 From: Steve Polyack User-Agent: Thunderbird 2.0.0.23 (X11/20091209) MIME-Version: 1.0 To: Robert Noland References: <4B213D8F.6080906@comcast.net> <1260474623.2281.8.camel@balrog.2hip.net> <4B215405.2080502@comcast.net> <1260476369.2281.16.camel@balrog.2hip.net> <1260556637.2281.19.camel@balrog.2hip.net> In-Reply-To: <1260556637.2281.19.camel@balrog.2hip.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-x11 , John Baldwin 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: Mon, 14 Dec 2009 14:12:24 -0000 Robert Noland wrote: > On Thu, 2009-12-10 at 14:19 -0600, Robert Noland wrote: > >> 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... >> >> > > Could you try the attached patch and see if it makes any difference? > > My assembly foo is weak on i386. > > Jhb, > > Does this look at all correct? > > robert. > > I tried the pagezero.patch, but it did not seem to change anything. The corruption looks the same. Here's the section regarding the ring from Xorg.log: (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 (II) RADEON(0): [pci] 8192 kB allocated with handle 0xe96f2000 (II) RADEON(0): [pci] ring handle = 0xe96f2000 (II) RADEON(0): [pci] Ring mapped at 0x28a7d000 (II) RADEON(0): [pci] Ring contents 0xf0f09506 (II) RADEON(0): [pci] ring read ptr handle = 0xe97f3000 (II) RADEON(0): [pci] Ring read ptr mapped at 0x286ff000 (II) RADEON(0): [pci] Ring read ptr contents 0xffffffff (II) RADEON(0): [pci] vertex/indirect buffers handle = 0xe97f4000 (II) RADEON(0): [pci] Vertex/indirect buffers mapped at 0x30c00000 (II) RADEON(0): [pci] Vertex/indirect buffers contents 0x004dffd3 (II) RADEON(0): [pci] GART texture map handle = 0xe99f4000 (II) RADEON(0): [pci] GART Texture map mapped at 0x30e00000 (II) RADEON(0): [drm] register handle = 0xfe5d0000 (II) RADEON(0): [dri] Visual configs initialized (II) RADEON(0): RADEONRestoreMemMapRegisters() : (II) RADEON(0): MC_FB_LOCATION : 0xefffe000 0x1fff0000 (II) RADEON(0): MC_AGP_LOCATION : 0xffffffc0