diff options
author | Matthew Garrett <mjg59@srcf.ucam.org> | 2009-04-15 16:46:36 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-04-17 16:31:06 -0400 |
commit | d770e3cfe5a274a343d896b2cc1646af85646fbc (patch) | |
tree | 0d4eb5a9ba01f25b8bc9c4500cf2e2a09871e869 /drivers/gpu/drm/i915/i915_opregion.c | |
parent | 5b0bdd6f7284ed39ee553f8a8c4f0d372c87133a (diff) |
drm/i915: Register ACPI video even when not modesetting
The ACPI video driver defers registration to the i915 driver if the
system supports opregion-mediated backlight control. This registration
was only being performed in the KMS case. Ensure it's done even if we
don't have modesetting enabled.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_opregion.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_opregion.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c index 69427722d20e..8dc1fd3115c2 100644 --- a/drivers/gpu/drm/i915/i915_opregion.c +++ b/drivers/gpu/drm/i915/i915_opregion.c | |||
@@ -370,11 +370,8 @@ int intel_opregion_init(struct drm_device *dev, int resume) | |||
370 | if (mboxes & MBOX_ACPI) { | 370 | if (mboxes & MBOX_ACPI) { |
371 | DRM_DEBUG("Public ACPI methods supported\n"); | 371 | DRM_DEBUG("Public ACPI methods supported\n"); |
372 | opregion->acpi = base + OPREGION_ACPI_OFFSET; | 372 | opregion->acpi = base + OPREGION_ACPI_OFFSET; |
373 | if (drm_core_check_feature(dev, DRIVER_MODESET)) { | 373 | if (drm_core_check_feature(dev, DRIVER_MODESET)) |
374 | intel_didl_outputs(dev); | 374 | intel_didl_outputs(dev); |
375 | if (!resume) | ||
376 | acpi_video_register(); | ||
377 | } | ||
378 | } else { | 375 | } else { |
379 | DRM_DEBUG("Public ACPI methods not supported\n"); | 376 | DRM_DEBUG("Public ACPI methods not supported\n"); |
380 | err = -ENOTSUPP; | 377 | err = -ENOTSUPP; |
@@ -391,6 +388,10 @@ int intel_opregion_init(struct drm_device *dev, int resume) | |||
391 | opregion->asle = base + OPREGION_ASLE_OFFSET; | 388 | opregion->asle = base + OPREGION_ASLE_OFFSET; |
392 | } | 389 | } |
393 | 390 | ||
391 | if (!resume) | ||
392 | acpi_video_register(); | ||
393 | |||
394 | |||
394 | /* Notify BIOS we are ready to handle ACPI video ext notifs. | 395 | /* Notify BIOS we are ready to handle ACPI video ext notifs. |
395 | * Right now, all the events are handled by the ACPI video module. | 396 | * Right now, all the events are handled by the ACPI video module. |
396 | * We don't actually need to do anything with them. */ | 397 | * We don't actually need to do anything with them. */ |