From 0ccd8732acbfb1ce09849b2b094eefc005755e2c Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Sat, 17 Oct 2009 21:31:55 +0000 Subject: [PATCH] preventing DDC/EDID use if monitor reports native mode below VGA mode. This prevents the driver exporting a modelist with zero modes, resulting in black screen. Seen this at BG on Mark's old Neovo screen. Seems a DDC firmware bug inside the screen. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33628 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/accelerants/nvidia/engine/nv_i2c.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/add-ons/accelerants/nvidia/engine/nv_i2c.c b/src/add-ons/accelerants/nvidia/engine/nv_i2c.c index 362f7ea612..0393230f87 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_i2c.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_i2c.c @@ -2,7 +2,7 @@ * i2c interface. * Bus should be run at max. 100kHz: see original Philips I2C specification * - * Rudolf Cornelissen 12/2002-8/2009 + * Rudolf Cornelissen 12/2002-10/2009 */ #define MODULE_BIT 0x00004000 @@ -642,6 +642,12 @@ i2c_ExtractSpecsEDID(edid1_info* edid, edid_specs* specs) /* check if we actually got a modeline */ if (!specs->timing.h_display || !specs->timing.v_display) return B_ERROR; + /* check if the mode is at least VGA. If it's not, ignore specs */ + if ((specs->timing.h_display < 640) || (specs->timing.v_display < 480)) { + LOG(4,("I2C: specsEDID: screen reports lower than VGA native mode, ignoring specs!\n")); + return B_ERROR; + } + /* determine screen aspect ratio */ specs->aspect = (specs->timing.h_display / ((float)specs->timing.v_display));