> But I am a member, and I believe my mail did get through to the
> ggi list as well. 

It should have gotten threw. Will forward it just in case.
 
> > > The first problem was that cgsix doesn't support changing resolution;
> > > it produced an error, because every ggi-demo seemed to set some
> > > resolution. The cgsix is set to 1152x900x8.
> > That's a problem. So do not run demos ;-) If your display supports
> > only limited functionality, you'll get only limited functionality
> > from libraries.
> 
> Yes, but maybe the library shouldn't exit completely. The cgsix driver
> gives error no matter what resolution you try to set with the ioctl,
> so even if you set 1152x900x8, it will fail. 

Thats strange. cgsix uses the sbusfb set_var function to set the video
mode. From what I can tell it just looks to see if the mode purposed is
the same as the current mode. The ioctl should only give error if the mode 
is different than the current mode. 

As for the problem of setting the video mode in libGGI I'm going threw the
code now. LibGGI doesn't use the FB_ACTIVATE_TEST. It tries to test it in
other ways. I will submit a patch to change this. 

> cgsix. I got the values from the XSun X server. I can't try fbtv right
> now.
> 
> Maybe this is a bug in the sparc kernel?

Sounds like it. Another problem is 

static int sbusfb_set_var(struct fb_var_screeninfo *var, int con,
                          struct fb_info *info)

       struct display *display;
       int activate = var->activate;

       if(con >= 0)
               display = &fb_display[con];
       else
               display = info->disp;

       /* simple check for equality until fully implemented -E */
       if ((activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
               if (display->var.xres != var->xres ||
                       display->var.yres != var->yres ||
                       display->var.xres_virtual != var->xres_virtual ||
                       display->var.yres_virtual != var->yres_virtual ||
                       display->var.bits_per_pixel != var->bits_per_pixel
||
                       display->var.accel_flags != var->accel_flags) {
                       return -EINVAL;
               }
       }
       return 0;
}

This code doesn't test the mode if you pass in a var with FB_ACTIVATE_TEST.
It checks only if you try to set the mode. It should always test it.

For set_var this function should first check to see if the request mode is
valid. Return the var back to let them know its okay. Else return a
error. If the user want to actually set the mode then test it then set the
mode. 

static int sbusfb_set_var(struct fb_var_screeninfo *var, int con,
                          struct fb_info *info) {

  Check mode. Return with error if the case.

  if ((activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {

   Actually set mode.

  }
  return var;

Reply via email to