PCI Radeon 9250 - DRI/DRM in 8.0-RELEASE

Greg Rowe greg at rowes.org
Sat Dec 19 19:35:42 UTC 2009


Hi Robert,
 The patch worked! I can start X now with DRI enabled. Xvinfo now reports an
adapter present. The only thing I see is some errors being reported on the
screen when exiting a window manager (KDE & TWM).  They aren't logged to
Xorg.log though and I don't see any other issues besides these errors. The
error is:
 WARNING: A device driver has set "memattr" inconsistently.
And I get about 20 of these.

An Xorg.log is attached and below is the results of xvinfo. Thanks.

Greg

X-Video Extension version 2.2
screen #0
  Adaptor #0: "Radeon Textured Video"
    number of ports: 16
    port base: 57
    operations supported: PutImage 
    supported visuals:
      depth 24, visualID 0x21
    number of attributes: 2
      "XV_VSYNC" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 1)
      "XV_HWPLANAR" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 1)
    maximum XvImage size: 8192 x 8192
    Number of image formats: 4
      id: 0x32595559 (YUY2)
        guid: 59555932-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
      id: 0x32315659 (YV12)
        guid: 59563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x30323449 (I420)
        guid: 49343230-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x59565955 (UYVY)
        guid: 55595659-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)

> -----Original Message-----
> From: Robert Noland [mailto:rnoland at FreeBSD.org]
> Sent: Saturday, December 19, 2009 1:47 PM
> To: greg at rowes.org
> Cc: 'Steve Polyack'; 'Andriy Gapon'; freebsd-x11 at FreeBSD.org; 'John
> Baldwin'
> Subject: RE: PCI Radeon 9250 - DRI/DRM in 8.0-RELEASE
> 
> On Sat, 2009-12-19 at 13:44 -0500, Greg Rowe wrote:
> > Robert,
> >  The patch applied cleanly (8.0 Stable from last week), but on
> rebuilding
> > the kernel (make buildkernel) I get the following:
> >
> > cc -c -O -pipe  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs
> > -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline
> > -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -
> I.
> > -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL
> > -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common
> > -finline-limit=8000 --param inline-unit-growth=100 --param
> > large-function-growth=1000  -mno-align-long-strings
> > -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2
> > -mno-sse3 -ffreestanding -fstack-protector -Werror
> > /usr/src/sys/dev/drm/drm_sysctl.c
> > cc1: warnings being treated as errors
> > /usr/src/sys/dev/drm/drm_sysctl.c: In function 'drm_vm_info':
> > /usr/src/sys/dev/drm/drm_sysctl.c:206: warning: format '%016jx' expects
> type
> > 'uintmax_t', but argument 5 has type 'long unsigned int'
> > *** Error code 1
> 
> Yes, I have an i386 build running now, I'll update the patch in a
> minute.  Meanwhile, you can just replace the "j" with and "l".
> 
> robert.
> 
> > Stop in /usr/obj/usr/src/sys/PSV.
> > *** Error code 1
> >
> > Stop in /usr/src.
> > *** Error code 1
> >
> > Stop in /usr/src.
> >
> > > -----Original Message-----
> > > From: Robert Noland [mailto:rnoland at FreeBSD.org]
> > > Sent: Saturday, December 19, 2009 1:10 PM
> > > To: greg at rowes.org
> > > Cc: 'Steve Polyack'; 'Andriy Gapon'; freebsd-x11 at FreeBSD.org; 'John
> > > Baldwin'
> > > Subject: RE: PCI Radeon 9250 - DRI/DRM in 8.0-RELEASE
> > >
> > > On Sat, 2009-12-12 at 17:36 -0500, Greg Rowe wrote:
> > > > The system is still running the pagezero patch if that makes any
> > > difference?
> > >
> > > Ok, you can get rid of that.
> > >
> > > I wasn't able to fix this quite like I wanted to, but this should
> work.
> > > The fix that I was intending to do, ended up meaning that I had to
> work
> > > on our mmap implementation, which I did, but won't be committed until
> it
> > > is reviewed. It also required a handful of changes to userland
> (libdrm,
> > > and the DDX driver) and broke the KBI so rebuilding even more stuff
> was
> > > needed.  The linux guys would not have been happy with me and I would
> > > have had a fight on my hands.
> > >
> > > This patch implements what I wanted to do on 64 bit platforms.  On 32
> > > bit platforms (i386) it comes with some consequences... On amd64, I've
> > > adapted the map handle to have an offset of 0 and a globally unique
> map
> > > number starting at bit 40.  This means that there are 24 bits for maps
> > > and each map can describe 1TB of memory.  On i386, I've done the same
> > > thing except I am only stealing the top 4 bits for the map id, so
> there
> > > can only be 15 maps each up to 256MB.  This should be ok since
> normally
> > > there are only 6 or 7 maps.
> > >
> > > I have run tested this on r600 amd64 so far.  I can test r3/5/6/700,
> > > Intel and nouveau, but haven't done so yet.  This should be a kernel
> > > only fix, meaning you should not need to patch or rebuild any of your
> > > userland apps.  The patch is applicable to -CURRENT, and should work
> on
> > > 8-STABLE and possibly 7-STABLE.
> > >
> > > http://people.freebsd.org/~rnoland/drm_mmap_fix.patch
> > >
> > > robert.
> > >
> > > > > -----Original Message-----
> > > > > From: Robert Noland [mailto:rnoland at FreeBSD.org]
> > > > > Sent: Saturday, December 12, 2009 11:43 AM
> > > > > To: greg at rowes.org
> > > > > Cc: 'Steve Polyack'; 'Andriy Gapon'; freebsd-x11 at FreeBSD.org;
> 'John
> > > > > Baldwin'
> > > > > Subject: RE: PCI Radeon 9250 - DRI/DRM in 8.0-RELEASE
> > > > >
> > > > > On Sat, 2009-12-12 at 09:28 -0500, Greg Rowe wrote:
> > > > > > My system has a Gigabyte Radeon HD4850 1GB PCI Express Card in
> it.
> > > The
> > > > > main
> > > > > > board is an ASUS P5N7A-VM, 4GB ram (tested with 2GB also), Intel
> > > Core 2
> > > > > Duo
> > > > > > E6850, on-board video disabled in the BIOS, and the BIOS is
> flashed
> > > to
> > > > > > ASUS's latest release. I'm using a single monitor off the DVI
> port.
> > > > > >
> > > > > >  I'm running the ATI Radeon driver as it works well with the
> > > exception
> > > > > of
> > > > > > DRI. I've tried the released and development version of the
> RadeonHD
> > > > > driver
> > > > > > but both pretty much lock up X. Whether it helps or not, the
> > > background
> > > > > > garbage on the screen I see with the ATI driver is more visible
> with
> > > the
> > > > > hd
> > > > > > drivers and it's the ASUS Bios splash screen in tiny font many
> times
> > > > > across
> > > > > > the screen.  Dmesg and Memcontrol.list from Xorg with DRI
> enabled is
> > > > > > attached.
> > > > >
> > > > > Actually, I think I see what is going on in your case.  Your
> > > framebuffer
> > > > > is at 0xe0000000 and the ring is being allocated inside the
> > > framebuffer
> > > > > address space.  I'm trying to figure out how this is occurring
> now.
> > > > >
> > > > > robert.
> > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Steve Polyack [mailto:korvus at comcast.net]
> > > > > > > Sent: Friday, December 11, 2009 11:11 PM
> > > > > > > To: Andriy Gapon
> > > > > > > Cc: Greg Rowe; rnoland at freebsd.org; freebsd-x11 at freebsd.org;
> John
> > > > > Baldwin
> > > > > > > Subject: Re: PCI Radeon 9250 - DRI/DRM in 8.0-RELEASE
> > > > > > >
> > > > > > > Andriy Gapon wrote:
> > > > > > > > on 11/12/2009 23:14 Greg Rowe said the following:
> > > > > > > >
> > > > > > > >> Robert,
> > > > > > > >>  I tried the pagezero patch (applied, rebuilt kernel,
> rebooted,
> > > > > Xorg
> > > > > > > with DRI
> > > > > > > >> enabled) on my system with the Radeon HD4850 and it didn't
> > > change
> > > > > > > anything.
> > > > > > > >> See the attached. Thanks.
> > > > > > > >>
> > > > > > > >
> > > > > > > > Greg, Steve, could you please describe your systems some
> more?
> > > > > > > > Type of CPU, if this is SMP.
> > > > > > > > Providing a link to your dmesg should be helpful.
> > > > > > > > 'memcontrol list' output could be useful too.
> > > > > > > >
> > > > > > > > Thanks!
> > > > > > > >
> > > > > > > >
> > > > > > > I have yet to try the patch, but my system is a a ~3Ghz
> Pentium 4
> > > with
> > > > > > > Hyperthreading enabled.  Intel chipset (not sure which, but
> the
> > > > > USB/SATA
> > > > > > > are the ICH7) with onboard graphics.  The Radeon 9250 is a PCI
> > > add-on.
> > > > > > > I'm also using both outputs on the card (1 VGA, 1 DVI).  I've
> > > attached
> > > > > > > the output of 'dmesg' and 'pciconf -l -v'.
> > > > > >
> > > > > --
> > > > > Robert Noland <rnoland at FreeBSD.org>
> > > > > FreeBSD
> > > > >
> > > >
> > > >
> > > --
> > > Robert Noland <rnoland at FreeBSD.org>
> > > FreeBSD
> > >
> >
> >
> --
> Robert Noland <rnoland at FreeBSD.org>
> FreeBSD
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Xorg.0.log
Type: application/octet-stream
Size: 43020 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20091219/4ab6d80b/Xorg.0.obj


More information about the freebsd-x11 mailing list