linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] - video/tdfxfb.c warning fix.
@ 2004-04-30 18:04 Luiz Fernando N. Capitulino
  2004-05-01  4:35 ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Luiz Fernando N. Capitulino @ 2004-04-30 18:04 UTC (permalink / raw)
  To: Andrew Morton; +Cc: James Simmons, linux-fbdev-devel


 Hi Andrew,

 This patch fixes this warning:

 drivers/video/tdfxfb.c:1005: warning: `tdfxfb_cursor' defined but not
 used

 and make the acceleration function selectable (like hgafb
and tridentfb):


 drivers/video/Kconfig  |    8 ++++++++
 drivers/video/tdfxfb.c |    8 +++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)


diff -X dontdiff -Nparu a/drivers/video/Kconfig a~/drivers/video/Kconfig
--- a/drivers/video/Kconfig	2004-04-26 15:25:52.000000000 -0300
+++ a~/drivers/video/Kconfig	2004-04-27 18:15:23.000000000 -0300
@@ -751,6 +751,14 @@ config FB_3DFX
 	  To compile this driver as a module, choose M here: the
 	  module will be called tdfxfb.
 
+config FB_3DFX_ACCEL
+	bool "3Dfx Banshee/Voodoo3 Acceleration functions (EXPERIMENTAL)"
+	depends on FB_3DFX && EXPERIMENTAL
+	---help---
+	This will compile the 3Dfx Banshee/Voodoo3 frame buffer device
+	with acceleration functions.
+
+
 config FB_VOODOO1
 	tristate "3Dfx Voodoo Graphics (sst1) support"
 	depends on FB && PCI
diff -X dontdiff -Nparu a/drivers/video/tdfxfb.c a~/drivers/video/tdfxfb.c
--- a/drivers/video/tdfxfb.c	2004-03-11 14:20:50.000000000 -0300
+++ a~/drivers/video/tdfxfb.c	2004-04-27 19:35:22.000000000 -0300
@@ -166,7 +166,11 @@ static int tdfxfb_pan_display(struct fb_
 static void tdfxfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
 static void tdfxfb_copyarea(struct fb_info *info, const struct fb_copyarea *area);  
 static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image); 
+#ifdef CONFIG_FB_3DFX_ACCEL
 static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor);
+#else /* !CONFIG_FB_3DFX_ACCEL */
+#define tdfxfb_cursor soft_cursor
+#endif /* CONFIG_FB_3DFX_ACCEL */
 static int banshee_wait_idle(struct fb_info *info);
 
 static struct fb_ops tdfxfb_ops = {
@@ -180,7 +184,7 @@ static struct fb_ops tdfxfb_ops = {
 	.fb_copyarea	= tdfxfb_copyarea,
 	.fb_imageblit	= tdfxfb_imageblit,
 	.fb_sync	= banshee_wait_idle,
-	.fb_cursor	= soft_cursor,
+	.fb_cursor	= tdfxfb_cursor,
 };
 
 /*
@@ -1001,6 +1005,7 @@ static void tdfxfb_imageblit(struct fb_i
 	banshee_wait_idle(info);
 }
 
+#ifdef CONFIG_FB_3DFX_ACCEL
 static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
 {
 	struct tdfx_par *par = (struct tdfx_par *) info->par;
@@ -1137,6 +1142,7 @@ static int tdfxfb_cursor(struct fb_info 
 	spin_unlock_irqrestore(&par->DAClock, flags);
 	return 0;
 }
+#endif /* CONFIG_FB_3DFX_ACCEL */
 
 /**
  *      tdfxfb_probe - Device Initializiation

-- 
Luiz Fernando N. Capitulino
<http://www.telecentros.sp.gov.br>


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] - video/tdfxfb.c warning fix.
  2004-04-30 18:04 [PATCH] - video/tdfxfb.c warning fix Luiz Fernando N. Capitulino
@ 2004-05-01  4:35 ` Andrew Morton
  2004-05-01 18:47   ` Geert Uytterhoeven
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2004-05-01  4:35 UTC (permalink / raw)
  To: Luiz Fernando N. Capitulino; +Cc: jsimmons, linux-fbdev-devel

"Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br> wrote:
>
>  This patch fixes this warning:
> 
>   drivers/video/tdfxfb.c:1005: warning: `tdfxfb_cursor' defined but not
>   used
> 
>   and make the acceleration function selectable (like hgafb
>  and tridentfb):
> 

You've taken a bunch of previously-working 3d acceleration functions and
made them configurable, dependent upon CONFIG_EXPERIMENTAL.

