All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: intel-gfx@lists.freedesktop.org
Cc: acpi-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] i915: Register ACPI video even when not modesetting
Date: Wed, 15 Apr 2009 21:46:36 +0100	[thread overview]
Message-ID: <20090415204636.GA32365@srcf.ucam.org> (raw)

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>

diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c
index 6942772..8dc1fd3 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)
 	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. */

-- 
Matthew Garrett | mjg59@srcf.ucam.org

             reply	other threads:[~2009-04-15 20:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-15 20:46 Matthew Garrett [this message]
2009-04-16  7:44 ` [Intel-gfx] [PATCH] i915: Register ACPI video even when not modesetting Tino Keitel
2009-04-17  0:44   ` Matthew Garrett
2009-04-24  4:43 ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090415204636.GA32365@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=acpi-devel@vger.kernel.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.