From 6cf8a89e4b092a9fe3c953a3f924e46849bfe3da Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Sat, 19 Nov 2005 13:48:36 +0000 Subject: [PATCH] added preliminary LVDS/TMDS distinction code (just logging for now). BTW New acc is reported OK on all previous supported cards sofar, and 7800 is reported very fast :). Also some previous (sometimes) malfunctioning 6800's are now working better. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15030 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../accelerants/nvidia/engine/nv_info.c | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/add-ons/accelerants/nvidia/engine/nv_info.c b/src/add-ons/accelerants/nvidia/engine/nv_info.c index 834ad1289a..4e8d6a5f18 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_info.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_info.c @@ -2465,6 +2465,34 @@ static void detect_panels() LOG(2,("DAC2: FUNCSEL: $%08x\n", NV_REG32(NV32_2FUNCSEL))); LOG(2,("DAC2: PANEL_PWR: $%08x\n", NV_REG32(NV32_2PANEL_PWR))); } + + /* determine flatpanel(s) type(s) */ + //fixme?: linux checks only on dualhead cards, and only on DAC1... +//fixme: testing... + if (1)//si->ps.tmds1_active) + { + /* Read a indexed register to see if it indicates LVDS or TMDS panel presence. + * b0-7 = adress, b16 = 1 = write_enable */ + DACW(FP_TMDS_CTRL, ((1 << 16) | 0x04)); + /* (b0-7 = data) */ + if (DACR(FP_TMDS_DATA) & 0x01) + LOG(2,("INFO: Flatpanel on head 1 is LVDS type\n")); + else + LOG(2,("INFO: Flatpanel on head 1 is TMDS type\n")); + } +//fixme: testing... + if (1)//si->ps.tmds2_active) + { + /* Read a indexed register to see if it indicates LVDS or TMDS panel presence. + * b0-7 = adress, b16 = 1 = write_enable */ + DAC2W(FP_TMDS_CTRL, ((1 << 16) | 0x04)); + /* (b0-7 = data) */ + if (DAC2R(FP_TMDS_DATA) & 0x01) + LOG(2,("INFO: Flatpanel on head 2 is LVDS type\n")); + else + LOG(2,("INFO: Flatpanel on head 2 is TMDS type\n")); + } + LOG(2,("INFO: End flatpanel registers dump.\n")); }