diff --git a/driver/xf86-video-intel/configure.ac b/driver/xf86-video-intel/configure.ac index 809e84d8b..3fb8a0bad 100644 --- a/driver/xf86-video-intel/configure.ac +++ b/driver/xf86-video-intel/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ(2.57) AC_INIT([xf86-video-intel], - 2.4.2, + 2.4.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xf86-video-intel) diff --git a/driver/xf86-video-intel/src/i810_reg.h b/driver/xf86-video-intel/src/i810_reg.h index 869095437..af8c6a3d6 100644 --- a/driver/xf86-video-intel/src/i810_reg.h +++ b/driver/xf86-video-intel/src/i810_reg.h @@ -2815,4 +2815,7 @@ typedef enum { #define PEG_BAND_GAP_DATA 0x14d68 +#define MCHBAR_RENDER_STANDBY 0x111B8 +#define RENDER_STANDBY_ENABLE (1 << 30) + #endif /* _I810_REG_H */ diff --git a/driver/xf86-video-intel/src/i830.h b/driver/xf86-video-intel/src/i830.h index 6a5de6bc5..b2e339a03 100644 --- a/driver/xf86-video-intel/src/i830.h +++ b/driver/xf86-video-intel/src/i830.h @@ -887,6 +887,13 @@ static inline int i830_fb_compression_supported(I830Ptr pI830) */ if (!pI830->tiling || (IS_I965G(pI830) && !pI830->useEXA)) return FALSE; + /* We have not gotten FBC to work consistently on 965GM. Our best + * working theory right now is that FBC simply isn't reliable on + * that device. See this bug report for more details: + * https://bugs.freedesktop.org/show_bug.cgi?id=16257 + */ + if (IS_I965GM(pI830)) + return FALSE; return TRUE; } diff --git a/driver/xf86-video-intel/src/i830_crt.c b/driver/xf86-video-intel/src/i830_crt.c index 2a99f9c77..8274c0cc3 100644 --- a/driver/xf86-video-intel/src/i830_crt.c +++ b/driver/xf86-video-intel/src/i830_crt.c @@ -352,10 +352,9 @@ i830_crt_detect(xf86OutputPtr output) xf86OutputStatus status; Bool connected; - crtc = i830GetLoadDetectPipe (output, NULL, &dpms_mode); - if (!crtc) - return XF86OutputStatusUnknown; - + /* + * Try hotplug detection where supported + */ if (IS_I945G(pI830) || IS_I945GM(pI830) || IS_I965G(pI830) || IS_G33CLASS(pI830)) { if (i830_crt_detect_hotplug(output)) @@ -363,12 +362,19 @@ i830_crt_detect(xf86OutputPtr output) else status = XF86OutputStatusDisconnected; - goto out; + goto done; } + /* + * DDC is next best, no flicker + */ + crtc = i830GetLoadDetectPipe (output, NULL, &dpms_mode); + if (!crtc) + return XF86OutputStatusUnknown; + if (i830_crt_detect_ddc(output)) { status = XF86OutputStatusConnected; - goto out; + goto out_release_pipe; } /* Use the load-detect method if we have no other way of telling. */ @@ -378,9 +384,10 @@ i830_crt_detect(xf86OutputPtr output) else status = XF86OutputStatusDisconnected; -out: +out_release_pipe: i830ReleaseLoadDetectPipe (output, dpms_mode); +done: return status; } diff --git a/driver/xf86-video-intel/src/i830_driver.c b/driver/xf86-video-intel/src/i830_driver.c index 3f9d253bf..0a747c1d8 100644 --- a/driver/xf86-video-intel/src/i830_driver.c +++ b/driver/xf86-video-intel/src/i830_driver.c @@ -334,7 +334,7 @@ static OptionInfoRec I830Options[] = { {OPTION_CHECKDEVICES, "CheckDevices",OPTV_BOOLEAN, {0}, FALSE}, {OPTION_MODEDEBUG, "ModeDebug", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_LVDS24BITMODE, "LVDS24Bit", OPTV_BOOLEAN, {0}, FALSE}, - {OPTION_FBC, "FramebufferCompression", OPTV_BOOLEAN, {0}, FALSE}, + {OPTION_FBC, "FramebufferCompression", OPTV_BOOLEAN, {0}, TRUE}, {OPTION_TILING, "Tiling", OPTV_BOOLEAN, {0}, TRUE}, #ifdef XF86DRI_MM {OPTION_INTELTEXPOOL,"Legacy3D", OPTV_BOOLEAN, {0}, FALSE}, @@ -518,8 +518,8 @@ I830DetectMemory(ScrnInfoPtr pScrn) range = gtt_size + 4; /* new 4 series hardware has seperate GTT stolen with GFX stolen */ - if (IS_G4X(pI830)) - range = 0; + if (IS_G4X(pI830) || IS_GM45(pI830)) + range = 4; if (IS_I85X(pI830) || IS_I865G(pI830) || IS_I9XX(pI830)) { switch (gmch_ctrl & I855_GMCH_GMS_MASK) { @@ -2718,6 +2718,23 @@ i830_memory_init(ScrnInfoPtr pScrn) return FALSE; } +static void +i830_disable_render_standby(ScrnInfoPtr pScrn) +{ + I830Ptr pI830 = I830PTR(pScrn); + uint32_t render_standby; + + /* Render Standby might cause hang issue, try always disable it.*/ + if (IS_I965GM(pI830) || IS_GM45(pI830)) { + render_standby = INREG(MCHBAR_RENDER_STANDBY); + if (render_standby & RENDER_STANDBY_ENABLE) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Disable render standby.\n"); + OUTREG(MCHBAR_RENDER_STANDBY, + (render_standby & (~RENDER_STANDBY_ENABLE))); + } + } +} + static Bool I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) { @@ -2854,15 +2871,11 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pI830->tiling = FALSE; } -#ifdef notyet /* Enable FB compression if possible */ if (i830_fb_compression_supported(pI830)) pI830->fb_compression = TRUE; else pI830->fb_compression = FALSE; -#else - pI830->fb_compression = FALSE; -#endif /* Again, allow user override if set */ if (xf86IsOptionSet(pI830->Options, OPTION_FBC)) { @@ -3057,6 +3070,8 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) if (!vgaHWMapMem(pScrn)) return FALSE; + i830_disable_render_standby(pScrn); + DPRINTF(PFX, "assert( if(!I830EnterVT(scrnIndex, 0)) )\n"); if (!pI830->useEXA) { diff --git a/driver/xf86-video-intel/src/i830_lvds.c b/driver/xf86-video-intel/src/i830_lvds.c index 96e9f003f..a8687b63d 100644 --- a/driver/xf86-video-intel/src/i830_lvds.c +++ b/driver/xf86-video-intel/src/i830_lvds.c @@ -83,6 +83,8 @@ static char *backlight_interfaces[] = { "acpi_video1", "acpi_video0", "fujitsu-laptop", + "asus-laptop", + "eeepc", NULL, }; diff --git a/driver/xf86-video-intel/src/i830_quirks.c b/driver/xf86-video-intel/src/i830_quirks.c index a3ed04404..fe6cdd8d4 100644 --- a/driver/xf86-video-intel/src/i830_quirks.c +++ b/driver/xf86-video-intel/src/i830_quirks.c @@ -243,6 +243,8 @@ static i830_quirk i830_quirk_list[] = { { PCI_CHIP_I965_GM, 0x1028, 0x0286, quirk_ignore_tv }, /* Dell Vostro A840 (LP: #235155) */ { PCI_CHIP_I965_GM, 0x1028, 0x0298, quirk_ignore_tv }, + /* Dell Studio Hybrid */ + { PCI_CHIP_I965_GM, 0x1028, 0x0279, quirk_ignore_lvds }, /* Lenovo Napa TV (use dmi)*/ { PCI_CHIP_I945_GM, 0x17aa, SUBSYS_ANY, quirk_lenovo_tv_dmi }, @@ -317,6 +319,9 @@ static i830_quirk i830_quirk_list[] = { { PCI_CHIP_I855_GM, SUBSYS_ANY, SUBSYS_ANY, quirk_pipea_force }, { PCI_CHIP_845_G, SUBSYS_ANY, SUBSYS_ANY, quirk_pipea_force }, + /* Asus Eee Box has no LVDS */ + { PCI_CHIP_I945_GME, 0x1043, 0x1252, quirk_ignore_lvds }, + { 0, 0, 0, NULL }, };