From 5217ee56fe3ba819e8f1403d1c46b4a7595ea013 Mon Sep 17 00:00:00 2001 From: Stuart Bennett Date: Sat, 1 Mar 2008 14:03:09 +0000 Subject: [PATCH] Unrolled Apple nv34 lvds script. Numbered comment blocks are a suggested order to re-enable. --- src/nv_bios.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 46 insertions(+), 1 deletions(-) diff --git a/src/nv_bios.c b/src/nv_bios.c index 5541d00..dd60243 100644 --- a/src/nv_bios.c +++ b/src/nv_bios.c @@ -2824,7 +2824,52 @@ static void call_lvds_manufacturer_script(ScrnInfoPtr pScrn, int head, int dcb_e xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Calling LVDS script %d:\n", script); nv_idx_port_wr(pScrn, CRTC_INDEX_COLOR, NV_VGA_CRTCX_OWNER, head ? NV_VGA_CRTCX_OWNER_HEADB : NV_VGA_CRTCX_OWNER_HEADA); - parse_init_table(pScrn, bios, scriptofs, &iexec); + if (script == LVDS_RESET) { + /* 1 + nv32_wr(pScrn, 0x6828b4, 0x13); + nv32_rd(pScrn, 0x6828b0); + nv32_wr(pScrn, 0x6828b0, 0); + + nv32_wr(pScrn, 0x6828b4, 0x72); + nv32_rd(pScrn, 0x6828b0); + nv32_wr(pScrn, 0x6828b0, 1); + + nv32_wr(pScrn, 0x6828b4, 0x32); + nv32_rd(pScrn, 0x6828b0); + nv32_wr(pScrn, 0x6828b0, 2); + + nv32_wr(pScrn, 0x6828b4, 0x81); + nv32_rd(pScrn, 0x6828b0); + nv32_wr(pScrn, 0x6828b0, 4); + + nv32_wr(pScrn, 0x6828b4, 0x6e); + nv32_rd(pScrn, 0x6828b0); + nv32_wr(pScrn, 0x6828b0, 5); + + nv32_wr(pScrn, 0x6828b4, 0x80); + nv32_rd(pScrn, 0x6828b0); + nv32_wr(pScrn, 0x6828b0, 0x3a); + */ + + /* 3 + nv32_rd(pScrn, 0x1588); + nv32_wr(pScrn, 0x1588, 0x2025); + */ + + /* 2 + nv32_wr(pScrn, 0x6828b4, 0x80); + nv32_rd(pScrn, 0x6828b0); + nv32_wr(pScrn, 0x6828b0, 0x2e); + + nv32_wr(pScrn, 0x6828b4, 0x21); + nv32_rd(pScrn, 0x6828b0); + nv32_wr(pScrn, 0x6828b0, 0x2f); + */ + + /* 4 might be worth trying increasing this? */ + usleep(0x3e80); + } else + parse_init_table(pScrn, bios, scriptofs, &iexec); if (script == LVDS_PANEL_OFF) usleep(off_on_delay * 1000); -- 1.5.3.2