As sbusfb.c sbusfb_set_var() currently returns EINVAL
when called, I'd like to submit the following patch so
that the method will return 0 if no changes are
actually requested.
This would be an interim change until the time when
somebody who knows far better than I could implement
the method.
In this manner, the method can be safely called by
(apps such as) XF86_FBDev which does not actually
attempt to make changes. Under the current scheme,
the EINVAL causes XF86_FBDev to error-out.
Would somebody be willing to check this in?
E
--- sbusfb.c.orig Mon Jun 14 19:50:46 1999
+++ sbusfb.c Mon Jun 14 19:50:18 1999
@@ -366,7 +366,27 @@
static int sbusfb_set_var(struct fb_var_screeninfo *var, int con,
struct fb_info *info)
{
- return -EINVAL;
+ 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;
+
}
/*
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of the message to [EMAIL PROTECTED]