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>

authored by Matthew Garrett and committed by Eric Anholt d770e3cf 5b0bdd6f

+5 -4
+5 -4
drivers/gpu/drm/i915/i915_opregion.c
··· 370 if (mboxes & MBOX_ACPI) { 371 DRM_DEBUG("Public ACPI methods supported\n"); 372 opregion->acpi = base + OPREGION_ACPI_OFFSET; 373 - if (drm_core_check_feature(dev, DRIVER_MODESET)) { 374 intel_didl_outputs(dev); 375 - if (!resume) 376 - acpi_video_register(); 377 - } 378 } else { 379 DRM_DEBUG("Public ACPI methods not supported\n"); 380 err = -ENOTSUPP; ··· 387 DRM_DEBUG("ASLE supported\n"); 388 opregion->asle = base + OPREGION_ASLE_OFFSET; 389 } 390 391 /* Notify BIOS we are ready to handle ACPI video ext notifs. 392 * Right now, all the events are handled by the ACPI video module.
··· 370 if (mboxes & MBOX_ACPI) { 371 DRM_DEBUG("Public ACPI methods supported\n"); 372 opregion->acpi = base + OPREGION_ACPI_OFFSET; 373 + if (drm_core_check_feature(dev, DRIVER_MODESET)) 374 intel_didl_outputs(dev); 375 } else { 376 DRM_DEBUG("Public ACPI methods not supported\n"); 377 err = -ENOTSUPP; ··· 390 DRM_DEBUG("ASLE supported\n"); 391 opregion->asle = base + OPREGION_ASLE_OFFSET; 392 } 393 + 394 + if (!resume) 395 + acpi_video_register(); 396 + 397 398 /* Notify BIOS we are ready to handle ACPI video ext notifs. 399 * Right now, all the events are handled by the ACPI video module.