Repository navigation
arm64: dts: apple: t6050-k114s: set a 10-nit panel brightness floor - #3181
chrisohearn wants to merge 6 commits into
Conversation
Link the shared boot framebuffer to one panel under DCP. Keep the panel node with the board family and set its dimensions per board. Use 302 by 199 mm for the 14-inch panels based on the K114c mode and 254 ppi. Keep the existing 16-inch size and K116s compatible. All four DTBs compile and resolve the framebuffer panel phandle. Both the framebuffer and DCP stay disabled for the loader. Signed-off-by: Joshua Warren <[email protected]>
A panel node may name the lowest level at which the panel shows a lit picture, in the unit of apple,max-brightness. The driver change that follows raises requests below it to it. Turning the display off is not a request and is not affected. Signed-off-by: Chris O'Hearn <[email protected]>
The nits backlight (firmware 27) accepts every level from 0 to apple,max-brightness, and a brightness-only present carries the level to the firmware as written. A write of 0 to the backlight device therefore presents 0 nits, the level DPMS off presents. What 0 nits shows on an OLED panel has not been observed, so such a panel may need a lowest level that a request can reach. Read an optional apple,min-brightness from the panel node, in the same nits as apple,max-brightness. A request below it, zero included, is raised to it, and the backlight device reads the raised level back. Blanking and DPMS off are not requests and still present zero. A level the loader reported below the floor stays until the first request. Without the property, or with one that is not below the maximum, nothing changes. The floor is applied, and logged, on the H17P, firmware 27, M4 and 14.7 nits panels; a panel on the DAC path of older firmware and desktop 26.x firmware do not read it. backlight_floor_test covers the floor, the unchanged zero without it, the display-off cases and the loader level. Built as a user-space program with stand-in headers all 29 cases of the file pass, and backlight_floor_test fails with the floor removed; not run under KUnit. On one K114s (firmware 27.2) a build carrying an earlier cut of this change logs "brightness requests below 10 nits are raised to 10 nits" at probe. In three runs, writes stepping from 500, 1000 or 850 nits down to 10 and back read back unchanged; in the first run the panel was seen to dim and recover. No run wrote below the floor, so the floor itself was not exercised on the hardware. Signed-off-by: Chris O'Hearn <[email protected]>
Give the K114s panel the brightness floor that the apple,min-brightness binding describes. The 10-nit starting value is 1% of the 1000-nit backlight range. The panel's minimum visible luminance still needs to be measured. The backlight driver raises requests below the floor to 10 nits. The DCP stays disabled in the static tree; the loader enables it. Signed-off-by: Chris O'Hearn <[email protected]>
|
@chrisohearn checking open drafts today. To come out of draft, this still needs:
If it's no longer needed, say so here and we'll close it. Otherwise it stays open as a draft until these are done. |
Keep the K114s boot NOR description and the panel brightness floor. Use the shared panel label for the framebuffer link and let the existing K116s panel fragment supply its compatible and dimensions. Signed-off-by: Chris O'Hearn <[email protected]>
|
Thanks. I merged This stays a draft until a hardware run at the head. That needs a display hand-off that drives the panel from this tree, and it follows #2009 and #3105. |
Backlight core blank and suspend transitions carry the current brightness. Applying the floor on these transitions raises an inherited level before the first brightness write. RyanTheTide reported that blanking and unblanking raised an inherited level of 4 nits to 10. Keep the target when only the blank or suspend state changes. Apply the floor to level changes and to requests with unchanged state flags. Read the accepted target back through the backlight device. Extend backlight_floor_test to cover blank and suspend cycles below the floor and same-level writes both lit and blanked. Signed-off-by: Chris O'Hearn <[email protected]> (cherry picked from commit 0c42db3)
What: Set apple,min-brightness to 10 on the K114s panel. With #3105, brightness requests below 10 nits read back 10 once the loader hands off the panel and supplies its maximum. The floor is 1% of the 1000-nit backlight range. The panel's minimum visible luminance still needs measuring.
Tested: At be981c8, all four K114 and K116 DTBs built with CHECK_DTBS=y, and dt_binding_check passed for apple,dcp.yaml. The K114s DTB carries apple,min-brightness = <10> at /soc/dcp@48ae00000/panel. In the earlier K114s (Mac17,13) run at #3105 head 040c06c with the local display handoff and the same floor, writes of 1 and 9 to apple-panel-bl each read back 10.
#3105 (comment)
Risk: Two-way door for the board property. K114s is the only board that sets a floor. The stacked framebuffer link covers all four K114 and K116 boards. The framebuffer and DCP stay disabled in the static tree.
Not yet: A K114s boot at be981c8 with the display handoff, a write of 0, the luminance at the floor, and suspend with the floor.
This stacks on Joshua Warren's panel change in #2009 and the binding and driver changes in #3105. Main at ef26a43 already has the K116s panel. The shared framebuffer phandle now resolves to that panel on K116s and to the new panel on K114c, K114s, and K116c. The dimensions are 302 x 199 mm on the 14-inch boards and 345 x 223 mm on the 16-inch boards. The patches from #3105 are unchanged. The new board property lands after both dependencies.
Build comparison with main ef26a43 used Clang 23.1.3 and dtschema 2026.9. All four framebuffer panel phandles resolve. Both builds report the same K114c PCIe schema warning for port0. K114s and the DCP binding check report no diagnostics.