Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d770e3cf authored by Matthew Garrett's avatar Matthew Garrett Committed by Eric Anholt
Browse files

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: default avatarMatthew Garrett <mjg@redhat.com>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 5b0bdd6f
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -370,11 +370,8 @@ int intel_opregion_init(struct drm_device *dev, int resume)
	if (mboxes & MBOX_ACPI) {
		DRM_DEBUG("Public ACPI methods supported\n");
		opregion->acpi = base + OPREGION_ACPI_OFFSET;
		if (drm_core_check_feature(dev, DRIVER_MODESET)) {
		if (drm_core_check_feature(dev, DRIVER_MODESET))
			intel_didl_outputs(dev);
			if (!resume)
				acpi_video_register();
		}
	} else {
		DRM_DEBUG("Public ACPI methods not supported\n");
		err = -ENOTSUPP;
@@ -391,6 +388,10 @@ int intel_opregion_init(struct drm_device *dev, int resume)
		opregion->asle = base + OPREGION_ASLE_OFFSET;
	}

	if (!resume)
		acpi_video_register();


	/* Notify BIOS we are ready to handle ACPI video ext notifs.
	 * Right now, all the events are handled by the ACPI video module.
	 * We don't actually need to do anything with them. */