(Alex, this is just an FYI in case you're interested :)

Okay, I think I'm there.

There appears to be a fairly serious bug in the function
gfx_is_display_mode_supported() in
xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/disp_gu1.c from
yesterday's CVS.

Not being familiar with XFree86 internals, I'm not sure if this is
/actually/ a bug in the function itself, or in the overlying code, or in
the display modes table in
xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/gfx_disp.c. I just fixed
the symptoms.

The problem is that the aforementioned table contains actual pixel
scanline heights (e.g. 320 x 240 has a vertical size of 240), whereas
the input scanline height supplied to the function will be 480 (IOW beam
scanlines, not pixel scanlines). This means that
gfx_is_display_mode_supported will never find any mode that's supposed
to be scandoubled; hence, these modes are currently totally broken on
Geode.

I modified the above function to check if the current mode's flags
indicate doublescanning, and if so it generates a bogus doubled
scanheight for comparison purposes.

The following three patches fix this bug and alter a couple of minima,
thereby enabling lo-res video modes on the Geode platform:

Note! Xv support is still at least partly broken in these modes, I
believe.


--- Begin patch for disp_gu1.c

130a131,135
> /*
>  * Bugfix to gfx_is_mode_supported to fix problems with doublescan
modes
>  * Lewin A.R.W. Edwards <[EMAIL PROTECTED]>
> */
> 
839d843
< 
840a845,850
>       int tmp_yres;
> 
>       tmp_yres = yres;
>     if (DisplayParams[mode].flags & GFX_MODE_LINE_DOUBLE)
>           tmp_yres = tmp_yres / 2;
> 
842,843c852,853
<         (DisplayParams[mode].vactive == (unsigned short)yres) &&
<         (DisplayParams[mode].flags & hz_flag) &&
---
>         (DisplayParams[mode].vactive == (unsigned short)tmp_yres) &&
>         (DisplayParams[mode].flags & hz_flag)  &&
850a861
> 
878a890
> 


--- Begin patch for nsc_gx1_driver.c

150a151,155
> /*
>  * Minor patches to allow support of low-res video modes
>  * Lewin A.R.W. Edwards <[EMAIL PROTECTED]>
> */
> 
475c480
<        { NULL, 25175, 135000, 0, FALSE, TRUE, 1, 1, 0 };
---
>        { NULL, 10000, 135000, 0, FALSE, TRUE, 1, 1, 0 };
937c942
<    minHeight = 480;
---
>    minHeight = 200;
1850c1855,1856
<    if (MemIndex == -1)                        /* no match */
---
> 
>    if (MemIndex == -1)                        /* no match */ 
2363a2370
> 


--- Begin patch for nsc_gx2_driver.c

145a146,150
> /*
>  * Minor patches to allow support of low-res video modes
>  * Lewin A.R.W. Edwards <[EMAIL PROTECTED]>
> */
> 
474c479
<        { NULL, 25175, 229500, 0, FALSE, TRUE, 1, 1, 0 };
---
>        { NULL, 10000, 229500, 0, FALSE, TRUE, 1, 1, 0 };
911c916
<    minHeight = 480;
---
>    minHeight = 200;


-- 
-- Lewin A.R.W. Edwards
Work:     http://www.digi-frame.com/
Personal: http://www.larwe.com/

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to