From e5797660d63a71d52398b6d388e02819aa6f07a6 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 21 Apr 2010 11:05:23 +1000 Subject: intel-redetect-on-acpi.patch --- src/i830_driver.c | 4 ++-- src/i830_quirks.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/i830_driver.c b/src/i830_driver.c index 6378e898..0a688480 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -3412,8 +3412,8 @@ I830PMEvent(int scrnIndex, pmEvent event, Bool undo) return TRUE; ErrorF("I830PMEvent: Capability change\n"); - - I830CheckDevicesTimer(NULL, 0, pScrn); + xf86InitialConfiguration(pScrn, 0); + xf86SetDesiredModes(pScrn); SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset); break; default: diff --git a/src/i830_quirks.c b/src/i830_quirks.c index e957845e..1c79d132 100644 --- a/src/i830_quirks.c +++ b/src/i830_quirks.c @@ -28,6 +28,7 @@ #include "config.h" #endif +#include #include "i830.h" #define SUBSYS_ANY (~0) @@ -255,12 +256,29 @@ static i830_quirk i830_quirk_list[] = { { 0, 0, 0, NULL }, }; +static void i830_enable_ibm_hotkey(ScrnInfoPtr scrn) +{ + int fd; + const char *str = "enable,0x084c\n"; + + fd = open("/proc/acpi/ibm/hotkey", O_RDWR); + if (fd < 0) + return; + + write(fd, str, strlen(str)); + + close(fd); +} + void i830_fixup_devices(ScrnInfoPtr scrn) { I830Ptr pI830 = I830PTR(scrn); i830_quirk_ptr p = i830_quirk_list; int i; + if (SUBVENDOR_ID(pI830->PciInfo) == 0x17aa) + i830_enable_ibm_hotkey(scrn); + i830_dmi_scan(); if (0) -- cgit v1.2.3