From owner-freebsd-x11@FreeBSD.ORG Sat Oct 27 17:14:07 2012 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A899AA8; Sat, 27 Oct 2012 17:14:07 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id DB9368FC08; Sat, 27 Oct 2012 17:14:05 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q9RHDsfG052534; Sat, 27 Oct 2012 19:13:55 +0200 (CEST) (envelope-from andreast-list@fgznet.ch) Message-ID: <508C1652.6070909@fgznet.ch> Date: Sat, 27 Oct 2012 19:13:54 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: matt Subject: Re: Does drm/dri currently work on PPC? (SUCCESS!) References: <5083C719.1040109@gmail.com> <20121021092136.20307802@narn.knownspace> <50846392.70007@gmail.com> <5085F595.4050609@gmail.com> <20121022215945.436873dc@narn.knownspace> <5089A6DB.9070904@brakiri.com> <5089DF27.9020803@gmail.com> <20121025213018.2bfa5068@narn.knownspace> <5089F799.9030507@gmail.com> <508A17C9.4030007@gmail.com> <508A9EBD.3080107@freebsd.org> <508ADBBA.1060201@fgznet.ch> <508B34D6.6000502@gmail.com> In-Reply-To: <508B34D6.6000502@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: freebsd-x11@freebsd.org, freebsd-ppc@freebsd.org, Nathan Whitehorn , Justin Hibbits X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2012 17:14:07 -0000 On 27.10.12 03:11, matt wrote: > On 10/26/12 11:51, Andreas Tobler wrote: >> On 26.10.12 16:31, Nathan Whitehorn wrote: >>> On 10/25/12 23:55, matt wrote: >>>>> It was working without DRM "out-of-the-box". Of course I've made a >>>>> mess >>>>> trying different versions of both Xorg and the radeon driver. I'm >>>>> in the >>>>> process of getting back to the working config so I can be sure any >>>>> test >>>>> changes work/don't work. >>>>> >>>>> OpenBSD's mpi@ apparently did a lot recently over there getting DRM to >>>>> work on the G4 mini. We already had about half of the commits I see at >>>>> freshbsd, in one way or another...Our rmb/wmb() I think has had PPC >>>>> barriers since earlier this year? He did #define __BIG_ENDIAN, which >>>>> apparently was a big deal for the drm code (it's ifdef'd in a couple >>>>> places), not sure if we are already doing that. >>>>> If someone has a G4 radeon mini they could test to see if drm works >>>>> for >>>>> them or not, to rule out AGP issues (I guess they are PCI?). >>>>> >>>>> I'm not sure how the OpenBSD attachment process works vs ours, some of >>>>> the other commits of note were related to passing the BAR and memory >>>>> regions from the vgapci to drm. When I kldload drm after compiling it, >>>>> it doesn't do anything...but if I kldload radeon.ko, it recognizes agp >>>>> memory and being related to vgapci at the correct pci address...I'm >>>>> not >>>>> sure if we "are there" or not. I also didn't have DRM on OpenBSD >>>>> either. >>>>> >>>>> I think if radeon had drm on *any* big-endian platform it should rule >>>>> out endian issues in drm or radeon. Not sure if this is the case, I >>>>> guess macppc would be the most likely. >>>>> >>>>> Matt >>>> So I removed WITH_NEW_XORG, deinstalled a ton of ports, and reinstalled >>>> Xorg. I rebuild drm with __BIG_ENDIAN defined (not sure if this >>>> matters). I previously put a lot of WERROR= and NO_WERROR= into various >>>> drm makefiles to get gcc to shut up about unused return values. X >>>> -configure worked, and the xorg log indicates the drm device was >>>> successfully opened and I have drm on PPC. >>>> mesa-demos is marked broken for PPC, haven't tried glxinfo or >>>> glxgears yet. >>>> >>>> The good news is it works! >>>> The bad news: >>>> -Cannot switch back to syscons, screen gets corrupted then the system >>>> hard locks >>>> -WITH_NEW_XORG breaks it somehow >>>> >>>> Thanks to mpi@openbsd.org, Justin & Nathan! >>>> >>>> Matt >>>> _______________________________________________ >>>> freebsd-ppc@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-ppc >>>> To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org" >>> >>> Great to hear! I checked in some code to define __BIG_ENDIAN if needed >>> in -CURRENT's drm (Linux uses a different number of underscores than we >>> do for perverse reasons). >> >> Thank you very much all! >> >> I can confirm it works here too (G5 32-bit): >> >> [helium:~] andreast% dmesg |grep drm >> drm0: on vgapci0 >> info: [drm] Initialized radeon 1.31.0 20080613 >> info: [drm] Setting GART location based on new memory map >> info: [drm] Loading R300 Microcode >> info: [drm] Num pipes: 1 >> info: [drm] writeback test succeeded in 1 usecs >> >> and glxgears gives around 1250FPS vs. 52FPS w/o dri. >> >> Andreas >> >> >> > Can you change consoles or exit X successfully? > btw...issue "sync" a couple times first just in case :) > Also, is that an AGP or PCIe G5? I can exit X and restart X successfully. I can also switch (ctrl-alt-F1-F8) between X and console and back (ctrl-alt-F9). Even with glxgears running. No lock-up. It is an AGP card: (--) RADEON(0): Chipset: "ATI Radeon 9600XT AR (AGP)" (ChipID = 0x4152) (--) RADEON(0): Mapped VideoRAM: 131072 kByte (128 bit DDR SDRAM) These are my modules: Section "Module" Load "extmod" Load "record" Load "dbe" Load "glx" Load "dri" Load "dri2" EndSection And nothing special in the driver section. Andreas