What on earth for?  Will this not gratuitously break people's
previously-working 3d setups?



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: [PATCH] - video/tdfxfb.c warning fix.
  2004-05-01  4:35 ` Andrew Morton
@ 2004-05-01 18:47   ` Geert Uytterhoeven
  2004-05-01 19:08     ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2004-05-01 18:47 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Luiz Fernando N. Capitulino, James Simmons,
	Linux Frame Buffer Device Development

On Fri, 30 Apr 2004, Andrew Morton wrote:
> "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br> wrote:
> >  This patch fixes this warning:
> >
> >   drivers/video/tdfxfb.c:1005: warning: `tdfxfb_cursor' defined but not
> >   used
> >
> >   and make the acceleration function selectable (like hgafb
> >  and tridentfb):
>
> You've taken a bunch of previously-working 3d acceleration functions and
> made them configurable, dependent upon CONFIG_EXPERIMENTAL.
>
> What on earth for?  Will this not gratuitously break people's
> previously-working 3d setups?

No, tdfxfb_cursor() was not used before, causing a compiler warning.
tdfxfb_cursor() may work, but we don't know, so we didn't dare to enable it by
default. Now the user (he who has the hardware) can enable it, and tell us
whether it works or not.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: [PATCH] - video/tdfxfb.c warning fix.
  2004-05-01 18:47   ` Geert Uytterhoeven
@ 2004-05-01 19:08     ` Andrew Morton
  2004-05-01 19:09       ` Andrew Morton
  2004-05-01 19:16       ` Geert Uytterhoeven
  0 siblings, 2 replies; 8+ messages in thread
From: Andrew Morton @ 2004-05-01 19:08 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: lcapitulino, jsimmons, linux-fbdev-devel

Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
>  > You've taken a bunch of previously-working 3d acceleration functions and
>  > made them configurable, dependent upon CONFIG_EXPERIMENTAL.
>  >
>  > What on earth for?  Will this not gratuitously break people's
>  > previously-working 3d setups?
> 
>  No, tdfxfb_cursor() was not used before, causing a compiler warning.
>  tdfxfb_cursor() may work, but we don't know, so we didn't dare to enable it by
>  default. Now the user (he who has the hardware) can enable it, and tell us
>  whether it works or not.

OK, thanks.  As you can see, it really helps if people explain this sort of
thing in their initial patch (sigh).

Does the same argument apply to this patch?


From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>

Speaking with frame buffer people, we agree with this patch to fix the
warning:

drivers/video/tridentfb.c:455: warning: `tridentfb_fillrect' defined but not used
drivers/video/tridentfb.c:473: warning: `tridentfb_copyarea' defined but not used


---

 25-akpm/drivers/video/Kconfig     |    8 ++++++++
 25-akpm/drivers/video/tridentfb.c |   13 ++++++++-----
 2 files changed, 16 insertions(+), 5 deletions(-)

diff -puN drivers/video/Kconfig~tridentfbc-warning-fix drivers/video/Kconfig
--- 25/drivers/video/Kconfig~tridentfbc-warning-fix	2004-04-30 21:31:24.595256488 -0700
+++ 25-akpm/drivers/video/Kconfig	2004-04-30 21:31:24.601255576 -0700
@@ -787,6 +787,14 @@ config FB_TRIDENT
 	  To compile this driver as a module, choose M here: the
 	  module will be called tridentfb.
 
+config FB_TRIDENT_ACCEL
+	bool "Trident Acceleration functions (EXPERIMENTAL)"
+	depends on FB_TRIDENT && EXPERIMENTAL
+	---help---
+	This will compile the Trident frame buffer device with
+	acceleration functions.
+
+
 config FB_PM3
 	tristate "Permedia3 support"
 	depends on FB && PCI && BROKEN
diff -puN drivers/video/tridentfb.c~tridentfbc-warning-fix drivers/video/tridentfb.c
--- 25/drivers/video/tridentfb.c~tridentfbc-warning-fix	2004-04-30 21:31:24.597256184 -0700
+++ 25-akpm/drivers/video/tridentfb.c	2004-04-30 21:31:24.602255424 -0700
@@ -450,7 +450,7 @@ static struct accel_switch accel_image =
 /*
  * Accel functions called by the upper layers
  */
-
+#ifdef CONFIG_FB_TRIDENT_ACCEL
 static void tridentfb_fillrect(struct fb_info * info, const struct fb_fillrect *fr)
 {
 	int bpp = info->var.bits_per_pixel;
@@ -474,6 +474,11 @@ static void tridentfb_copyarea(struct fb
 	acc->copy_rect(ca->sx,ca->sy,ca->dx,ca->dy,ca->width,ca->height);
 	acc->wait_engine();
 }
+#else /* !CONFIG_FB_TRIDENT_ACCEL */
+#define tridentfb_fillrect cfb_fillrect
+#define tridentfb_copyarea cfb_copyarea
+#endif /* CONFIG_FB_TRIDENT_ACCEL */
+
 
 /*
  * Hardware access functions
@@ -1265,10 +1270,8 @@ static struct fb_ops tridentfb_ops = {
 	.fb_blank = tridentfb_blank,
 	.fb_check_var = tridentfb_check_var,
 	.fb_set_par = tridentfb_set_par,
-//	.fb_fillrect = tridentfb_fillrect,
-//	.fb_copyarea= tridentfb_copyarea,
-	.fb_fillrect = cfb_fillrect,
-	.fb_copyarea= cfb_copyarea,
+	.fb_fillrect = tridentfb_fillrect,
+	.fb_copyarea= tridentfb_copyarea,
 	.fb_imageblit = cfb_imageblit,
 	.fb_cursor = soft_cursor,
 };

_



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: [PATCH] - video/tdfxfb.c warning fix.
  2004-05-01 19:08     ` Andrew Morton
