* fb_pan_display
@ 2002-11-01 17:11 James Simmons
2002-11-02 13:20 ` fb_pan_display Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: James Simmons @ 2002-11-01 17:11 UTC (permalink / raw)
To: Linux Fbdev development list
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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: fb_pan_display
2002-11-01 17:11 fb_pan_display James Simmons
@ 2002-11-02 13:20 ` Geert Uytterhoeven
2002-11-09 1:04 ` fb_pan_display James Simmons
2002-11-02 18:43 ` fb_pan_display Antonino Daplas
2002-11-03 2:25 ` fb_pan_display Petr Vandrovec
2 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2002-11-02 13:20 UTC (permalink / raw)
To: James Simmons; +Cc: Linux Fbdev development list
On Fri, 1 Nov 2002, James Simmons wrote:
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: fb_pan_display
2002-11-02 13:20 ` fb_pan_display Geert Uytterhoeven
@ 2002-11-09 1:04 ` James Simmons
2002-11-11 10:04 ` Linux 2.5.47 compile error Michael Kummer
0 siblings, 1 reply; 8+ messages in thread
From: James Simmons @ 2002-11-09 1:04 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux Fbdev development list
> > 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.
> > 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
^ permalink raw reply [flat|nested] 8+ messages in thread* Linux 2.5.47 compile error
2002-11-09 1:04 ` fb_pan_display James Simmons
@ 2002-11-11 10:04 ` Michael Kummer
2002-11-12 17:44 ` James Simmons
2002-11-18 19:56 ` [Linux-fbdev-devel] " James Simmons
0 siblings, 2 replies; 8+ messages in thread
From: Michael Kummer @ 2002-11-11 10:04 UTC (permalink / raw)
To: Linux Kernel Mailinglist; +Cc: Linux Fbdev development list
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Linux 2.5.47 compile error
2002-11-11 10:04 ` Linux 2.5.47 compile error Michael Kummer
@ 2002-11-12 17:44 ` James Simmons
2002-11-18 19:56 ` [Linux-fbdev-devel] " James Simmons
1 sibling, 0 replies; 8+ messages in thread
From: James Simmons @ 2002-11-12 17:44 UTC (permalink / raw)
To: Michael Kummer; +Cc: Linux Kernel Mailinglist, Linux Fbdev development list
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
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Linux-fbdev-devel] Linux 2.5.47 compile error
2002-11-11 10:04 ` Linux 2.5.47 compile error Michael Kummer
2002-11-12 17:44 ` James Simmons
@ 2002-11-18 19:56 ` James Simmons
1 sibling, 0 replies; 8+ messages in thread
From: James Simmons @ 2002-11-18 19:56 UTC (permalink / raw)
To: Michael Kummer; +Cc: Linux Kernel Mailinglist, Linux Fbdev development list
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: fb_pan_display
2002-11-01 17:11 fb_pan_display James Simmons
2002-11-02 13:20 ` fb_pan_display Geert Uytterhoeven
@ 2002-11-02 18:43 ` Antonino Daplas
2002-11-03 2:25 ` fb_pan_display Petr Vandrovec
2 siblings, 0 replies; 8+ messages in thread
From: Antonino Daplas @ 2002-11-02 18:43 UTC (permalink / raw)
To: James Simmons; +Cc: Linux Fbdev development list
On Sat, 2002-11-02 at 01:11, 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)
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: fb_pan_display
2002-11-01 17:11 fb_pan_display James Simmons
2002-11-02 13:20 ` fb_pan_display Geert Uytterhoeven
2002-11-02 18:43 ` fb_pan_display Antonino Daplas
@ 2002-11-03 2:25 ` Petr Vandrovec
2 siblings, 0 replies; 8+ messages in thread
From: Petr Vandrovec @ 2002-11-03 2:25 UTC (permalink / raw)
To: James Simmons; +Cc: Linux Fbdev development list
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?
> 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;
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-11-18 19:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-01 17:11 fb_pan_display James Simmons
2002-11-02 13:20 ` fb_pan_display Geert Uytterhoeven
2002-11-09 1:04 ` fb_pan_display James Simmons
2002-11-11 10:04 ` Linux 2.5.47 compile error Michael Kummer
2002-11-12 17:44 ` James Simmons
2002-11-18 19:56 ` [Linux-fbdev-devel] " James Simmons
2002-11-02 18:43 ` fb_pan_display Antonino Daplas
2002-11-03 2:25 ` fb_pan_display Petr Vandrovec
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).