On Tuesday 19 April 2005 10:18 am, Aapo Tahkola wrote:
> On Tue, 19 Apr 2005 15:42:43 +0200
>
> Jan Kreuzer <[EMAIL PROTECTED]> wrote:
> > $ make
> > ===> drm
> > Warning: Object directory not changed from original
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/drm ===> i915
> > Warning: Object directory not changed from original
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/i915 ===> mach64
> > Warning: Object directory not changed from original
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/mach64 ===> mga
> > Warning: Object directory not changed from original
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/mga ===> r128
> > Warning: Object directory not changed from original
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/r128 ===> radeon
> > Warning: Object directory not changed from original
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/radeon cc -O -pipe  
> > -I. -I.. -D_KERNEL -DKLD_MODULE -nostdinc -I-  -I. -I.. -I. -I@
> > -I@/contrib/altq -I@/../include -finline-limit=8000 \ -fno-common
> >  -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2
> > -mno-mmx -mno-3dnow  -msoft-float \
> > -fno-asynchronous-unwind-tables -ffreestanding -Wall
> > -Wredundant-decls -Wnested-externs -Wstrict-prototypes 
> > -Wmissing-prototypes \ -Wpointer-arith -Winline -Wcast-qual 
> > -fformat-extensions -std=c99 -c
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/radeon/../r300_cmdbuf.
> >c
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/radeon/../r300_cmdbuf.
> >c:131: error: syntax error before "r300_init_reg_flags"
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/radeon/../r300_cmdbuf.
> >c:134: error: syntax error before numeric constant
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/radeon/../r300_cmdbuf.
> >c:134: warning: type defaults to `int' in declaration of `memset'
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/radeon/../r300_cmdbuf.
> >c:134: warning: function declaration isn't a prototype
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/radeon/../r300_cmdbuf.
> >c:134: error: conflicting types for 'memset' @/sys/libkern.h:118:
> > error: previous definition of 'memset' was here
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/radeon/../r300_cmdbuf.
> >c:134: warning: data definition has no type or storage class
> > /usr/home/jan/dri/r300_driver/drm/bsd-core/radeon/../r300_cmdbuf.
> >c:60: warning: 'r300_emit_cliprects' defined but not used ***
> > Error code 1
> >
> > Stop in /usr/home/jan/dri/r300_driver/drm/bsd-core/radeon.
> > *** Error code 1
> >
> > So it seems that r300 would work (as good as in linux), if the
> > drm-part of it would be updated to compile under freebsd. But
> > this is beyond my skills.
>
> Try this:
>
> --- r300_cmdbuf.c.orig  Tue Apr 19 17:14:33 2005
> +++ r300_cmdbuf.c       Tue Apr 19 17:14:49 2005
> @@ -125,13 +125,12 @@
>         return 0;
>  }
>
> -unsigned char  r300_reg_flags[0x10000>>2];
> +unsigned char  r300_reg_flags[0x10000>>2]={ 0 };
>
>
> -void __init r300_init_reg_flags(void)
> +void r300_init_reg_flags(void)
>  {
>  int i;
> -memset(r300_reg_flags, 0, 0x10000>>2);

memset() is okay and it is better that way (at least for 
FreeBSD/amd64):

http://lists.freebsd.org/pipermail/freebsd-amd64/2005-March/004058.html

My experiment shows GCC misoptimizes this type of initialization on 
AMD64 where glibc is not used (i. e., *BSD).

Removing __init is enough, I believe.  Please see my previous posting.

Thanks,

Jung-uk Kim

>  #define ADD_RANGE(reg, count) 
> for(i=(reg>>2);i<(reg>>2)+count;i++)r300_reg_flags[i]|=1;
>
>         /* these match cmducs() command in
> r300_driver/r300/r300_cmdbuf.c */
>
> > Greetings Jan


-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to