mbox series

[v3,0/5] drm/dp, drm/i915: Finish basic PWM support for VESA backlight helpers

Message ID 20211006024018.320394-1-lyude@redhat.com (mailing list archive)
Headers show
Series drm/dp, drm/i915: Finish basic PWM support for VESA backlight helpers | expand

Message

Lyude Paul Oct. 6, 2021, 2:40 a.m. UTC
When I originally moved all of the VESA backlight code in i915 into DRM
helpers, one of the things I didn't have the hardware or time for
testing was machines that used a combination of PWM and DPCD in order to
control their backlights. This has since then caused some breakages and
resulted in us disabling DPCD backlight support on such machines. This
works fine, unless you have a machine that actually needs this
functionality for backlight controls to work at all. Additionally, we
will need to support PWM for when we start adding support for VESA's
product (as in the product of multiplication) control mode for better
brightness ranges.

So - let's finally finish up implementing basic support for these types
of backlights to solve these problems in our DP helpers, along with
implementing support for this in i915. And since digging into this issue
solved the last questions we really had about probing backlights in i915
for the most part, let's update some of the comments around that as
well!

Changes (v3):
* Add likely fix for weird backlight scaling issues on samus-fi-bdw in intel's
  CI, which pointed out we've been leaving some (currently) unsupported
  backlight features on by mistake which certainly have the potential to cause
  problems.
Changes (v2):
* Fixup docs
* Add patch to stop us from breaking nouveau

Lyude Paul (5):
  drm/i915: Add support for panels with VESA backlights with PWM
    enable/disable
  drm/nouveau/kms/nv50-: Explicitly check DPCD backlights for aux
    enable/brightness
  drm/dp: Disable unsupported features in
    DP_EDP_BACKLIGHT_MODE_SET_REGISTER
  drm/dp, drm/i915: Add support for VESA backlights using PWM for
    brightness control
  drm/i915: Clarify probing order in intel_dp_aux_init_backlight_funcs()

 drivers/gpu/drm/drm_dp_helper.c               | 82 +++++++++++++------
 .../drm/i915/display/intel_dp_aux_backlight.c | 80 ++++++++++++++----
 drivers/gpu/drm/nouveau/nouveau_backlight.c   |  5 +-
 include/drm/drm_dp_helper.h                   |  7 +-
 4 files changed, 128 insertions(+), 46 deletions(-)

Comments

Lyude Paul Oct. 11, 2021, 6:50 p.m. UTC | #1
ok - CI on this failed like, multiple times last week - each time with
something slightly different and pretty clearly not related, so I'm going to
give this one last shot at retesting now that some time has passed - otherwise
I'll just file some bugs.

