diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/bios/gpio.h b/drivers/gpu/drm/nouveau/core/include/subdev/bios/gpio.h index e9789cf..14154bf 100644 --- a/drivers/gpu/drm/nouveau/core/include/subdev/bios/gpio.h +++ b/drivers/gpu/drm/nouveau/core/include/subdev/bios/gpio.h @@ -5,6 +5,7 @@ struct nouveau_bios; enum dcb_gpio_func_name { DCB_GPIO_PANEL_POWER = 0x01, + DCB_GPIO_PANEL_BACKLIGHT_LEVEL = 0x21, DCB_GPIO_TVDAC0 = 0x0c, DCB_GPIO_TVDAC1 = 0x2d, DCB_GPIO_PWM_FAN = 0x09, diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 2772a43..e679edd 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -234,6 +234,12 @@ nouveau_display_init(struct drm_device *dev) msleep(300); } + /* XXX: HP 8530w / Lenovo W510 hack */ + if (gpio && gpio->get(gpio, 0, DCB_GPIO_PANEL_BACKLIGHT_LEVEL, 0xff) == 0) { + gpio->set(gpio, 0, DCB_GPIO_PANEL_BACKLIGHT_LEVEL, 0xff, 1); + msleep(300); + } + /* enable polling for external displays */ drm_kms_helper_poll_enable(dev);