--- linux-2.4.24/drivers/video/aty/atyfb_base.c.pan 2004-02-11 13:12:47.000000000 +0200 +++ linux-2.4.24/drivers/video/aty/atyfb_base.c 2004-02-11 13:16:23.000000000 +0200 @@ -600,6 +600,18 @@ sync = var->sync; vmode = var->vmode; + /* In double scan mode, the vertical parameters need to be doubled. + But in interlaced mode, there is no need to half the vertical parameters. + Code has been tested in 1024x768, 43 Hz interlaced and 640x480, 60 Hz + double scan. + */ + if ((vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) { + ryres <<= 1; + upper <<= 1; + lower <<= 1; + vslen <<= 1; + } + /* convert (and round up) and validate */ xres = (xres+7) & ~7; xoffset = (xoffset+7) & ~7; @@ -623,7 +635,7 @@ if (vyres < yres+yoffset) vyres = yres+yoffset; - v_disp = yres-1; + v_disp = ryres-1; if (v_disp > 0x7ff) FAIL("v_disp too large"); v_sync_strt = v_disp+lower; @@ -636,18 +648,6 @@ if (v_total > 0x7ff) FAIL("v_total too large"); v_sync_pol = sync & FB_SYNC_VERT_HIGH_ACT ? 0 : 1; - /* In double scan mode, the vertical parameters need to be doubled. - But in interlaced mode, there is no need to half the vertical parameters. - Code has been tested in 1024x768, 43 Hz interlaced and 640x480, 60 Hz - double scan. - */ - if ((vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) { - ryres <<= 1; - v_total <<= 1; - v_disp <<= 1; - v_sync_strt <<= 1; - v_sync_wid <<= 1; - }; c_sync = sync & FB_SYNC_COMP_HIGH_ACT ? CRTC_CSYNC_EN : 0;