Repository navigation
drm/adbe: Turn the backlight off with the display pipe (iPhone 6s) - #186
Open
jeroentrappers wants to merge 2 commits into
Open
jeroentrappers wants to merge 2 commits into
jeroentrappers wants to merge 2 commits into
Conversation
Nothing turned the backlight off when the display went off: a compositor's DPMS off and a power-down fbdev blank disable the CRTC, and this driver only handled the backlight around system sleep. The fbdev blank notifier does not help either, as the kernel is built without FB_BACKLIGHT. On an iPhone 6s the backlight stayed at its level through fb0 blank=4. Turn the backlight off when the CRTC is disabled and back on when it is enabled, looking it up first if no sleep has done so yet. A backlight held off after a failed panel wake stays off. Suspend and resume take panel_lock around, not inside, the CRTC's disable and enable, so this does not nest. Assisted-by: LLM Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
The iPhone 6s's display pipe has no backlight phandle, so the driver cannot turn the backlight off when the pipe goes off: after a power-down fbdev blank the panel showed nothing but the backlight stayed lit. Point it at the DWI backlight. post-init-providers keeps the backlight from holding up the pipe's probe, as on the iPad 5. Assisted-by: LLM Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the iPhone 6s, the backlight stayed lit when the display was turned off. This series turns it off and on with the display pipe.
Why it stayed on: a compositor's DPMS off and a power-down fbdev blank both disable the CRTC, but adbe only switched the backlight around system sleep. The fbdev blank notifier doesn't help, because the kernel is built without
FB_BACKLIGHT. On top of that, the 6s never found its backlight at all: the lookup sat in the eDP panel-supply attach (the iPad's path; the 6s panel is MIPI DSI), and the 6s device tree had no backlight link.The series:
drm/adbe: Turn the backlight off with the pipe:adbe_backlight_find()looks the backlight up on first use, so panels without the eDP path find it too.panel_lockaround the CRTC's disable and enable, not inside them, so this doesn't nest.adbe_dsi_panel_set()): enable wakes the panel first, then the backlight. Disable turns the backlight off first, then sleeps the panel.arm64: dts: apple: s800x-6s: Give the display pipe its backlight:backlight = <&dwi_bl>pluspost-init-providerson&disp0. The 6s Plus shares this file; its ADT was not checked.Tested on an iPhone 6s (N71m), on the 6s branch before this rebase. I blanked fb0 three times with power-down (
blank=4) and read the backlight while it was blanked:actual_brightness0 andbl_power4 on every cycle.bl_power0, the level it was set to.checkpatch.plon both commits. The rebased driver code is the same, function for function, as a tree that builds for n71m with main merged.Proposed CHANGELOG entry (not added; for you to take or adjust): "iPhone 6s: the backlight now turns off with the display (screen blank and DPMS off)."