From: James Simmons <hidden> Date: 2002-11-01 16:17:47
Hi!
Looking at the last bits of the fbdev changes I have question. Currently
I have in fbgen.c:
int fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
{
int xoffset = var->xoffset;
int yoffset = var->yoffset;
int err;
if (xoffset < 0 || yoffset < 0 ||
xoffset + info->var.xres > info->var.xres_virtual ||
yoffset + info->var.yres > info->var.yres_virtual)
return -EINVAL;
if (info->fbops->fb_pan_display) {
if ((err = info->fbops->fb_pan_display(var, info)))
return err;
else
return -EINVAL;
}
info->var.xoffset = var->xoffset;
info->var.yoffset = var->yoffset;
if (var->vmode & FB_VMODE_YWRAP)
info->var.vmode |= FB_VMODE_YWRAP;
else
info->var.vmode &= ~FB_VMODE_YWRAP;
return 0;
}
Now what I was wondering are these test standard enough that we coudl call
this instead of info->fb_ops->fb_pan_display. Several drivers have this
test so it would me more code reduction.
MS: (n) 1. A debilitating and surprisingly widespread affliction that
renders the sufferer barely able to perform the simplest task. 2. A disease.
James Simmons [jsimmons@users.sf.net] ____/|
fbdev/console/gfx developer \ o.O|
http://www.linux-fbdev.org =(_)=
http://linuxgfx.sourceforge.net U
http://linuxconsole.sourceforge.net
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
Looking at the last bits of the fbdev changes I have question. Currently
I have in fbgen.c:
int fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
{
int xoffset = var->xoffset;
int yoffset = var->yoffset;
int err;
if (xoffset < 0 || yoffset < 0 ||
xoffset + info->var.xres > info->var.xres_virtual ||
yoffset + info->var.yres > info->var.yres_virtual)
return -EINVAL;
The one above is generic.
if (info->fbops->fb_pan_display) {
if ((err = info->fbops->fb_pan_display(var, info)))
return err;
else
return -EINVAL;
}
This is weird. if 0 == info->fbops->fb_pan_display, there's no panning, but it
does succeed?
info->var.xoffset = var->xoffset;
info->var.yoffset = var->yoffset;
if (var->vmode & FB_VMODE_YWRAP)
info->var.vmode |= FB_VMODE_YWRAP;
else
info->var.vmode &= ~FB_VMODE_YWRAP;
return 0;
}
Now what I was wondering are these test standard enough that we coudl call
this instead of info->fb_ops->fb_pan_display. Several drivers have this
test so it would me more code reduction.
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: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
Hi!
Looking at the last bits of the fbdev changes I have question. Currently
I have in fbgen.c:
int fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
{
int xoffset = var->xoffset;
int yoffset = var->yoffset;
int err;
if (xoffset < 0 || yoffset < 0 ||
xoffset + info->var.xres > info->var.xres_virtual ||
yoffset + info->var.yres > info->var.yres_virtual)
return -EINVAL;
if (info->fbops->fb_pan_display) {
if ((err = info->fbops->fb_pan_display(var, info)))
return err;
else
return -EINVAL;
}
info->var.xoffset = var->xoffset;
info->var.yoffset = var->yoffset;
if (var->vmode & FB_VMODE_YWRAP)
info->var.vmode |= FB_VMODE_YWRAP;
else
info->var.vmode &= ~FB_VMODE_YWRAP;
return 0;
}
Now what I was wondering are these test standard enough that we coudl call
this instead of info->fb_ops->fb_pan_display. Several drivers have this
test so it would me more code reduction.
Looks generic enough for me.
Tony
-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
From: Petr Vandrovec <hidden> Date: 2002-11-03 02:25:29
On Fri, Nov 01, 2002 at 09:11:08AM -0800, James Simmons wrote:
Hi!
Looking at the last bits of the fbdev changes I have question. Currently
I have in fbgen.c:
int fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
{
int xoffset = var->xoffset;
int yoffset = var->yoffset;
int err;
if (xoffset < 0 || yoffset < 0 ||
xoffset + info->var.xres > info->var.xres_virtual ||
yoffset + info->var.yres > info->var.yres_virtual)
Hm, do not YWRAP devices need this
if (xoffset < 0 || yoffset < 0 ||
xoffset >= info->var.xres_virtual ||
yoffset >= info->var.yres_virtual) {
instead?
Somebody has to check whether FB_VMODE_YWRAP is supported
by this hardware at all (i.e. var.vmode should already
contain FB_VMODE_YWRAP bit set from previous set_var, should
not it?).
Best regards,
Petr Vandrovec
vandrove@vc.cvut.cz
-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
From: James Simmons <hidden> Date: 2002-11-09 01:04:47
quoted
if (info->fbops->fb_pan_display) {
if ((err = info->fbops->fb_pan_display(var, info)))
return err;
else
return -EINVAL;
}
This is weird. if 0 == info->fbops->fb_pan_display, there's no panning, but it
does succeed?
Thanks for noticing. That is just plain wrong. I need to fix that
tomorrow.
quoted
info->var.xoffset = var->xoffset;
info->var.yoffset = var->yoffset;
if (var->vmode & FB_VMODE_YWRAP)
info->var.vmode |= FB_VMODE_YWRAP;
else
info->var.vmode &= ~FB_VMODE_YWRAP;
return 0;
}
Now what I was wondering are these test standard enough that we coudl call
this instead of info->fb_ops->fb_pan_display. Several drivers have this
test so it would me more code reduction.
That is the idea. fb_pan_display above would always be called.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
From: Michael Kummer <hidden> Date: 2002-11-11 09:57:38
make -f scripts/Makefile.build obj=drivers/video/riva
gcc -Wp,-MD,drivers/video/riva/.fbdev.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=i686 -malign-functions=4 -Iarch/i386/mach-generic -nostdinc
-iwithprefix include -DKBUILD_BASENAME=fbdev -c -o
drivers/video/riva/fbdev.o drivers/video/riva/fbdev.c
drivers/video/riva/fbdev.c: In function `riva_set_dispsw':
drivers/video/riva/fbdev.c:665: structure has no member named `type'
drivers/video/riva/fbdev.c:666: structure has no member named `type_aux'
drivers/video/riva/fbdev.c:667: structure has no member named `ypanstep'
drivers/video/riva/fbdev.c:668: structure has no member named `ywrapstep'
drivers/video/riva/fbdev.c:677: structure has no member named
`line_length'
drivers/video/riva/fbdev.c:678: structure has no member named `visual'
drivers/video/riva/fbdev.c:686: structure has no member named
`line_length'
drivers/video/riva/fbdev.c:687: structure has no member named `visual'
drivers/video/riva/fbdev.c:695: structure has no member named
`line_length'
drivers/video/riva/fbdev.c:696: structure has no member named `visual'
drivers/video/riva/fbdev.c: In function `rivafb_get_fix':
drivers/video/riva/fbdev.c:1294: structure has no member named `type'
drivers/video/riva/fbdev.c:1295: structure has no member named `type_aux'
drivers/video/riva/fbdev.c:1296: structure has no member named `visual'
drivers/video/riva/fbdev.c:1302: structure has no member named
`line_length'
drivers/video/riva/fbdev.c: In function `rivafb_pan_display':
drivers/video/riva/fbdev.c:1611: structure has no member named
`line_length'
drivers/video/riva/fbdev.c:1586: warning: `base' might be used
uninitialized in this function
drivers/video/riva/fbdev.c: At top level:
drivers/video/riva/fbdev.c:1748: unknown field `fb_get_fix' specified in
initializer
drivers/video/riva/fbdev.c:1748: warning: initialization from incompatible
pointer type
drivers/video/riva/fbdev.c:1749: unknown field `fb_get_var' specified in
initializer
drivers/video/riva/fbdev.c:1749: warning: initialization from incompatible
pointer type
make[3]: *** [drivers/video/riva/fbdev.o] Error 1
make[2]: *** [drivers/video/riva] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
--
best regards
Michael Kummer
--
Michael Kummer - [A]ustrian [E]lite [S]printer
Lieferinger-Hauptstrasse 47 - A 5020 Salzburg
Mobile: +43 664 3333995
EMail: michael@kummer.cc
Web: http://www.sprinter.cc
From: James Simmons <hidden> Date: 2002-11-12 17:38:30
IT will be fixed in the next change set.
On Mon, 11 Nov 2002, Michael Kummer wrote:
make -f scripts/Makefile.build obj=drivers/video/riva
gcc -Wp,-MD,drivers/video/riva/.fbdev.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=i686 -malign-functions=4 -Iarch/i386/mach-generic -nostdinc
-iwithprefix include -DKBUILD_BASENAME=fbdev -c -o
drivers/video/riva/fbdev.o drivers/video/riva/fbdev.c
drivers/video/riva/fbdev.c: In function `riva_set_dispsw':
drivers/video/riva/fbdev.c:665: structure has no member named `type'
drivers/video/riva/fbdev.c:666: structure has no member named `type_aux'
drivers/video/riva/fbdev.c:667: structure has no member named `ypanstep'
drivers/video/riva/fbdev.c:668: structure has no member named `ywrapstep'
drivers/video/riva/fbdev.c:677: structure has no member named
`line_length'
drivers/video/riva/fbdev.c:678: structure has no member named `visual'
drivers/video/riva/fbdev.c:686: structure has no member named
`line_length'
drivers/video/riva/fbdev.c:687: structure has no member named `visual'
drivers/video/riva/fbdev.c:695: structure has no member named
`line_length'
drivers/video/riva/fbdev.c:696: structure has no member named `visual'
drivers/video/riva/fbdev.c: In function `rivafb_get_fix':
drivers/video/riva/fbdev.c:1294: structure has no member named `type'
drivers/video/riva/fbdev.c:1295: structure has no member named `type_aux'
drivers/video/riva/fbdev.c:1296: structure has no member named `visual'
drivers/video/riva/fbdev.c:1302: structure has no member named
`line_length'
drivers/video/riva/fbdev.c: In function `rivafb_pan_display':
drivers/video/riva/fbdev.c:1611: structure has no member named
`line_length'
drivers/video/riva/fbdev.c:1586: warning: `base' might be used
uninitialized in this function
drivers/video/riva/fbdev.c: At top level:
drivers/video/riva/fbdev.c:1748: unknown field `fb_get_fix' specified in
initializer
drivers/video/riva/fbdev.c:1748: warning: initialization from incompatible
pointer type
drivers/video/riva/fbdev.c:1749: unknown field `fb_get_var' specified in
initializer
drivers/video/riva/fbdev.c:1749: warning: initialization from incompatible
pointer type
make[3]: *** [drivers/video/riva/fbdev.o] Error 1
make[2]: *** [drivers/video/riva] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
From: James Simmons <hidden> Date: 2002-11-18 19:49:13
I just finished the aty128 driver last night to tha lastest api. I haven't
commited just yet. I started to test the 3Dfx driver and will work on the
riva driver tonight.