@ 2004-05-01 19:09       ` Andrew Morton
  2004-05-01 19:17         ` Geert Uytterhoeven
  2004-05-01 19:16       ` Geert Uytterhoeven
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2004-05-01 19:09 UTC (permalink / raw)
  To: geert, lcapitulino, jsimmons, linux-fbdev-devel

Andrew Morton <akpm@osdl.org> wrote:
>
>  Does the same argument apply to this patch?
> 

And to this one?


From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>

Make HGA acceleration functions selectable in kernel config, fix these
warnings:

drivers/video/hgafb.c:452: warning: `hgafb_fillrect' defined but not used
drivers/video/hgafb.c:472: warning: `hgafb_copyarea' defined but not used
drivers/video/hgafb.c:502: warning: `hgafb_imageblit' defined but not used


---

 25-akpm/drivers/video/Kconfig |    8 ++++++++
 25-akpm/drivers/video/hgafb.c |   15 ++++++++++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff -puN drivers/video/hgafb.c~hgafbc-warning-fix drivers/video/hgafb.c
--- 25/drivers/video/hgafb.c~hgafbc-warning-fix	2004-04-30 21:30:31.788284368 -0700
+++ 25-akpm/drivers/video/hgafb.c	2004-04-30 21:30:31.793283608 -0700
@@ -448,6 +448,10 @@ static int hgafb_blank(int blank_mode, s
 	return 0;
 }
 
+/*
+ * Accel functions
+ */
+#ifdef CONFIG_FB_HGA_ACCEL
 static void hgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
 {
 	u_int rows, y;
@@ -510,6 +514,11 @@ static void hgafb_imageblit(struct fb_in
 		*dest = d;
 	}
 }
