[Intel-gfx] [PATCH 3/3] drm/i915/opregion: put internal panels to the front of CADL
Jani Nikula
jani.nikula at intel.com
Wed Nov 16 11:29:58 UTC 2016
The attempts to update CADL based on the actual active connectors have
not been successful. That is the right thing to do ultimately, but there
must be something we're still missing.
In the mean time, change the dumb CADL initialization we currently have
to put internal panels in front of the CADL to ensure they're included
in the list. (There's a max of eight.) Hopefully this ensures the BIOS
does not block backlight hotkey events, thinking the internal panel is
off.
Cc: Peter Wu <peter at lekensteyn.nl>
Cc: Rainer Koenig <Rainer.Koenig at ts.fujitsu.com>
Cc: Jan-Marek Glogowski <glogow at fbihome.de>
Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Cc: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Cc: Paolo Stivanin <paolostivanin at fastmail.fm>
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
drivers/gpu/drm/i915/intel_opregion.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index 024ae9b393e7..cb58194973ae 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -753,8 +753,24 @@ static void intel_setup_cadls(struct drm_i915_private *dev_priv)
* not always correct as display outputs may exist, but not active. This
* initialization is necessary for some Clevo laptops that check this
* field before processing the brightness and display switching hotkeys.
+ * Put internal panels in front of the list to ensure they're not left
+ * out.
*/
for_each_intel_connector(&dev_priv->drm, connector) {
+ if ((connector->acpi_device_id & ACPI_DISPLAY_TYPE_MASK) !=
+ ACPI_DISPLAY_TYPE_INTERNAL_DIGITAL)
+ continue;
+
+ if (i >= ARRAY_SIZE(opregion->acpi->cadl))
+ break;
+ opregion->acpi->cadl[i++] = connector->acpi_device_id;
+ }
+
+ for_each_intel_connector(&dev_priv->drm, connector) {
+ if ((connector->acpi_device_id & ACPI_DISPLAY_TYPE_MASK) ==
+ ACPI_DISPLAY_TYPE_INTERNAL_DIGITAL)
+ continue;
+
if (i >= ARRAY_SIZE(opregion->acpi->cadl))
break;
opregion->acpi->cadl[i++] = connector->acpi_device_id;
--
2.1.4
More information about the Intel-gfx
mailing list