2002-02-08 13:10:00

by Adrian Bunk

[permalink] [raw]
Subject: Problem with both CONFIG_FB_SIS_300 and CONFIG_FB_SIS_315

Hi Gerd,

with the following in the .config:

CONFIG_FB_SIS_300=y
CONFIG_FB_SIS_315=y

gcc gices the following warnings when compiling sis_main.h:

<-- snip -->

make[4]: Entering directory
`/home/bunk/linux/kernel-2.4/linux/drivers/video/sis'
gcc -D__KERNEL__ -I/home/bunk/linux/kernel-2.4/linux/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6
-DKBUILD_BASENAME=sis_main -c -o sis_main.o sis_main.c
In file included from sis_main.c:46:
sis_main.h:33: warning: `HW_CURSOR_AREA_SIZE' redefined
sis_main.h:27: warning: this is the location of the previous definition
sis_main.h:92: warning: `IND_SIS_CRT2_WRITE_ENABLE' redefined
sis_main.h:89: warning: this is the location of the previous definition

<-- snip -->

gcc is pretty right to give warnings because the affected lines are:

<-- snip -->

...
/* For 300 series */
#ifdef CONFIG_FB_SIS_300
#define TURBO_QUEUE_AREA_SIZE 0x80000 /* 512K */
#define HW_CURSOR_AREA_SIZE 0x1000 /* 4K */
#endif

/* For 315 series */
#ifdef CONFIG_FB_SIS_315
#define COMMAND_QUEUE_AREA_SIZE 0x80000 /* 512K */
#define HW_CURSOR_AREA_SIZE 0x4000 /* 16K */
#define COMMAND_QUEUE_THRESHOLD 0x1F
#endif
...
// Eden Chen
#ifdef CONFIG_FB_SIS_300
#define IND_SIS_CRT2_WRITE_ENABLE 0x24
#endif
#ifdef CONFIG_FB_SIS_315
#define IND_SIS_CRT2_WRITE_ENABLE 0x2F
#endif
// ~Eden Chen
...

<-- snip -->


I doubt that with both CONFIG_FB_SIS_300 and CONFIG_FB_SIS_315 enabled a
card that needs CONFIG_FB_SIS_300 would work.

I have no knowledge of this driver but there seem to be two possibilities
to resolve this:

1. Change the code to allow both CONFIG_FB_SIS_300 and CONFIG_FB_SIS_315
to be enabled at the same time.
2. Change Config.in to allow only one of the two options in one kernel.


cu
Adrian



2002-02-09 13:22:57

by Thomas Winischhofer

[permalink] [raw]
Subject: Re: Problem with both CONFIG_FB_SIS_300 and CONFIG_FB_SIS_315


Hi,

you're right. Both options don't (yet) work together.

I have a new version of sisfb around the corner (partly new code from
SiS themselves). The code is currently in a testing phase and will be
committed as soon as it is stable.

The goal is to have the same code basis for the sisfb as well as the X
driver. This is under development - and it will solve the issue you
described as well.

For the status of the current development, see
http://www.webit.com/tw/linuxsis630.shtml

Thomas

--
Thomas Winischhofer
Vienna/Austria
mailto:[email protected] *** http://www.webit.com/tw