From 139d62e968a550b7110787127ee772968d56153c Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Sat, 11 Sep 2004 11:12:11 +0000 Subject: [PATCH] updated modeline tuning for panels: fixes overlay distortions on native mode on NV34Go (at least). Please report if this introduces trouble on your panel(s)! git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8914 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../accelerants/nvidia/engine/nv_crtc.c | 18 +++++++++--------- .../accelerants/nvidia/engine/nv_crtc2.c | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/add-ons/accelerants/nvidia/engine/nv_crtc.c b/src/add-ons/accelerants/nvidia/engine/nv_crtc.c index a591777e98..0cd2eeb986 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_crtc.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_crtc.c @@ -1,6 +1,6 @@ /* CTRC functionality */ /* Author: - Rudolf Cornelissen 11/2002-7/2004 + Rudolf Cornelissen 11/2002-9/2004 */ #define MODULE_BIT 0x00040000 @@ -136,16 +136,16 @@ status_t nv_crtc_set_timing(display_mode target) (((uint16)((si->ps.p1_timing.h_total / ((float)si->ps.p1_timing.h_display)) * target.timing.h_display)) & 0xfff8) - 8; - //fixme: can be removed if community confirms no problems with modified setup! - //(confirmed this 'problem' on NV34 and NV11 now.) - /* NV11 timing has tighter constraints than later cards */ -// if ((si->ps.card_type == NV11) && -// (target.timing.h_display == si->ps.p1_timing.h_display)) - - /* in native mode the CRTC needs some extra time to keep synced correctly */ + /* in native mode the CRTC needs some extra time to keep synced correctly; + * OTOH the overlay unit distorts if we reserve too much time! */ if (target.timing.h_display == si->ps.p1_timing.h_display) { - target.timing.h_total -= 56; + /* NV11 timing has different constraints than later cards */ + if (si->ps.card_type == NV11) + target.timing.h_total -= 56; + else + /* confirmed NV34 with 1680x1050 panel */ + target.timing.h_total -= 32; } if (target.timing.h_sync_start == target.timing.h_display) diff --git a/src/add-ons/accelerants/nvidia/engine/nv_crtc2.c b/src/add-ons/accelerants/nvidia/engine/nv_crtc2.c index f5988af7fb..31264dfdb3 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_crtc2.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_crtc2.c @@ -1,6 +1,6 @@ /* second CTRC functionality for GeForce cards */ /* Author: - Rudolf Cornelissen 11/2002-7/2004 + Rudolf Cornelissen 11/2002-9/2004 */ #define MODULE_BIT 0x00020000 @@ -122,16 +122,16 @@ status_t nv_crtc2_set_timing(display_mode target) (((uint16)((si->ps.p2_timing.h_total / ((float)si->ps.p2_timing.h_display)) * target.timing.h_display)) & 0xfff8) - 8; - //fixme: can be removed if community confirms no problems with modified setup! - //(confirmed this 'problem' on NV34 and NV11 now.) - /* NV11 timing has tighter constraints than later cards */ -// if ((si->ps.card_type == NV11) && -// (target.timing.h_display == si->ps.p2_timing.h_display)) - - /* in native mode the CRTC needs some extra time to keep synced correctly */ + /* in native mode the CRTC needs some extra time to keep synced correctly; + * OTOH the overlay unit distorts if we reserve too much time! */ if (target.timing.h_display == si->ps.p2_timing.h_display) { - target.timing.h_total -= 56; + /* NV11 timing has different constraints than later cards */ + if (si->ps.card_type == NV11) + target.timing.h_total -= 56; + else + /* confirmed NV34 with 1680x1050 panel */ + target.timing.h_total -= 32; } if (target.timing.h_sync_start == target.timing.h_display)