On Sat, 2021-10-09 at 01:58 +0000, Patchwork wrote:
> Patch Details
> Series:drm/dp, drm/i915: Finish basic PWM support for VESA backlight helpers
> (rev8)URL:https://patchwork.freedesktop.org/series/95127/State:failure
> Details:https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21296/index.html
> CI Bug Log - changes from CI_DRM_10700_full -> Patchwork_21296_fullSummaryFAILURE
> Serious unknown changes coming with Patchwork_21296_full absolutely need to
> be
> verified manually.
> If you think the reported changes have nothing to do with the changes
> introduced in Patchwork_21296_full, please notify your bug team to allow
> them
> to document this new failure mode, which will reduce false positives in CI.
> Possible new issuesHere are the unknown changes that may have been introduced in
> Patchwork_21296_full:
> IGT changesPossible regressions * igt@i915_pm_dc@dc9-dpms:shard-tglb: NOTRUN -> SKIPshard-iclb: NOTRUN ->
>    SKIP
>  * igt@i915_suspend@debugfs-reader:shard-kbl: PASS -> INCOMPLETE
> Known issuesHere are the changes found in Patchwork_21296_full that come from known
> issues:
> IGT changesIssues hit * igt@gem_ctx_isolation@preservation-s3@rcs0:shard-apl: NOTRUN -> DMESG-WARN
>    ([i915#180]) +1 similar issue
>  * igt@gem_ctx_persistence@legacy-engines-queued:shard-snb: NOTRUN -> SKIP
>    ([fdo#109271] / [i915#1099]) +1 similar issue
>  * igt@gem_eio@unwedge-stress:shard-tglb: PASS -> TIMEOUT ([i915#2369] /
>    [i915#3063] / [i915#3648])
>  * igt@gem_exec_fair@basic-deadline:shard-apl: NOTRUN -> FAIL ([i915#2846])
>  * igt@gem_exec_fair@basic-none-share@rcs0:shard-kbl: PASS -> SKIP
>    ([fdo#109271])
>  * igt@gem_exec_fair@basic-none-solo@rcs0:shard-kbl: NOTRUN -> FAIL
>    ([i915#2842])
>  * igt@gem_exec_fair@basic-none@rcs0:shard-kbl: PASS -> FAIL ([i915#2842]) +1
>    similar issue
>  * igt@gem_exec_fair@basic-pace-solo@rcs0:shard-iclb: NOTRUN -> FAIL
>    ([i915#2842]) +2 similar issues
>  * igt@gem_exec_fair@basic-throttle@rcs0:shard-glk: NOTRUN -> FAIL
>    ([i915#2842])
>  * igt@gem_huc_copy@huc-copy:shard-apl: NOTRUN -> SKIP ([fdo#109271] /
>    [i915#2190])
>  * igt@gem_pwrite@basic-exhaustion:shard-glk: NOTRUN -> WARN ([i915#2658])
>  * igt@gem_pxp@reject-modify-context-protection-off-2:shard-iclb: NOTRUN ->
>    SKIP ([i915#4270])
>  * igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-y-tiled:shard-glk: NOTRUN ->
>    SKIP ([fdo#109271]) +36 similar issues
>  * igt@gem_userptr_blits@dmabuf-sync:shard-kbl: NOTRUN -> SKIP ([fdo#109271] /
>    [i915#3323])
>  * igt@gen9_exec_parse@batch-invalid-length:shard-iclb: NOTRUN -> SKIP
>    ([i915#2856])
>  * igt@i915_pm_dc@dc6-psr:shard-iclb: PASS -> FAIL ([i915#454])
>  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:shard-apl: NOTRUN -> SKIP
>    ([fdo#109271] / [i915#1937])
>  * igt@kms_big_fb@x-tiled-32bpp-rotate-180:shard-glk: NOTRUN -> DMESG-WARN
>    ([i915#118])
>  * igt@kms_big_fb@x-tiled-64bpp-rotate-270:shard-iclb: NOTRUN -> SKIP
>    ([fdo#110725] / [fdo#111614])
>  * igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip:shard-kbl:
>    NOTRUN -> SKIP ([fdo#109271] / [i915#3777]) +1 similar issue
>  * igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-hflip:shard-apl:
>    NOTRUN -> SKIP ([fdo#109271] / [i915#3777]) +1 similar issue
>  * igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-
>    flip:shard-kbl: NOTRUN -> SKIP ([fdo#109271]) +144 similar issues
>  * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0:shard-apl: NOTRUN ->
>    SKIP ([fdo#109271]) +272 similar issues
>  * igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_mc_ccs:shard-apl: NOTRUN
>    -> SKIP ([fdo#109271] / [i915#3886]) +19 similar issues
>  * igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc:shard-
>    skl: NOTRUN -> SKIP ([fdo#109271] / [i915#3886]) +1 similar issue
>  * igt@kms_ccs@pipe-c-crc-primary-rotation-180-y_tiled_gen12_mc_ccs:shard-kbl:
>    NOTRUN -> SKIP ([fdo#109271] / [i915#3886]) +6 similar issues
>  * igt@kms_chamelium@hdmi-hpd-for-each-pipe:shard-kbl: NOTRUN -> SKIP
>    ([fdo#109271] / [fdo#111827]) +9 similar issues
>  * igt@kms_chamelium@vga-hpd:shard-apl: NOTRUN -> SKIP ([fdo#109271] /
>    [fdo#111827]) +26 similar issues
>  * igt@kms_color_chamelium@pipe-a-ctm-blue-to-red:shard-snb: NOTRUN -> SKIP
>    ([fdo#109271] / [fdo#111827]) +16 similar issues
>  * igt@kms_color_chamelium@pipe-b-ctm-0-5:shard-glk: NOTRUN -> SKIP
>    ([fdo#109271] / [fdo#111827]) +2 similar issues
>  * igt@kms_color_chamelium@pipe-d-ctm-red-to-blue:shard-skl: NOTRUN -> SKIP
>    ([fdo#109271] / [fdo#111827]) +5 similar issues
>  * igt@kms_content_protection@legacy:shard-kbl: NOTRUN -> TIMEOUT
>    ([i915#1319])
>  * igt@kms_content_protection@lic:shard-apl: NOTRUN -> TIMEOUT ([i915#1319])
>  * igt@kms_content_protection@uevent:shard-kbl: NOTRUN -> FAIL ([i915#2105])
>  * igt@kms_cursor_crc@pipe-b-cursor-32x32-sliding:shard-iclb: NOTRUN -> SKIP
>    ([fdo#109278]) +4 similar issues
>  * igt@kms_cursor_crc@pipe-d-cursor-512x170-rapid-movement:shard-tglb: NOTRUN
>    -> SKIP ([i915#3359])
>  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:shard-skl: PASS ->
>    FAIL ([i915#2346])
>  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:shard-
>    skl: PASS -> FAIL ([i915#2346] / [i915#533])
>  * igt@kms_fbcon_fbt@fbc-suspend:shard-kbl: PASS -> INCOMPLETE ([i915#180] /
>    [i915#636])
>  * igt@kms_fbcon_fbt@psr-suspend:shard-skl: PASS -> INCOMPLETE ([i915#146] /
>    [i915#198])
>  * igt@kms_flip@flip-vs-expired-vblank-interruptible@b-hdmi-a2:shard-glk: PASS
>    -> FAIL ([i915#79]) +1 similar issue
>  * igt@kms_flip@flip-vs-expired-vblank@c-edp1:shard-skl: PASS -> FAIL
>    ([i915#79])
>  * igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile:shard-snb:
>    NOTRUN -> SKIP ([fdo#109271]) +383 similar issues
>  * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile:shard-skl: NOTRUN -
>    > INCOMPLETE ([i915#3699])
>  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-render:shard-
>    iclb: NOTRUN -> SKIP ([fdo#109280])
>  * igt@kms_hdr@bpc-switch:shard-skl: PASS -> FAIL ([i915#1188])
>  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:shard-apl: NOTRUN ->
>    SKIP ([fdo#109271] / [i915#533]) +1 similar issue
>  * igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d:shard-glk: NOTRUN ->
>    SKIP ([fdo#109271] / [i915#533])
>  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:shard-kbl: PASS -> DMESG-
>    WARN ([i915#180]) +4 similar issues
>  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d:shard-kbl: NOTRUN -> SKIP
>    ([fdo#109271] / [i915#533])
>  * igt@kms_plane@pixel-format-source-clamping@pipe-a-planes:shard-skl: NOTRUN
>    -> SKIP ([fdo#109271]) +100 similar issues
>  * igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:shard-skl: NOTRUN -> FAIL
>    ([fdo#108145] / [i915#265])
>  * igt@kms_plane_alpha_blend@pipe-b-alpha-7efc:shard-apl: NOTRUN -> FAIL
>    ([fdo#108145] / [i915#265])
>  * igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:shard-apl: NOTRUN ->
>    FAIL ([i915#265]) +1 similar issue
>  * igt@kms_plane_alpha_blend@pipe-c-alpha-basic:shard-glk: NOTRUN -> FAIL
>    ([fdo#108145] / [i915#265])
>  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:shard-skl: PASS -> FAIL
>    ([fdo#108145] / [i915#265]) +1 similar issue
>  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2:shard-apl: NOTRUN ->
>    SKIP ([fdo#109271] / [i915#658]) +4 similar issuesshard-skl: NOTRUN -> SKIP
>    ([fdo#109271] / [i915#658])
>  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4:shard-kbl: NOTRUN ->
>    SKIP ([fdo#109271] / [i915#658]) +2 similar issues
>  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-1:shard-glk: NOTRUN ->
>    SKIP ([fdo#109271] / [i915#658])
>  * igt@kms_psr@psr2_cursor_plane_move:shard-iclb: PASS -> SKIP ([fdo#109441])
>    +2 similar issues
>  * igt@kms_setmode@clone-exclusive-crtc:shard-skl: NOTRUN -> WARN
>    ([i915#2100])
>  * igt@perf@blocking:shard-skl: PASS -> FAIL ([i915#1542])
>  * igt@sysfs_clients@recycle:shard-apl: NOTRUN -> SKIP ([fdo#109271] /
>    [i915#2994]) +1 similar issueshard-skl: NOTRUN -> SKIP ([fdo#109271] /
>    [i915#2994])
>  * igt@sysfs_clients@recycle-many:shard-glk: NOTRUN -> SKIP ([fdo#109271] /
>    [i915#2994])
>  * igt@sysfs_clients@split-50:shard-kbl: NOTRUN -> SKIP ([fdo#109271] /
>    [i915#2994]) +2 similar issues
> Possible fixes * igt@gem_eio@in-flight-contexts-1us:shard-iclb: TIMEOUT ([i915#3070]) ->
>    PASS
>  * igt@gem_exec_fair@basic-flow@rcs0:shard-tglb: FAIL ([i915#2842]) -> PASS +2
>    similar issuesshard-glk: FAIL ([i915#2842]) -> PASS
>  * igt@gem_exec_fair@basic-none-rrul@rcs0:shard-iclb: FAIL ([i915#2842]) ->
>    PASS
>  * igt@gem_exec_fair@basic-pace-solo@rcs0:shard-kbl: FAIL ([i915#2842]) ->
>    PASS
>  * igt@gem_huc_copy@huc-copy:shard-tglb: SKIP ([i915#2190]) -> PASS
>  * igt@gen9_exec_parse@allowed-single:shard-skl: DMESG-WARN ([i915#1436] /
>    [i915#716]) -> PASS
>  * igt@i915_pm_dc@dc6-dpms:shard-iclb: FAIL ([i915#454]) -> PASS
>  * igt@i915_pm_rpm@system-suspend:shard-skl: INCOMPLETE ([i915#151]) -> PASS
>  * igt@kms_async_flips@alternate-sync-async-flip:shard-skl: FAIL ([i915#2521])
>    -> PASS
>  * igt@kms_big_fb@yf-tiled-16bpp-rotate-0:shard-glk: DMESG-WARN ([i915#118]) -
>    > PASS
>  * igt@kms_flip@flip-vs-expired-vblank@b-edp1:shard-skl: FAIL ([i915#79]) ->
>    PASS
>  * igt@kms_flip@plain-flip-fb-recreate@a-edp1:shard-skl: FAIL ([i915#2122]) ->
>    PASS
>  * igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes:shard-kbl:
>    DMESG-WARN ([i915#180]) -> PASS +5 similar issues
>  * igt@perf@polling-parameterized:shard-glk: FAIL ([i915#1542]) -> PASSshard-
>    skl: FAIL ([i915#1542]) -> PASS
> Warnings * igt@i915_pm_rc6_residency@rc6-idle:shard-iclb: WARN ([i915#2684]) -> WARN
>    ([i915#1804] / [i915#2684])
>  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-1:shard-iclb: SKIP
>    ([i915#2920]) -> SKIP ([i915#658]) +3 similar issues
>  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-2:shard-iclb: SKIP
>    ([i915#658]) -> SKIP ([i915#2920]) +1 similar issue
>  * igt@runner@aborted:shard-kbl: (FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL)
>    ([i915#1436] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363]) ->
>    (FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL) ([i915#180] /
>    [i915#1814] / [i915#3002] / [i915#3363] / [i915#92])shard-apl: (FAIL, FAIL,
>    FAIL) ([fdo#109271] / [i915#1814] / [i915#3002] / [i915#3363]) -> (FAIL,
>    FAIL, FAIL) ([i915#180] / [i915#1814] / [i915#3002] / [i915#3363])shard-
>    skl: ([FAIL][147], [FAIL][148], [FAIL][149], [FAIL][150]) ([i915#1436] /
>    [i915#2029] / [i915#3002] / [i915#3363]) -> ([FAIL][151], [FAIL][152]) ([i