diff options
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_display.c | 32 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 2 |
2 files changed, 17 insertions, 17 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 37839d6afabc..d85b56c7074d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c | |||
| @@ -349,21 +349,10 @@ static struct nouveau_drm_prop_enum_list dither_depth[] = { | |||
| 349 | } \ | 349 | } \ |
| 350 | } while(0) | 350 | } while(0) |
| 351 | 351 | ||
| 352 | #ifdef CONFIG_ACPI | ||
| 353 | |||
| 354 | /* | ||
| 355 | * Hans de Goede: This define belongs in acpi/video.h, I've submitted a patch | ||
| 356 | * to the acpi subsys to move it there from drivers/acpi/acpi_video.c . | ||
| 357 | * This should be dropped once that is merged. | ||
| 358 | */ | ||
| 359 | #ifndef ACPI_VIDEO_NOTIFY_PROBE | ||
| 360 | #define ACPI_VIDEO_NOTIFY_PROBE 0x81 | ||
| 361 | #endif | ||
| 362 | |||
| 363 | static void | 352 | static void |
| 364 | nouveau_display_acpi_work(struct work_struct *work) | 353 | nouveau_display_hpd_work(struct work_struct *work) |
| 365 | { | 354 | { |
| 366 | struct nouveau_drm *drm = container_of(work, typeof(*drm), acpi_work); | 355 | struct nouveau_drm *drm = container_of(work, typeof(*drm), hpd_work); |
| 367 | 356 | ||
| 368 | pm_runtime_get_sync(drm->dev->dev); | 357 | pm_runtime_get_sync(drm->dev->dev); |
| 369 | 358 | ||
| @@ -373,6 +362,17 @@ nouveau_display_acpi_work(struct work_struct *work) | |||
| 373 | pm_runtime_put_sync(drm->dev->dev); | 362 | pm_runtime_put_sync(drm->dev->dev); |
| 374 | } | 363 | } |
| 375 | 364 | ||
| 365 | #ifdef CONFIG_ACPI | ||
| 366 | |||
| 367 | /* | ||
| 368 | * Hans de Goede: This define belongs in acpi/video.h, I've submitted a patch | ||
| 369 | * to the acpi subsys to move it there from drivers/acpi/acpi_video.c . | ||
| 370 | * This should be dropped once that is merged. | ||
| 371 | */ | ||
| 372 | #ifndef ACPI_VIDEO_NOTIFY_PROBE | ||
| 373 | #define ACPI_VIDEO_NOTIFY_PROBE 0x81 | ||
| 374 | #endif | ||
| 375 | |||
| 376 | static int | 376 | static int |
| 377 | nouveau_display_acpi_ntfy(struct notifier_block *nb, unsigned long val, | 377 | nouveau_display_acpi_ntfy(struct notifier_block *nb, unsigned long val, |
| 378 | void *data) | 378 | void *data) |
| @@ -385,9 +385,9 @@ nouveau_display_acpi_ntfy(struct notifier_block *nb, unsigned long val, | |||
| 385 | /* | 385 | /* |
| 386 | * This may be the only indication we receive of a | 386 | * This may be the only indication we receive of a |
| 387 | * connector hotplug on a runtime suspended GPU, | 387 | * connector hotplug on a runtime suspended GPU, |
| 388 | * schedule acpi_work to check. | 388 | * schedule hpd_work to check. |
| 389 | */ | 389 | */ |
| 390 | schedule_work(&drm->acpi_work); | 390 | schedule_work(&drm->hpd_work); |
| 391 | 391 | ||
| 392 | /* acpi-video should not generate keypresses for this */ | 392 | /* acpi-video should not generate keypresses for this */ |
| 393 | return NOTIFY_BAD; | 393 | return NOTIFY_BAD; |
| @@ -582,8 +582,8 @@ nouveau_display_create(struct drm_device *dev) | |||
| 582 | } | 582 | } |
| 583 | 583 | ||
| 584 | nouveau_backlight_init(dev); | 584 | nouveau_backlight_init(dev); |
| 585 | INIT_WORK(&drm->hpd_work, nouveau_display_hpd_work); | ||
| 585 | #ifdef CONFIG_ACPI | 586 | #ifdef CONFIG_ACPI |
| 586 | INIT_WORK(&drm->acpi_work, nouveau_display_acpi_work); | ||
| 587 | drm->acpi_nb.notifier_call = nouveau_display_acpi_ntfy; | 587 | drm->acpi_nb.notifier_call = nouveau_display_acpi_ntfy; |
| 588 | register_acpi_notifier(&drm->acpi_nb); | 588 | register_acpi_notifier(&drm->acpi_nb); |
| 589 | #endif | 589 | #endif |
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index ae1fd641c96e..9730c0ef6c6a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
| @@ -163,9 +163,9 @@ struct nouveau_drm { | |||
| 163 | struct nvbios vbios; | 163 | struct nvbios vbios; |
| 164 | struct nouveau_display *display; | 164 | struct nouveau_display *display; |
| 165 | struct backlight_device *backlight; | 165 | struct backlight_device *backlight; |
| 166 | struct work_struct hpd_work; | ||
| 166 | #ifdef CONFIG_ACPI | 167 | #ifdef CONFIG_ACPI |
| 167 | struct notifier_block acpi_nb; | 168 | struct notifier_block acpi_nb; |
| 168 | struct work_struct acpi_work; | ||
| 169 | #endif | 169 | #endif |
| 170 | 170 | ||
| 171 | /* power management */ | 171 | /* power management */ |
