Commit 1dd56ed
committed
Fix brightness stuck at 100%: disable sysfs HBM for AMB670YF01
Root cause identified via debug logging: crDroid framework writes
hbm_mode=1 to /sys/kernel/oplus_display/hbm, which triggers
dsi_display_normal_hbm_on() sending DSI_CMD_NORMAL_HBM_ON to the
panel. This sets brightness register (0x51) to 0x0EFF (max) and
puts the panel in HBM mode (0x53=0xE0). The hbm_mode guard then
blocks ALL subsequent brightness writes from userspace.
The FOD (fingerprint-on-display) HBM path works correctly via a
completely separate mechanism (oplus_dimlayer_hbm -> fingerprint_mode
-> sde_connector_update_hbm) and is not affected by this change.
Fix:
1. Skip DSI commands in both sysfs HBM handlers for AMB670YF01
(oplus_display_panel_set_hbm and oplus_display_set_hbm) -
the variable is still set but no panel commands are sent
2. Remove the hbm_mode brightness blocking guard in
dsi_panel_update_backlight() so brightness writes always go through
3. Remove the hbm_mode check in sde_connector_update_hbm() that
skipped sending HBM OFF during FOD exit
4. Remove all temporary BRIGHTNESS_DEBUG logging
https://claude.ai/code/session_01Tf5hB9ot7hdgVfPv7n42g41 parent acd848e commit 1dd56ed
File tree
6 files changed
+13
-46
lines changed- techpack/display
- msm
- dsi
- sde
- oplus
6 files changed
+13
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
308 | 307 | | |
309 | 308 | | |
310 | 309 | | |
| |||
331 | 330 | | |
332 | 331 | | |
333 | 332 | | |
334 | | - | |
335 | | - | |
| 333 | + | |
336 | 334 | | |
337 | | - | |
338 | 335 | | |
339 | 336 | | |
340 | 337 | | |
| |||
362 | 359 | | |
363 | 360 | | |
364 | 361 | | |
365 | | - | |
366 | | - | |
367 | 362 | | |
368 | 363 | | |
369 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
965 | 965 | | |
966 | 966 | | |
967 | 967 | | |
968 | | - | |
969 | | - | |
970 | | - | |
971 | 968 | | |
972 | | - | |
973 | 969 | | |
974 | 970 | | |
975 | 971 | | |
| |||
982 | 978 | | |
983 | 979 | | |
984 | 980 | | |
985 | | - | |
986 | 981 | | |
987 | 982 | | |
988 | 983 | | |
| |||
992 | 987 | | |
993 | 988 | | |
994 | 989 | | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | 990 | | |
1003 | 991 | | |
1004 | 992 | | |
| |||
1249 | 1237 | | |
1250 | 1238 | | |
1251 | 1239 | | |
1252 | | - | |
1253 | | - | |
1254 | 1240 | | |
1255 | 1241 | | |
1256 | 1242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | 239 | | |
243 | | - | |
244 | 240 | | |
245 | 241 | | |
246 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | 580 | | |
585 | 581 | | |
586 | 582 | | |
| |||
672 | 668 | | |
673 | 669 | | |
674 | 670 | | |
675 | | - | |
676 | | - | |
677 | 671 | | |
678 | 672 | | |
679 | 673 | | |
| |||
715 | 709 | | |
716 | 710 | | |
717 | 711 | | |
718 | | - | |
719 | 712 | | |
720 | 713 | | |
721 | 714 | | |
| |||
724 | 717 | | |
725 | 718 | | |
726 | 719 | | |
727 | | - | |
728 | 720 | | |
729 | 721 | | |
730 | 722 | | |
| |||
854 | 846 | | |
855 | 847 | | |
856 | 848 | | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | 849 | | |
862 | 850 | | |
863 | 851 | | |
| |||
880 | 868 | | |
881 | 869 | | |
882 | 870 | | |
883 | | - | |
884 | | - | |
885 | 871 | | |
886 | 872 | | |
887 | 873 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
241 | 239 | | |
242 | 240 | | |
243 | 241 | | |
| |||
268 | 266 | | |
269 | 267 | | |
270 | 268 | | |
271 | | - | |
272 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
273 | 275 | | |
274 | 276 | | |
275 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
493 | | - | |
494 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
495 | 499 | | |
496 | 500 | | |
497 | 501 | | |
| |||
2067 | 2071 | | |
2068 | 2072 | | |
2069 | 2073 | | |
2070 | | - | |
2071 | | - | |
2072 | 2074 | | |
2073 | 2075 | | |
2074 | 2076 | | |
| |||
0 commit comments