Skip to contentSkip to conversation

gen_set_var() fix?

PATCH Jani Monoses 4 participants 5 messages Aug 28, 2002 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

James
Should't gen_set_var set the var in info here as well? (when no check_var present) BTW is gen_set_var going to stay in the new API or go away ?

fbgen.c Wed Aug 28 09:57:32 2002 renamed from fbgen.c.orig Wed Aug 28 09:49:45 2002 +1 -1
@@ -36,7 +36,7 @@
 
        if (con < 0 || (memcmp(&info->var, var, sizeof(struct fb_var_screeninfo)))) {
                if (!info->fbops->fb_check_var) {
-                       *var = info->var;
+                       info->var = *var;
                        return 0;
                }
 

-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim

#1 lore raw
Quoted 8 lines · Jani Monoses

James
Should't gen_set_var set the var in info here as well? (when no check_var present) BTW is gen_set_var going to stay in the new API or go away ?

fbgen.c Wed Aug 28 09:57:32 2002 line 42

Quoted 8 lines
fbgen.c Wed Aug 28 09:57:32 2002 renamed from fbgen.c.orig Wed Aug 28 09:49:45 2002 +1 -1
@@ -36,7 +36,7 @@
 
        if (con < 0 || (memcmp(&info->var, var, sizeof(struct fb_var_screeninfo)))) {
                if (!info->fbops->fb_check_var) {
-                       *var = info->var;
+                       info->var = *var;
                        return 0;
                }
 

The original code is correct. It means the driver supports only 1 video mode, which is the current one in info->var.

Tony

-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim

#2 lore raw

Thanks
so not having check_var implies we only support one video mode?

Quoted 10 lines
Quoted 2 lines

The original code is correct. It means the driver supports only 1 video mode, which is the current one in info->var.

Tony

Quoted 8 lines

-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim
_______________________________________________
Linux-fbdev-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim

#3 lore raw
Quoted 1 line · Jani Monoses

so not having check_var implies we only support one video mode?

Yes. This is useful for e.g. handheld devices with LCDs, and for offb.

Quoted 2 lines
Quoted 2 lines

The original code is correct. It means the driver supports only 1 video mode, which is the current one in info->var.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim

#4 lore raw
In reply to Jani Monoses
Quoted 3 lines

James
Should't gen_set_var set the var in info here as well? (when no check_var present)

No. The first test is to see if the passed in var is equal to the current var in info. Note info->var is always set before we call gen_set_var. The next set is check if xxfb_check_var is there. If this function is lacking then we know the hardware supports a static mode. Then it just returns the defualt var which is set before we call gen_set_var.

Quoted 1 line

BTW is gen_set_var going to stay in the new API or go away ?

It is to stay. It will be intergrated into fbmem.c once we are done.

fbgen.c Wed Aug 28 09:57:32 2002 line 41

Quoted 10 lines
fbgen.c Wed Aug 28 09:57:32 2002 renamed from fbgen.c.orig Wed Aug 28 09:49:45 2002 +1 -1
@@ -36,7 +36,7 @@
 
        if (con < 0 || (memcmp(&info->var, var, sizeof(struct fb_var_screeninfo)))) {
                if (!info->fbops->fb_check_var) {
-                       *var = info->var;
+                       info->var = *var;
                        return 0;
                }

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  [[email protected]] 	                ____/|
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: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim