Skip to contentSkip to conversation

drm/i915: Refine eDP aux backlight enable/disable sequence

PATCH In review Lee Shawn C 3 participants 10 messages Jun 21, 2019 – Jun 25, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Refine eDP aux backlight enable/disable sequence

Modify aux backlight enable/disable sequence just like what we did for genernal eDP panel.
1. Setup PWM freq and brightness level before enable display backlight.
2. Set PWM to 0 after backlight enable was off.

Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jose Roberto de Souza <[email protected]>
Cc Cooper Chiou <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +2 -1
index 6b0b73479fb8..bbc579734238 100644
@@ -216,13 +216,14 @@ static void intel_dp_aux_enable_backlight(const struct intel_crtc_state *crtc_st
 		}
 	}
 
-	set_aux_backlight_enable(intel_dp, true);
 	intel_dp_aux_set_backlight(conn_state, connector->panel.backlight.level);
+	set_aux_backlight_enable(intel_dp, true);
 }
 
 static void intel_dp_aux_disable_backlight(const struct drm_connector_state *old_conn_state)
 {
 	set_aux_backlight_enable(enc_to_intel_dp(old_conn_state->best_encoder), false);
+	intel_dp_aux_set_backlight(old_conn_state, 0);
 }
 
 static int intel_dp_aux_setup_backlight(struct intel_connector *connector,
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for drm/i915: Refine eDP aux backlight enable/disable sequence

== Series Details ==

== Series Details ==

Series: drm/i915: Refine eDP aux backlight enable/disable sequence
URL : https://patchwork.freedesktop.org/series/62494/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6319 -> Patchwork_13380
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/

Known issues
------------

Here are the changes found in Patchwork_13380 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_exec@basic:
- fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/fi-icl-u3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/fi-icl-u3/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][3] -> [FAIL][4] ([fdo#109485])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/fi-kbl-7500u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/fi-kbl-7500u/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live_execlists:
- fi-cfl-8109u: [INCOMPLETE][5] -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/fi-cfl-8109u/igt@i915_selftest@live_execlists.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/fi-cfl-8109u/igt@i915_selftest@live_execlists.html

* igt@kms_addfb_basic@addfb25-x-tiled:
- fi-icl-u3: [DMESG-WARN][7] ([fdo#107724]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/fi-icl-u3/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/fi-icl-u3/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [DMESG-WARN][9] ([fdo#102614]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/fi-hsw-peppy/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/fi-hsw-peppy/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-blb-e6850: [INCOMPLETE][11] ([fdo#107718]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/fi-blb-e6850/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/fi-blb-e6850/igt@[email protected]

[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485

Participating hosts (51 -> 43)
------------------------------

Additional (1): fi-bxt-j4205
Missing (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-icl-y fi-icl-dsi fi-bdw-samus

Build changes
-------------

* Linux: CI_DRM_6319 -> Patchwork_13380

CI_DRM_6319: 6f4aab2bf0b6001dd7d66f14b7014996ad2d06e4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5064: 22850c1906550fb97b405c019275dcfb34be8cf7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13380: e7531c21f90acc96a9b09134585987d92cc0a750 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

e7531c21f90a drm/i915: Refine eDP aux backlight enable/disable sequence

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.IGT: success for drm/i915: Refine eDP aux backlight enable/disable sequence

In reply to Lee Shawn C
== Series Details ==

== Series Details ==

Series: drm/i915: Refine eDP aux backlight enable/disable sequence
URL : https://patchwork.freedesktop.org/series/62494/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6319_full -> Patchwork_13380_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Known issues
------------

Here are the changes found in Patchwork_13380_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_eio@banned:
- shard-apl: [PASS][1] -> [DMESG-WARN][2] ([fdo#110913 ]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-apl2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-apl3/igt@[email protected]

* igt@gem_mmap_gtt@hang:
- shard-snb: [PASS][3] -> [INCOMPLETE][4] ([fdo#105411])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-snb1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-snb4/igt@[email protected]

* igt@gem_persistent_relocs@forked-thrashing:
- shard-kbl: [PASS][5] -> [DMESG-WARN][6] ([fdo#110913 ]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-kbl7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-kbl4/igt@[email protected]

* igt@gem_workarounds@suspend-resume-context:
- shard-skl: [PASS][7] -> [INCOMPLETE][8] ([fdo#104108]) +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-skl9/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-skl3/igt@[email protected]

* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#109349])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-iclb2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-iclb1/igt@[email protected]

* igt@kms_flip@flip-vs-suspend:
- shard-glk: [PASS][11] -> [INCOMPLETE][12] ([fdo#103359] / [k.org#198133])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-glk6/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-glk4/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-skl: [PASS][13] -> [INCOMPLETE][14] ([fdo#109507])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-skl3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-skl5/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: [PASS][15] -> [FAIL][16] ([fdo#103167]) +5 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-pwrite:
- shard-hsw: [PASS][17] -> [SKIP][18] ([fdo#109271]) +27 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-hsw8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-pwrite.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-hsw1/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-pwrite.html

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-apl: [PASS][19] -> [DMESG-WARN][20] ([fdo#108566]) +4 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-apl5/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-apl5/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-y:
- shard-iclb: [PASS][21] -> [FAIL][22] ([fdo#103166])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-iclb7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-iclb6/igt@[email protected]

* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#109642])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-iclb2/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-iclb1/igt@[email protected]

* igt@kms_psr@psr2_sprite_plane_onoff:
- shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109441])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-iclb2/igt@kms_psr@psr2_sprite_plane_onoff.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-iclb6/igt@kms_psr@psr2_sprite_plane_onoff.html

* igt@kms_setmode@basic:
- shard-kbl: [PASS][27] -> [FAIL][28] ([fdo#99912])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-kbl1/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-kbl4/igt@[email protected]

* igt@kms_sysfs_edid_timing:
- shard-hsw: [PASS][29] -> [FAIL][30] ([fdo#100047])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-hsw8/igt@kms_sysfs_edid_timing.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-hsw1/igt@kms_sysfs_edid_timing.html

#### Possible fixes ####

* igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing:
- shard-apl: [DMESG-WARN][31] ([fdo#110913 ]) -> [PASS][32] +2 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-apl7/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-apl8/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html

* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-kbl: [DMESG-WARN][33] ([fdo#110913 ]) -> [PASS][34] +2 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-kbl6/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-kbl7/igt@[email protected]

* igt@i915_pm_rpm@i2c:
- shard-hsw: [FAIL][35] ([fdo#104097]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-hsw1/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-hsw5/igt@[email protected]

* igt@i915_suspend@fence-restore-untiled:
- shard-kbl: [DMESG-WARN][37] ([fdo#103313]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-kbl2/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-kbl1/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-64x64-sliding:
- shard-apl: [INCOMPLETE][39] ([fdo#103927]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-apl1/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-apl2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-pwrite:
- shard-hsw: [SKIP][41] ([fdo#109271]) -> [PASS][42] +25 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-hsw1/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-pwrite.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-hsw4/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-pwrite.html

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: [FAIL][43] ([fdo#103167]) -> [PASS][44] +3 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-iclb4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [FAIL][45] ([fdo#108145]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-skl8/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-skl4/igt@[email protected]

* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [SKIP][47] ([fdo#109441]) -> [PASS][48] +3 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-iclb1/igt@kms_psr@psr2_sprite_plane_move.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html

* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: [FAIL][49] ([fdo#109016]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-kbl3/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-kbl6/igt@[email protected]

* igt@kms_setmode@basic:
- shard-apl: [FAIL][51] ([fdo#99912]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-apl3/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-apl6/igt@[email protected]
- shard-hsw: [FAIL][53] ([fdo#99912]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-hsw1/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-hsw1/igt@[email protected]

* igt@kms_sysfs_edid_timing:
- shard-iclb: [FAIL][55] ([fdo#100047]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6319/shard-iclb2/igt@kms_sysfs_edid_timing.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/shard-iclb1/igt@kms_sysfs_edid_timing.html

[fdo#100047]: https://bugs.freedesktop.org/show_bug.cgi?id=100047
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103313]: https://bugs.freedesktop.org/show_bug.cgi?id=103313
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104097]: https://bugs.freedesktop.org/show_bug.cgi?id=104097
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110913 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110913
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133

Participating hosts (10 -> 10)
------------------------------

No changes in participating hosts

Build changes
-------------

* Linux: CI_DRM_6319 -> Patchwork_13380

CI_DRM_6319: 6f4aab2bf0b6001dd7d66f14b7014996ad2d06e4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5064: 22850c1906550fb97b405c019275dcfb34be8cf7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13380: e7531c21f90acc96a9b09134585987d92cc0a750 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13380/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
In reply to Lee Shawn C
Quoted 4 lines · Lee Shawn C

Modify aux backlight enable/disable sequence just like what we did for genernal eDP panel.
1. Setup PWM freq and brightness level before enable display backlight.
2. Set PWM to 0 after backlight enable was off.

It took me a while to realize why we do this in this order.

eDP v1.4b says about DPCD addresses 00722h-00723h
i.e. EDP_BACKLIGHT_BRIGHTNESS MSB and LSB:

"""
Writes are ignored if:

[...]

- BACKLIGHT_ENABLE bit in the EDP_DISPLAY_CONTROL register (DPCD Address 00720h, bit 0) is cleared to 0"
"""

i.e. per the spec this change makes the brightness updates no-ops.

Do you have a panel where this patch makes a difference?

BR,
Jani.

Quoted 31 lines
Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jose Roberto de Souza <[email protected]>
Cc Cooper Chiou <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +2 -1
index 6b0b73479fb8..bbc579734238 100644
@@ -216,13 +216,14 @@ static void intel_dp_aux_enable_backlight(const struct intel_crtc_state *crtc_st
 		}
 	}
 
-	set_aux_backlight_enable(intel_dp, true);
 	intel_dp_aux_set_backlight(conn_state, connector->panel.backlight.level);
+	set_aux_backlight_enable(intel_dp, true);
 }
 
 static void intel_dp_aux_disable_backlight(const struct drm_connector_state *old_conn_state)
 {
 	set_aux_backlight_enable(enc_to_intel_dp(old_conn_state->best_encoder), false);
+	intel_dp_aux_set_backlight(old_conn_state, 0);
 }
 
 static int intel_dp_aux_setup_backlight(struct intel_connector *connector,
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 19 lines · Jani Nikula
Quoted 4 lines · Lee Shawn C

Modify aux backlight enable/disable sequence just like what we did for genernal eDP panel.
1. Setup PWM freq and brightness level before enable display backlight.
2. Set PWM to 0 after backlight enable was off.

It took me a while to realize why we do this in this order.

eDP v1.4b says about DPCD addresses 00722h-00723h i.e. EDP_BACKLIGHT_BRIGHTNESS MSB and LSB:

"""
Writes are ignored if:

[...]

- BACKLIGHT_ENABLE bit in the EDP_DISPLAY_CONTROL register (DPCD Address 00720h, bit 0) is cleared to 0"
"""

Quoted 7 lines

i.e. per the spec this change makes the brightness updates no-ops.

Do you have a panel where this patch makes a difference?

BR,
Jani.

What you say is correct. According to spec, write EDP_BACKLIGHT_BRIGHTNESS does not affect if BACKLIGHT_ENABLE already be off.

Backlight enable always turn off before stop PWM output when used general eDP backlight (from SOC) control. But AUX backlight control is a little different. I will update this patch and remove "Set PWM to 0".

Quoted 34 lines
Quoted 34 lines
Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jose Roberto de Souza <[email protected]>
Cc Cooper Chiou <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +2 -1
index 6b0b73479fb8..bbc579734238 100644
@@ -216,13 +216,14 @@ static void intel_dp_aux_enable_backlight(const struct intel_crtc_state *crtc_st
 		}
 	}
 
-	set_aux_backlight_enable(intel_dp, true);
 	intel_dp_aux_set_backlight(conn_state, 
 connector->panel.backlight.level);
+	set_aux_backlight_enable(intel_dp, true);
 }
 
 static void intel_dp_aux_disable_backlight(const struct 
 drm_connector_state *old_conn_state)  {
 
 set_aux_backlight_enable(enc_to_intel_dp(old_conn_state->best_encoder)
 , false);
+	intel_dp_aux_set_backlight(old_conn_state, 0);

}

Quoted 6 lines
Quoted 2 lines

static int intel_dp_aux_setup_backlight(struct intel_connector
*connector,

--
Jani Nikula, Intel Open Source Graphics Center

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw
Quoted 28 lines · Shawn C
Quoted 19 lines · Jani Nikula
Quoted 4 lines · Lee Shawn C

Modify aux backlight enable/disable sequence just like what we did for genernal eDP panel.
1. Setup PWM freq and brightness level before enable display backlight.
2. Set PWM to 0 after backlight enable was off.

It took me a while to realize why we do this in this order.

eDP v1.4b says about DPCD addresses 00722h-00723h i.e. EDP_BACKLIGHT_BRIGHTNESS MSB and LSB:

"""
Writes are ignored if:

[...]

- BACKLIGHT_ENABLE bit in the EDP_DISPLAY_CONTROL register (DPCD Address 00720h, bit 0) is cleared to 0"
"""

Quoted 7 lines

i.e. per the spec this change makes the brightness updates no-ops.

Do you have a panel where this patch makes a difference?

BR,
Jani.

Quoted 5 lines

What you say is correct. According to spec, write EDP_BACKLIGHT_BRIGHTNESS does not affect if BACKLIGHT_ENABLE already be off.

Backlight enable always turn off before stop PWM output when used general eDP backlight (from SOC) control. But AUX backlight control is a little different. I will update this patch and remove "Set PWM to 0".

AFAICT the only thing you can do, really, is calling intel_dp_aux_set_backlight(old_conn_state, 0); *before* set_aux_backlight_enable(enc_to_intel_dp(old_conn_state->best_encoder), false); in intel_dp_aux_disable_backlight().

BR,
Jani.

Quoted 41 lines
Quoted 41 lines
Quoted 35 lines
Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jose Roberto de Souza <[email protected]>
Cc Cooper Chiou <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +2 -1
index 6b0b73479fb8..bbc579734238 100644
@@ -216,13 +216,14 @@ static void intel_dp_aux_enable_backlight(const struct intel_crtc_state *crtc_st
 		}
 	}
 
-	set_aux_backlight_enable(intel_dp, true);
 	intel_dp_aux_set_backlight(conn_state, 
 connector->panel.backlight.level);
+	set_aux_backlight_enable(intel_dp, true);
 }
 
 static void intel_dp_aux_disable_backlight(const struct 
 drm_connector_state *old_conn_state)  {
 
 set_aux_backlight_enable(enc_to_intel_dp(old_conn_state->best_encoder)
 , false);
+	intel_dp_aux_set_backlight(old_conn_state, 0);

}

Quoted 2 lines

static int intel_dp_aux_setup_backlight(struct intel_connector
*connector,

--
Jani Nikula, Intel Open Source Graphics Center

Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw

PATCH v2 1/1 drm/i915: Refine eDP aux backlight enable/disable sequence

In reply to Lee Shawn C

Modify aux backlight enable/disable sequence just like what we did for genernal eDP panel. Setup PWM freq and brightness level before enable display backlight.

v2: According to spec, it is not necessary to set PWM to 0 if
backlight enable already off. Remove intel_dp_aux_set_backlight to 0.

Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jose Roberto de Souza <[email protected]>
Cc Cooper Chiou <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +1 -1
index 6b0b73479fb8..70d9b9c9586f 100644
@@ -216,8 +216,8 @@ static void intel_dp_aux_enable_backlight(const struct intel_crtc_state *crtc_st
 		}
 	}
 
-	set_aux_backlight_enable(intel_dp, true);
 	intel_dp_aux_set_backlight(conn_state, connector->panel.backlight.level);
+	set_aux_backlight_enable(intel_dp, true);
 }
 
 static void intel_dp_aux_disable_backlight(const struct drm_connector_state *old_conn_state)
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw
Quoted 6 lines · Lee Shawn C

Modify aux backlight enable/disable sequence just like what we did for genernal eDP panel. Setup PWM freq and brightness level before enable display backlight.

v2: According to spec, it is not necessary to set PWM to 0 if
backlight enable already off. Remove intel_dp_aux_set_backlight to 0.

Please think it through again. The same applies here. The brightness change before enable is ignored according to eDP spec.

BR,
Jani.

Quoted 25 lines
Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jose Roberto de Souza <[email protected]>
Cc Cooper Chiou <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +1 -1
index 6b0b73479fb8..70d9b9c9586f 100644
@@ -216,8 +216,8 @@ static void intel_dp_aux_enable_backlight(const struct intel_crtc_state *crtc_st
 		}
 	}
 
-	set_aux_backlight_enable(intel_dp, true);
 	intel_dp_aux_set_backlight(conn_state, connector->panel.backlight.level);
+	set_aux_backlight_enable(intel_dp, true);
 }
 
 static void intel_dp_aux_disable_backlight(const struct drm_connector_state *old_conn_state)
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw
Quoted 5 lines · Jani Nikula
Quoted 4 lines · Lee Shawn C

Modify aux backlight enable/disable sequence just like what we did for genernal eDP panel. Setup PWM freq and brightness level before enable display backlight.

Quoted 8 lines
Quoted 2 lines

v2: According to spec, it is not necessary to set PWM to 0 if
backlight enable already off. Remove intel_dp_aux_set_backlight to 0.

Please think it through again. The same applies here. The brightness change before enable is ignored according to eDP spec.

BR,
Jani.

This is what the problem we see on a new eDP panel from customer. TCON did not turn backlight on successful. After sawp the sequence, backlight works well as expected.

In the other words. Looks like this TCON backlight enable flow violate eDP spec. What do you think?

Quoted 26 lines
Quoted 26 lines
Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jose Roberto de Souza <[email protected]>
Cc Cooper Chiou <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +1 -1
index 6b0b73479fb8..70d9b9c9586f 100644
@@ -216,8 +216,8 @@ static void intel_dp_aux_enable_backlight(const struct intel_crtc_state *crtc_st
 		}
 	}
 
-	set_aux_backlight_enable(intel_dp, true);
 	intel_dp_aux_set_backlight(conn_state, 
 connector->panel.backlight.level);
+	set_aux_backlight_enable(intel_dp, true);
 }
 
Quoted 6 lines
Quoted 2 lines

static void intel_dp_aux_disable_backlight(const struct
drm_connector_state *old_conn_state)

--
Jani Nikula, Intel Open Source Graphics Center

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw

✗ Fi.CI.BAT: failure for drm/i915: Refine eDP aux backlight enable/disable sequence (rev2)

In reply to Lee Shawn C
== Series Details ==

== Series Details ==

Series: drm/i915: Refine eDP aux backlight enable/disable sequence (rev2)
URL : https://patchwork.freedesktop.org/series/62494/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6342 -> Patchwork_13419
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_13419 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_13419, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13419/

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_13419:

### IGT changes ###

#### Possible regressions ####

* igt@kms_chamelium@hdmi-edid-read:
- fi-kbl-7567u: [PASS][1] -> [TIMEOUT][2] +3 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6342/fi-kbl-7567u/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13419/fi-kbl-7567u/igt@[email protected]

#### Warnings ####

* igt@kms_chamelium@vga-hpd-fast:
- fi-kbl-7567u: [SKIP][3] ([fdo#109271]) -> [TIMEOUT][4] +4 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6342/fi-kbl-7567u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13419/fi-kbl-7567u/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_13419 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_mmap_gtt@basic-wc:
- fi-icl-u3: [PASS][5] -> [DMESG-WARN][6] ([fdo#107724]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6342/fi-icl-u3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13419/fi-icl-u3/igt@[email protected]

* igt@i915_selftest@live_execlists:
- fi-apl-guc: [PASS][7] -> [INCOMPLETE][8] ([fdo#103927])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6342/fi-apl-guc/igt@i915_selftest@live_execlists.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13419/fi-apl-guc/igt@i915_selftest@live_execlists.html

* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [PASS][9] -> [DMESG-WARN][10] ([fdo#102614])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6342/fi-hsw-peppy/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13419/fi-hsw-peppy/igt@[email protected]
- fi-icl-u2: [PASS][11] -> [FAIL][12] ([fdo#103167])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6342/fi-icl-u2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13419/fi-icl-u2/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live_sanitycheck:
- fi-icl-u3: [DMESG-WARN][13] ([fdo#107724]) -> [PASS][14] +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6342/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13419/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html

[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271

Participating hosts (53 -> 45)
------------------------------

Missing (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-icl-y fi-icl-dsi fi-bdw-samus

Build changes
-------------

* Linux: CI_DRM_6342 -> Patchwork_13419

CI_DRM_6342: 6eef272b254b34200129af8f2ec1e4cfe1ca6bff @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5067: 5eafa33dbdb1d3c190ac5060161c45152e9a298e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13419: a1afd37c1520d6c630a2a590e1e72ee9a9c53aee @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

a1afd37c1520 drm/i915: Refine eDP aux backlight enable/disable sequence

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13419/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx