ports/graphics/dri + WITHOUT_NOUVEAU=YES: strange problem

Tijl Coosemans tijl at coosemans.org
Tue Sep 14 13:53:09 UTC 2010


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=YES.  It breaks thusly:
> 
>   |  radeon_screen.c: In function 'radeonCreateScreen':
>   |  radeon_screen.c:1025: error: 'R600_SCRATCH_REG_OFFSET' undeclared (first use in this function)
> 
> The respective part of the source file is this:
> 
>   |  if (screen->chip_family < CHIP_FAMILY_R600)
>   |      screen->scratch = (__volatile__ uint32_t *)
>   |          ((GLubyte *)screen->status.map + RADEON_SCRATCH_REG_OFFSET);
>   |  else
>   |      screen->scratch = (__volatile__ uint32_t *)
>   |          ((GLubyte *)screen->status.map + R600_SCRATCH_REG_OFFSET);
> 
> 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:
> 
>   |  #define RADEON_SCRATCH_REG_OFFSET       32
>   |  #define R600_SCRATCH_REG_OFFSET         256
> 
> Then I made the following patch to the dri source:
> 
> --- 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.000000000 +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)") \
> 
> 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.
> 
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20100914/4e21f242/attachment.pgp


More information about the freebsd-x11 mailing list