+#else /* !CONFIG_FB_HGA_ACCEL */
+#define hgafb_fillrect cfb_fillrect
+#define hgafb_copyarea cfb_copyarea
+#define hgafb_imageblit cfb_imageblit
+#endif /* CONFIG_FB_HGA_ACCEL */
 
 
 static struct fb_ops hgafb_ops = {
@@ -519,9 +528,9 @@ static struct fb_ops hgafb_ops = {
 	.fb_setcolreg	= hgafb_setcolreg,
 	.fb_pan_display	= hgafb_pan_display,
 	.fb_blank	= hgafb_blank,
-	.fb_fillrect	= cfb_fillrect, //hgafb_fillrect,
-	.fb_copyarea	= cfb_copyarea,	//hgafb_copyarea,
-	.fb_imageblit	= cfb_imageblit,//hgafb_imageblit,
+	.fb_fillrect	= hgafb_fillrect,
+	.fb_copyarea	= hgafb_copyarea,
+	.fb_imageblit	= hgafb_imageblit,
 };
 		
 /* ------------------------------------------------------------------------- *
diff -puN drivers/video/Kconfig~hgafbc-warning-fix drivers/video/Kconfig
--- 25/drivers/video/Kconfig~hgafbc-warning-fix	2004-04-30 21:30:31.789284216 -0700
+++ 25-akpm/drivers/video/Kconfig	2004-04-30 21:30:31.794283456 -0700
@@ -308,6 +308,14 @@ config FB_HGA
 	  As this card technology is 15 years old, most people will answer N
 	  here.
 
+config FB_HGA_ACCEL
+	bool "Hercules mono Acceleration functions (EXPERIMENTAL)"
+	depends on FB_HGA && EXPERIMENTAL
+	---help---
+	This will compile the Hercules mono graphics with
+	acceleration functions.
+
+
 config VIDEO_SELECT
 	bool
 	depends on FB && X86

_



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: [PATCH] - video/tdfxfb.c warning fix.
  2004-05-01 19:08     ` Andrew Morton
  2004-05-01 19:09       ` Andrew Morton
@ 2004-05-01 19:16       ` Geert Uytterhoeven
  2004-05-03 16:09         ` Luiz Fernando N. Capitulino
  1 sibling, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2004-05-01 19:16 UTC (permalink / raw)
  To: Andrew Morton
  Cc: lcapitulino, James Simmons, Linux Frame Buffer Device Development

On Sat, 1 May 2004, Andrew Morton wrote:
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> >  > You've taken a bunch of previously-working 3d acceleration functions and
> >  > made them configurable, dependent upon CONFIG_EXPERIMENTAL.
> >  >
> >  > What on earth for?  Will this not gratuitously break people's
> >  > previously-working 3d setups?
> >
> >  No, tdfxfb_cursor() was not used before, causing a compiler warning.
> >  tdfxfb_cursor() may work, but we don't know, so we didn't dare to enable it by
> >  default. Now the user (he who has the hardware) can enable it, and tell us
> >  whether it works or not.
>
> OK, thanks.  As you can see, it really helps if people explain this sort of
> thing in their initial patch (sigh).
>
> Does the same argument apply to this patch?

Yes. All these patches should enable the currently unused acceleration routines
if the corresponding config option is set, and kill the compiler warnings if
its not set.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: [PATCH] - video/tdfxfb.c warning fix.
  2004-05-01 19:09       ` Andrew Morton
@ 2004-05-01 19:17         ` Geert Uytterhoeven
  0 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2004-05-01 19:17 UTC (permalink / raw)
  To: Andrew Morton
  Cc: lcapitulino, James Simmons, Linux Frame Buffer Device Development

On Sat, 1 May 2004, Andrew Morton wrote:
> Andrew Morton <akpm@osdl.org> wrote:
> >
> >  Does the same argument apply to this patch?
>
> And to this one?
>
>
> From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>
>
> Make HGA acceleration functions selectable in kernel config, fix these
> warnings:

Yep.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: [PATCH] - video/tdfxfb.c warning fix.
  2004-05-01 19:16       ` Geert Uytterhoeven
@ 2004-05-03 16:09         ` Luiz Fernando N. Capitulino
  0 siblings, 0 replies; 8+ messages in thread
From: Luiz Fernando N. Capitulino @ 2004-05-03 16:09 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Andrew Morton, lcapitulino, James Simmons,
	Linux Frame Buffer Device Development

Em Sat, May 01, 2004 at 09:16:29PM +0200, Geert Uytterhoeven escreveu:

| On Sat, 1 May 2004, Andrew Morton wrote:
| > Geert Uytterhoeven <geert@linux-m68k.org> wrote:
| > >  > You've taken a bunch of previously-working 3d acceleration functions and
| > >  > made them configurable, dependent upon CONFIG_EXPERIMENTAL.
| > >  >
| > >  > What on earth for?  Will this not gratuitously break people's
| > >  > previously-working 3d setups?
| > >
| > >  No, tdfxfb_cursor() was not used before, causing a compiler warning.
| > >  tdfxfb_cursor() may work, but we don't know, so we didn't dare to enable it by
| > >  default. Now the user (he who has the hardware) can enable it, and tell us
| > >  whether it works or not.
| >
| > OK, thanks.  As you can see, it really helps if people explain this sort of
| > thing in their initial patch (sigh).
| >
| > Does the same argument apply to this patch?
| 
| Yes. All these patches should enable the currently unused acceleration routines
| if the corresponding config option is set, and kill the compiler warnings if
| its not set.

 Humm, my fault. I thought my comments was enough, will try to make
better in next time.

PS: Andrew, I always need to think about "be very clear" vs "Andrew's time
to read e-mails". It is not a easy task. :-)

-- 
Luiz Fernando N. Capitulino
<http://www.telecentros.sp.gov.br>


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-05-03 16:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-30 18:04 [PATCH] - video/tdfxfb.c warning fix Luiz Fernando N. Capitulino
2004-05-01  4:35 ` Andrew Morton
2004-05-01 18:47   ` Geert Uytterhoeven
2004-05-01 19:08     ` Andrew Morton
2004-05-01 19:09       ` Andrew Morton
2004-05-01 19:17         ` Geert Uytterhoeven
2004-05-01 19:16       ` Geert Uytterhoeven
2004-05-03 16:09         ` Luiz Fernando N. Capitulino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).