Adapt patches from Jani to solve brightness hot key problem
Subsystems (2)
cover Adapt patches from Jani to solve brightness hot key problem
Hi guys,
these are the same patches that Jani sent some time ago[1], but adapted to current 4.8-rc1. These fixed the problem I had with my Asus laptop[2], and now the brightness hotkeys are working in my machine.
The only adaptation needed was change dev_priv->dev to dev_priv->drm on for_each_* macros. Along with this fix, I also added myself as tester.
Please let me know if it needs more adjustments before merging.
Thanks,
[1] https://patchwork.freedesktop.org/series/4783/
[2] https://bugzilla.kernel.org/show_bug.cgi?id=152091
Jani Nikula (2):
drm/i915: make i915 the source of acpi device ids for _DOD drm/i915/opregion: update cadl based on actually active outputs
drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/intel_display.c | 4 + drivers/gpu/drm/i915/intel_drv.h | 3 + drivers/gpu/drm/i915/intel_opregion.c | 158 +++++++++++++--------------------- 4 files changed, 71 insertions(+), 96 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/2 drm/i915: make i915 the source of acpi device ids for _DOD
From: Jani Nikula <[email protected]>
The graphics driver is supposed to define the DIDL, which are used for _DOD, not the BIOS. Restore that behaviour.
This is basically a revert of
commit 3143751ff51a163b77f7efd389043e038f3e008e
Author: Zhang Rui <[email protected]> Date: Mon Mar 29 15:12:16 2010 +0800
drm/i915: set DIDL using the ACPI video output device _ADR method return.
which went out of its way to cater to a specific BIOS, setting up DIDL based on _ADR method. Perhaps that approach worked on that specific machine, but on the machines I checked the _ADR method invents the device identifiers out of thin air if DIDL has not been set. The source for _ADR is also supposed to be the DIDL set by the driver, not the other way around.
With this, we'll also limit the number of outputs to what the driver actually has.
v2: do not set ACPI_DEVICE_ID_SCHEME in the device id (Peter Wu)
--- drivers/gpu/drm/i915/intel_drv.h | 3 ++ drivers/gpu/drm/i915/intel_opregion.c | 89 ++++++++++------------------------- 2 files changed, 28 insertions(+), 64 deletions(-)
drivers/gpu/drm/i915/intel_drv.h +3 -0
@@ -263,6 +263,9 @@ struct intel_connector {*/ struct intel_encoder *encoder; +/* ACPI device id for ACPI and driver cooperation */ +u32 acpi_device_id; +/* Reads out the current hw, returning true if the connector is enabled * and active (i.e. dpms ON state). */ bool (*get_hw_state)(struct intel_connector *);
drivers/gpu/drm/i915/intel_opregion.c +25 -64
123 lines not on this page · raw message
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915/opregion: update cadl based on actually active outputs
In reply to Marcos Paulo de SouzaFrom: Jani Nikula <[email protected]>
Previously we've just shoved the first eight devices in DIDL to CADL (list of active outputs). Some of the active outputs may have been left outside of CADL. The problem is, some BIOS implementations prevent laptop brightness hotkey propagation if the flat panel is not active.
Now that we have connector to acpi device id mapping covered, we can update CADL based on which outputs are actually active.
v3: actually git add the dev->dev_priv change.
v4: update cadl in intel_shared_dpll_commit() if intel_state->modeset
(Maarten)
--- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/intel_display.c | 4 ++ drivers/gpu/drm/i915/intel_opregion.c | 71 +++++++++++++++++++---------------- 3 files changed, 44 insertions(+), 33 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -3741,6 +3741,7 @@ extern int intel_opregion_notify_encoder(struct intel_encoder *intel_encoder,extern int intel_opregion_notify_adapter (struct drm_i915_private *dev_priv,pci_power_t state);extern int intel_opregion_get_panel_type (struct drm_i915_private *dev_priv); +extern void intel_opregion_update_cadl (struct drm_i915_private *dev_priv);#else static inline int intel_opregion_setup (struct drm_i915_private *dev) {return 0 ; }static inline void intel_opregion_register (struct drm_i915_private *dev_priv) { }
@@ -3762,6 +3763,7 @@ static inline int intel_opregion_get_panel_type(struct drm_i915_private *dev) {return -ENODEV ; } +static inline void intel_opregion_update_cadl (struct drm_i915_private *dev_priv) { }#endif /* intel_acpi.c */
drivers/gpu/drm/i915/intel_display.c +4 -0
@@ -13856,6 +13856,10 @@ static int intel_atomic_commit(struct drm_device *dev, dev_priv->wm.distrust_bios_wm = false; dev_priv->wm.skl_results = intel_state->wm_results;intel_shared_dpll_commit (state); + +if (intel_state->modeset) +intel_opregion_update_cadl (dev_priv); +intel_atomic_track_fbs (state);if (nonblock)
drivers/gpu/drm/i915/intel_opregion.c +38 -33
97 lines not on this page · raw message
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Ro.CI.BAT: failure for Adapt patches from Jani to solve brightness hot key problem
In reply to Marcos Paulo de Souza== Series Details ==
== Series Details ==
Series: Adapt patches from Jani to solve brightness hot key problem
URL : https://patchwork.freedesktop.org/series/11134/
State : failure
== Summary ==
Series 11134v1 Adapt patches from Jani to solve brightness hot key problem
http://patchwork.freedesktop.org/api/1.0/series/11134/revisions/1/mbox
Test drv_module_reload_basic:
pass -> SKIP (ro-hsw-i7-4770r)
Test gem_exec_gttfill:
Subgroup basic:
skip -> PASS (fi-snb-i7-2600)
Test kms_cursor_legacy:
Subgroup basic-flip-vs-cursor-legacy:
fail -> PASS (ro-bdw-i5-5250u)
Subgroup basic-flip-vs-cursor-varying-size:
pass -> FAIL (ro-skl3-i5-6260u)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS (ro-bdw-i7-5600u)
dmesg-warn -> SKIP (ro-bdw-i5-5250u)
Subgroup suspend-read-crc-pipe-c:
dmesg-warn -> SKIP (ro-bdw-i5-5250u)fi-kbl-qkkr total:244 pass:186 dwarn:28 dfail:0 fail:3 skip:27 fi-skl-i7-6700k total:244 pass:208 dwarn:4 dfail:2 fail:2 skip:28 fi-snb-i7-2600 total:244 pass:202 dwarn:0 dfail:0 fail:0 skip:42 ro-bdw-i5-5250u total:240 pass:220 dwarn:1 dfail:0 fail:0 skip:19 ro-bdw-i7-5600u total:240 pass:207 dwarn:0 dfail:0 fail:1 skip:32 ro-bsw-n3050 total:240 pass:196 dwarn:0 dfail:0 fail:2 skip:42 ro-byt-n2820 total:240 pass:197 dwarn:0 dfail:0 fail:3 skip:40 ro-hsw-i3-4010u total:240 pass:214 dwarn:0 dfail:0 fail:0 skip:26 ro-hsw-i7-4770r total:240 pass:184 dwarn:0 dfail:0 fail:0 skip:56 ro-ilk1-i5-650 total:235 pass:174 dwarn:0 dfail:0 fail:1 skip:60 ro-skl3-i5-6260u total:240 pass:222 dwarn:0 dfail:0 fail:4 skip:14
ro-ivb2-i7-3770 failed to connect after reboot
ro-ivb-i7-3770 failed to connect after reboot
Results at /archive/results/CI_IGT_test/RO_Patchwork_1882/
bc5705c drm-intel-nightly: 2016y-08m-15d-15h-16m-01s UTC integration manifest 4be6479 drm/i915/opregion: update cadl based on actually active outputs 60196ff drm/i915: make i915 the source of acpi device ids for _DOD
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx