|
From: James S. <jsi...@in...> - 2003-01-25 19:14:30
|
> I've been digging around in the rivafb module to find out why some > modes converted from XFree86 4.2 don't work on some display devices. > Here's a funny part of the riva_load_video_mode function (Linux > 2.4.21-pre2): > > hStart = (hDisplaySize + video_mode->right_margin) / 8 + 2; > hEnd = (hDisplaySize + video_mode->right_margin + > video_mode->hsync_len) / 8 - 1; > > Please notice how "hsync_len" does not actually represent the length > of the sync. Rather, it's compensated with 24 pixels. The corresponding > code in the XFree86 4.2 (nv_dac.c) contains no such compensation: > > int horizStart = (mode->CrtcHSyncStart/8) - 1; > int horizEnd = (mode->CrtcHSyncEnd/8) - 1; > > The difference seems to be almost insignificant for modern multisync > screens, but devices such as TV:s get confused by the current version. > Is there a reason for the difference in calculations? > > The attached patch corrects the calculations in accordance with XFree86 > and works better with the modelines I've tested. > > Please give it a try. Thanks, Works fine. I applied it to the 2.5.X tree. |