Date: Tue, 14 Sep 2010 15:23:39 +0200 From: Tijl Coosemans <tijl@coosemans.org> To: freebsd-x11@freebsd.org Cc: Oliver Fromme <olli@lurza.secnetix.de> Subject: Re: ports/graphics/dri + WITHOUT_NOUVEAU=YES: strange problem Message-ID: <201009141523.45600.tijl@coosemans.org> In-Reply-To: <201009141313.o8EDD75p002136@lurza.secnetix.de> References: <201009141313.o8EDD75p002136@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart2580821.1vSRGqM3UV Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Tuesday 14 September 2010 15:13:07 Oliver Fromme wrote: > In order to get the latest DRI version with hardware 3D > support for my ATI Radeon HD 4250, I recompiled the dri > port with WITHOUT_NOUVEAU=3DYES. It breaks thusly: >=20 > | radeon_screen.c: In function 'radeonCreateScreen': > | radeon_screen.c:1025: error: 'R600_SCRATCH_REG_OFFSET' undeclared (f= irst use in this function) >=20 > The respective part of the source file is this: >=20 > | if (screen->chip_family < CHIP_FAMILY_R600) > | screen->scratch =3D (__volatile__ uint32_t *) > | ((GLubyte *)screen->status.map + RADEON_SCRATCH_REG_OFFSET); > | else > | screen->scratch =3D (__volatile__ uint32_t *) > | ((GLubyte *)screen->status.map + R600_SCRATCH_REG_OFFSET); >=20 > Now, I don't have the slightest idea where those constants > are supposed to come from. Neither R600_SCRATCH_REG_OFFSET > nor RADEON_SCRATCH_REG_OFFSET are defined anywhere in the > dri source tree, nor in /usr/include. They are, however, > both defined in src/sys/dev/drm/radeon_drm.h: >=20 > | #define RADEON_SCRATCH_REG_OFFSET 32 > | #define R600_SCRATCH_REG_OFFSET 256 >=20 > Then I made the following patch to the dri source: >=20 > --- src/mesa/drivers/dri/radeon/radeon_screen.c.orig 2009-12-22 03:31:= 19.000000000 +0100 > +++ src/mesa/drivers/dri/radeon/radeon_screen.c 2010-09-09 10:36:55.00000= 0000 +0200 > @@ -76,6 +76,10 @@ > */ > #include "xmlpool.h" > +#ifndef R600_SCRATCH_REG_OFFSET > +#define R600_SCRATCH_REG_OFFSET 256 > +#endif > + > #define DRI_CONF_COMMAND_BUFFER_SIZE(def,min,max) \ > DRI_CONF_OPT_BEGIN_V(command_buffer_size,int,def, # min ":" # max ) \ > DRI_CONF_DESC(en,"Size of command buffer (in KB)") \ >=20 > With that patch, the port compiles and works (after adding > the PCI ID of my ATI Radeon HD 4250, but that's a different > story). I still don't know where RADEON_SCRATCH_REG_OFFSET > does come from. It's not defined in any included file, as > far as i can see. >=20 > Does someone have an explanation for this? > Or maybe even provide a clean fix instead of that quick-hack? You need to rebuild graphics/libdrm with WITHOUT_NOUVEAU. --nextPart2580821.1vSRGqM3UV Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iF4EABEIAAYFAkyPd2EACgkQfoCS2CCgtivbxwD/ToeO9DtajAAp2KotYHVd3+MD VOp1Cb+v6oF+hVEaEBIA/2Kl7RtPjjsp2RO6r2KZMTki6x+5Iw9ycgwfVIT7BeKJ =ZSWR -----END PGP SIGNATURE----- --nextPart2580821.1vSRGqM3UV--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009141523.45600.tijl>