diff mbox series

[v4-CI] drm/i915/psr: Force PSR probe only after full initialization

Message ID 20200221212635.11614-1-jose.souza@intel.com (mailing list archive)
State New, archived
Headers show
Series [v4-CI] drm/i915/psr: Force PSR probe only after full initialization | expand

Commit Message

Souza, Jose Feb. 21, 2020, 9:26 p.m. UTC
Commit 60c6a14b489b ("drm/i915/display: Force the state compute phase
once to enable PSR") was forcing the state compute too earlier
causing errors because not everything was initialized, so here
moving to the end of i915_driver_modeset_probe() when the display is
all initialized.

Also fixing the place where it disarm the force probe as during the
atomic check phase errors could happen like the ones due locking and
it would cause PSR to never be enabled if that happens.
Leaving the disarm to the atomic commit phase, intel_psr_enable() or
intel_psr_update() will be called even if the current state do not
allow PSR to be enabled.

v2: Check if intel_dp is null in intel_psr_force_mode_changed_set()
v3: Check intel_dp before get dev_priv
v4:
- renamed intel_psr_force_mode_changed_set() to
intel_psr_set_force_mode_changed()
- removed the set parameter from intel_psr_set_force_mode_changed()
- not calling intel_psr_set_force_mode_changed() from
intel_psr_enable/update(), directly setting it after the same checks
that intel_psr_set_force_mode_changed() does
- moved intel_psr_set_force_mode_changed() arm call to
i915_driver_modeset_probe() as it is a better for a PSR call, all the
functions calls happening between the old and the new function call
will cause issue

Fixes: 60c6a14b489b ("drm/i915/display: Force the state compute phase once to enable PSR")
Closes: https://gitlab.freedesktop.org/drm/intel/issues/1151
Tested-by: Ross Zwisler <zwisler@google.com>
Reported-by: Ross Zwisler <zwisler@google.com>
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---

Somehow Ross took over the patchwork of this patch and I can't re-test
this patch so sending it again.

 drivers/gpu/drm/i915/display/intel_psr.c | 25 ++++++++++++++++++++----
 drivers/gpu/drm/i915/display/intel_psr.h |  1 +
 drivers/gpu/drm/i915/i915_drv.c          |  3 +++
 drivers/gpu/drm/i915/i915_drv.h          |  2 +-
 4 files changed, 26 insertions(+), 5 deletions(-)

Comments

Souza, Jose Feb. 24, 2020, 6:53 p.m. UTC | #1
On Mon, 2020-02-24 at 15:02 +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915/psr: Force PSR probe only after full initialization
> (rev7)
> URL   : https://patchwork.freedesktop.org/series/73436/
> State : success
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_7984_full -> Patchwork_16671_full
> ====================================================
> 
> Summary
> -------
> 
>   **SUCCESS**
> 
>   No regressions found.

Pushed to dinq, thanks for the review GG.

> 
>   
> 
> Known issues
> ------------
> 
>   Here are the changes found in Patchwork_16671_full that come from
> known issues:
> 
> ### IGT changes ###
> 
> #### Issues hit ####
> 
>   * igt@gem_busy@busy-vcs1:
>     - shard-iclb:         [PASS][1] -> [SKIP][2] ([fdo#112080]) +8
> similar issues
>    [1]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb1/igt@gem_busy@busy-vcs1.html
>    [2]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb8/igt@gem_busy@busy-vcs1.html
> 
>   * igt@gem_exec_balancer@hang:
>     - shard-tglb:         [PASS][3] -> [FAIL][4] ([i915#1277])
>    [3]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-tglb6/igt@gem_exec_balancer@hang.html
>    [4]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-tglb6/igt@gem_exec_balancer@hang.html
> 
>   * igt@gem_exec_schedule@out-order-bsd2:
>     - shard-iclb:         [PASS][5] -> [SKIP][6] ([fdo#109276]) +16
> similar issues
>    [5]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb2/igt@gem_exec_schedule@out-order-bsd2.html
>    [6]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb6/igt@gem_exec_schedule@out-order-bsd2.html
> 
>   * igt@gem_exec_schedule@pi-userfault-bsd:
>     - shard-iclb:         [PASS][7] -> [SKIP][8] ([i915#677])
>    [7]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb3/igt@gem_exec_schedule@pi-userfault-bsd.html
>    [8]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb2/igt@gem_exec_schedule@pi-userfault-bsd.html
> 
>   * igt@gem_exec_schedule@reorder-wide-bsd:
>     - shard-iclb:         [PASS][9] -> [SKIP][10] ([fdo#112146]) +2
> similar issues
>    [9]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb3/igt@gem_exec_schedule@reorder-wide-bsd.html
>    [10]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb4/igt@gem_exec_schedule@reorder-wide-bsd.html
> 
>   * igt@gem_partial_pwrite_pread@writes-after-reads-uncached:
>     - shard-hsw:          [PASS][11] -> [FAIL][12] ([i915#694])
>    [11]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-hsw2/igt@gem_partial_pwrite_pread@writes-after-reads-uncached.html
>    [12]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-hsw8/igt@gem_partial_pwrite_pread@writes-after-reads-uncached.html
> 
>   * igt@gem_softpin@noreloc-s3:
>     - shard-apl:          [PASS][13] -> [DMESG-WARN][14] ([i915#180])
> +2 similar issues
>    [13]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-apl6/igt@gem_softpin@noreloc-s3.html
>    [14]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-apl4/igt@gem_softpin@noreloc-s3.html
> 
>   * igt@gem_tiled_partial_pwrite_pread@writes:
>     - shard-hsw:          [PASS][15] -> [FAIL][16] ([i915#817])
>    [15]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-hsw2/igt@gem_tiled_partial_pwrite_pread@writes.html
>    [16]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-hsw8/igt@gem_tiled_partial_pwrite_pread@writes.html
> 
>   * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
>     - shard-hsw:          [PASS][17] -> [FAIL][18] ([i915#96])
>    [17]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-hsw7/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic.html
>    [18]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-hsw6/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic.html
> 
>   * igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible:
>     - shard-glk:          [PASS][19] -> [FAIL][20] ([i915#34])
>    [19]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-glk8/igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible.html
>    [20]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-glk9/igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible.html
> 
>   * igt@kms
> _frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-mmap-cpu:
>     - shard-glk:          [PASS][21] -> [FAIL][22] ([i915#49])
>    [21]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-glk9/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-mmap-cpu.html
>    [22]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-glk8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-mmap-cpu.html
> 
>   * igt@kms_frontbuffer_tracking@fbc-suspend:
>     - shard-kbl:          [PASS][23] -> [DMESG-WARN][24] ([i915#180])
> +6 similar issues
>    [23]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-kbl3/igt@kms_frontbuffer_tracking@fbc-suspend.html
>    [24]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-kbl2/igt@kms_frontbuffer_tracking@fbc-suspend.html
> 
>   * igt@kms_psr@psr2_primary_mmap_cpu:
>     - shard-iclb:         [PASS][25] -> [SKIP][26] ([fdo#109441]) +3
> similar issues
>    [25]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
>    [26]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb8/igt@kms_psr@psr2_primary_mmap_cpu.html
> 
>   * igt@kms_setmode@basic:
>     - shard-skl:          [PASS][27] -> [FAIL][28] ([i915#31])
>    [27]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-skl7/igt@kms_setmode@basic.html
>    [28]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-skl2/igt@kms_setmode@basic.html
> 
>   * igt@prime_mmap_coherency@ioctl-errors:
>     - shard-hsw:          [PASS][29] -> [FAIL][30] ([i915#831])
>    [29]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-hsw7/igt@prime_mmap_coherency@ioctl-errors.html
>    [30]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-hsw2/igt@prime_mmap_coherency@ioctl-errors.html
> 
>   * igt@prime_mmap_coherency@read:
>     - shard-hsw:          [PASS][31] -> [FAIL][32] ([i915#914])
>    [31]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-hsw1/igt@prime_mmap_coherency@read.html
>    [32]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-hsw2/igt@prime_mmap_coherency@read.html
> 
>   * igt@sw_sync@sync_multi_producer_single_consumer:
>     - shard-snb:          [PASS][33] -> [TIMEOUT][34] ([fdo#112271])
>    [33]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-snb2/igt@sw_sync@sync_multi_producer_single_consumer.html
>    [34]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-snb1/igt@sw_sync@sync_multi_producer_single_consumer.html
>     - shard-iclb:         [PASS][35] -> [TIMEOUT][36] ([fdo#112271])
>    [35]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb2/igt@sw_sync@sync_multi_producer_single_consumer.html
>    [36]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb4/igt@sw_sync@sync_multi_producer_single_consumer.html
> 
>   
> #### Possible fixes ####
> 
>   * igt@gem_exec_balancer@smoke:
>     - shard-iclb:         [SKIP][37] ([fdo#110854]) -> [PASS][38]
>    [37]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb7/igt@gem_exec_balancer@smoke.html
>    [38]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb4/igt@gem_exec_balancer@smoke.html
> 
>   * igt@gem_exec_reuse@baggage:
>     - shard-apl:          [TIMEOUT][39] ([fdo#112271]) -> [PASS][40]
>    [39]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-apl7/igt@gem_exec_reuse@baggage.html
>    [40]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-apl1/igt@gem_exec_reuse@baggage.html
> 
>   * {igt@gem_exec_schedule@implicit-both-bsd2}:
>     - shard-iclb:         [SKIP][41] ([fdo#109276] / [i915#677]) ->
> [PASS][42]
>    [41]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb3/igt@gem_exec_schedule@implicit-both-bsd2.html
>    [42]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb4/igt@gem_exec_schedule@implicit-both-bsd2.html
> 
>   * igt@gem_exec_schedule@pi-shared-iova-bsd:
>     - shard-iclb:         [SKIP][43] ([i915#677]) -> [PASS][44]
>    [43]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb1/igt@gem_exec_schedule@pi-shared-iova-bsd.html
>    [44]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb8/igt@gem_exec_schedule@pi-shared-iova-bsd.html
> 
>   * igt@gem_exec_schedule@preempt-other-chain-bsd:
>     - shard-iclb:         [SKIP][45] ([fdo#112146]) -> [PASS][46] +7
> similar issues
>    [45]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb2/igt@gem_exec_schedule@preempt-other-chain-bsd.html
>    [46]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb8/igt@gem_exec_schedule@preempt-other-chain-bsd.html
> 
>   * igt@gem_ppgtt@flink-and-close-vma-leak:
>     - shard-skl:          [FAIL][47] ([i915#644]) -> [PASS][48]
>    [47]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-skl6/igt@gem_ppgtt@flink-and-close-vma-leak.html
>    [48]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-skl5/igt@gem_ppgtt@flink-and-close-vma-leak.html
> 
>   * igt@gem_pwrite@huge-cpu-fbr:
>     - shard-hsw:          [TIMEOUT][49] ([fdo#112271]) -> [PASS][50]
>    [49]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-hsw5/igt@gem_pwrite@huge-cpu-fbr.html
>    [50]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-hsw4/igt@gem_pwrite@huge-cpu-fbr.html
> 
>   * igt@gem_userptr_blits@unsync-unmap-cycles:
>     - shard-glk:          [FAIL][51] -> [PASS][52]
>    [51]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-glk4/igt@gem_userptr_blits@unsync-unmap-cycles.html
>    [52]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-glk2/igt@gem_userptr_blits@unsync-unmap-cycles.html
> 
>   * igt@gen7_exec_parse@basic-offset:
>     - shard-hsw:          [FAIL][53] ([i915#694]) -> [PASS][54] +2
> similar issues
>    [53]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-hsw4/igt@gen7_exec_parse@basic-offset.html
>    [54]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-hsw4/igt@gen7_exec_parse@basic-offset.html
> 
>   * igt@i915_pm_dc@dc5-dpms:
>     - shard-iclb:         [FAIL][55] ([i915#447]) -> [PASS][56]
>    [55]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb3/igt@i915_pm_dc@dc5-dpms.html
>    [56]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb4/igt@i915_pm_dc@dc5-dpms.html
> 
>   * igt@i915_selftest@mock_buddy:
>     - shard-skl:          [INCOMPLETE][57] -> [PASS][58]
>    [57]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-skl3/igt@i915_selftest@mock_buddy.html
>    [58]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-skl10/igt@i915_selftest@mock_buddy.html
> 
>   * igt@kms_cursor_crc@pipe-c-cursor-suspend:
>     - shard-kbl:          [DMESG-WARN][59] ([i915#180]) -> [PASS][60]
> +3 similar issues
>    [59]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-kbl3/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
>    [60]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-kbl2/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
> 
>   * igt@kms_flip@2x-blocking-absolute-wf_vblank-interruptible:
>     - shard-hsw:          [INCOMPLETE][61] ([CI#80] / [i915#61]) ->
> [PASS][62]
>    [61]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-hsw7/igt@kms_flip@2x-blocking-absolute-wf_vblank-interruptible.html
>    [62]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-hsw6/igt@kms_flip@2x-blocking-absolute-wf_vblank-interruptible.html
> 
>   * igt@kms_flip@flip-vs-expired-vblank:
>     - shard-glk:          [FAIL][63] ([i915#79]) -> [PASS][64] +1
> similar issue
>    [63]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-glk6/igt@kms_flip@flip-vs-expired-vblank.html
>    [64]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-glk5/igt@kms_flip@flip-vs-expired-vblank.html
> 
>   * igt@kms_flip@flip-vs-suspend-interruptible:
>     - shard-apl:          [DMESG-WARN][65] ([i915#180]) -> [PASS][66]
> +2 similar issues
>    [65]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-apl6/igt@kms_flip@flip-vs-suspend-interruptible.html
>    [66]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-apl4/igt@kms_flip@flip-vs-suspend-interruptible.html
> 
>   * igt@kms_flip@plain-flip-ts-check-interruptible:
>     - shard-glk:          [FAIL][67] ([i915#34]) -> [PASS][68]
>    [67]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-glk5/igt@kms_flip@plain-flip-ts-check-interruptible.html
>    [68]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-glk6/igt@kms_flip@plain-flip-ts-check-interruptible.html
> 
>   * {igt@kms_hdr@bpc-switch}:
>     - shard-skl:          [FAIL][69] ([i915#1188]) -> [PASS][70]
>    [69]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-skl6/igt@kms_hdr@bpc-switch.html
>    [70]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-skl5/igt@kms_hdr@bpc-switch.html
> 
>   * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
>     - shard-skl:          [INCOMPLETE][71] ([i915#69]) -> [PASS][72]
> +1 similar issue
>    [71]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-skl2/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html
>    [72]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-skl3/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html
> 
>   * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
>     - shard-skl:          [FAIL][73] ([fdo#108145]) -> [PASS][74] +1
> similar issue
>    [73]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-skl1/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
>    [74]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-skl2/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
> 
>   * igt@kms_psr@psr2_cursor_blt:
>     - shard-iclb:         [SKIP][75] ([fdo#109441]) -> [PASS][76] +1
> similar issue
>    [75]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb4/igt@kms_psr@psr2_cursor_blt.html
>    [76]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
> 
>   * igt@kms_psr@psr2_primary_mmap_gtt:
>     - shard-tglb:         [SKIP][77] ([i915#668]) -> [PASS][78] +2
> similar issues
>    [77]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-tglb5/igt@kms_psr@psr2_primary_mmap_gtt.html
>    [78]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-tglb7/igt@kms_psr@psr2_primary_mmap_gtt.html
> 
>   * igt@perf_pmu@busy-accuracy-98-vcs1:
>     - shard-iclb:         [SKIP][79] ([fdo#112080]) -> [PASS][80] +9
> similar issues
>    [79]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb8/igt@perf_pmu@busy-accuracy-98-vcs1.html
>    [80]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb2/igt@perf_pmu@busy-accuracy-98-vcs1.html
> 
>   * igt@prime_busy@hang-bsd2:
>     - shard-iclb:         [SKIP][81] ([fdo#109276]) -> [PASS][82] +18
> similar issues
>    [81]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb8/igt@prime_busy@hang-bsd2.html
>    [82]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb2/igt@prime_busy@hang-bsd2.html
> 
>   * igt@sw_sync@sync_multi_producer_single_consumer:
>     - shard-glk:          [TIMEOUT][83] ([fdo#112271]) -> [PASS][84]
>    [83]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-glk9/igt@sw_sync@sync_multi_producer_single_consumer.html
>    [84]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-glk3/igt@sw_sync@sync_multi_producer_single_consumer.html
> 
>   
> #### Warnings ####
> 
>   * igt@gem_ctx_isolation@vcs1-nonpriv-switch:
>     - shard-iclb:         [SKIP][85] ([fdo#112080]) -> [FAIL][86]
> ([IGT#28])
>    [85]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-iclb3/igt@gem_ctx_isolation@vcs1-nonpriv-switch.html
>    [86]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-iclb4/igt@gem_ctx_isolation@vcs1-nonpriv-switch.html
> 
>   * igt@gem_tiled_blits@normal:
>     - shard-hsw:          [FAIL][87] ([i915#694]) -> [FAIL][88]
> ([i915#818]) +1 similar issue
>    [87]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-hsw2/igt@gem_tiled_blits@normal.html
>    [88]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-hsw8/igt@gem_tiled_blits@normal.html
> 
>   * igt@kms_content_protection@lic:
>     - shard-kbl:          [TIMEOUT][89] ([fdo#112271]) ->
> [TIMEOUT][90] ([fdo#112271] / [i915#727])
>    [89]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/shard-kbl1/igt@kms_content_protection@lic.html
>    [90]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/shard-kbl6/igt@kms_content_protection@lic.html
> 
>   
>   {name}: This element is suppressed. This means it is ignored when
> computing
>           the status of the difference (SUCCESS, WARNING, or
> FAILURE).
> 
>   [CI#80]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/80
>   [IGT#28]: 
> https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/28
>   [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
>   [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
>   [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
>   [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
>   [fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
>   [fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
>   [fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
>   [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
>   [i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
>   [i915#1277]: https://gitlab.freedesktop.org/drm/intel/issues/1277
>   [i915#1291]: https://gitlab.freedesktop.org/drm/intel/issues/1291
>   [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
>   [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
>   [i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
>   [i915#447]: https://gitlab.freedesktop.org/drm/intel/issues/447
>   [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
>   [i915#58]: https://gitlab.freedesktop.org/drm/intel/issues/58
>   [i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
>   [i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
>   [i915#668]: https://gitlab.freedesktop.org/drm/intel/issues/668
>   [i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
>   [i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
>   [i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
>   [i915#727]: https://gitlab.freedesktop.org/drm/intel/issues/727
>   [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
>   [i915#817]: https://gitlab.freedesktop.org/drm/intel/issues/817
>   [i915#818]: https://gitlab.freedesktop.org/drm/intel/issues/818
>   [i915#831]: https://gitlab.freedesktop.org/drm/intel/issues/831
>   [i915#914]: https://gitlab.freedesktop.org/drm/intel/issues/914
>   [i915#96]: https://gitlab.freedesktop.org/drm/intel/issues/96
>   [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
> 
> 
> Participating hosts (10 -> 10)
> ------------------------------
> 
>   No changes in participating hosts
> 
> 
> Build changes
> -------------
> 
>   * CI: CI-20190529 -> None
>   * Linux: CI_DRM_7984 -> Patchwork_16671
> 
>   CI-20190529: 20190529
>   CI_DRM_7984: ab1d770e389d9407be633b5afbe6859e0072ca9d @
> git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_5458: 5f7e4ae6a91ed2c104593b8abd5b71a6cc96fc10 @
> git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
>   Patchwork_16671: 1dbd3a40747add80a094e3d88fd5988524917e7f @
> 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_16671/index.html
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula Feb. 27, 2020, 1:18 p.m. UTC | #2
On Fri, 21 Feb 2020, José Roberto de Souza <jose.souza@intel.com> wrote:
> Commit 60c6a14b489b ("drm/i915/display: Force the state compute phase
> once to enable PSR") was forcing the state compute too earlier
> causing errors because not everything was initialized, so here
> moving to the end of i915_driver_modeset_probe() when the display is
> all initialized.

Hmph, really not happy about the placement here. These are high level
functions, not a dumping ground for random feature specific hacks. :(

BR,
Jani.
Ross Zwisler Feb. 27, 2020, 4:43 p.m. UTC | #3
On Thu, Feb 27, 2020 at 03:18:26PM +0200, Jani Nikula wrote:
> On Fri, 21 Feb 2020, José Roberto de Souza <jose.souza@intel.com> wrote:
> > Commit 60c6a14b489b ("drm/i915/display: Force the state compute phase
> > once to enable PSR") was forcing the state compute too earlier
> > causing errors because not everything was initialized, so here
> > moving to the end of i915_driver_modeset_probe() when the display is
> > all initialized.
> 
> Hmph, really not happy about the placement here. These are high level
> functions, not a dumping ground for random feature specific hacks. :(

Should we just revert 

60c6a14b489b ("drm/i915/display: Force the state compute phase once to enable PSR")

and try to land a fixed-up version in the next kernel cycle?  The current
state is that my machine is completely unable to boot because of this issue,
and I've confirmed that the above patch reverts cleanly and fixes the issue.
Jani Nikula Feb. 27, 2020, 4:59 p.m. UTC | #4
On Thu, 27 Feb 2020, Ross Zwisler <zwisler@google.com> wrote:
> On Thu, Feb 27, 2020 at 03:18:26PM +0200, Jani Nikula wrote:
>> On Fri, 21 Feb 2020, José Roberto de Souza <jose.souza@intel.com> wrote:
>> > Commit 60c6a14b489b ("drm/i915/display: Force the state compute phase
>> > once to enable PSR") was forcing the state compute too earlier
>> > causing errors because not everything was initialized, so here
>> > moving to the end of i915_driver_modeset_probe() when the display is
>> > all initialized.
>> 
>> Hmph, really not happy about the placement here. These are high level
>> functions, not a dumping ground for random feature specific hacks. :(
>
> Should we just revert 
>
> 60c6a14b489b ("drm/i915/display: Force the state compute phase once to enable PSR")
>
> and try to land a fixed-up version in the next kernel cycle?  The current
> state is that my machine is completely unable to boot because of this issue,
> and I've confirmed that the above patch reverts cleanly and fixes the issue.

IIUC this patch, already committed as df1a5bfc16f3 ("drm/i915/psr: Force
PSR probe only after full initialization"), fixes the issue for you. At
least the Tested-by says so. ;) So we should just go with that.

I'm just being grumpy about the aesthetics of the implementation. I've
already incorporated some cleanup to this in an existing refactoring I
had [1].

BR,
Jani.


[1] http://patchwork.freedesktop.org/patch/msgid/20200227135839.12912-1-jani.nikula@intel.com
Ross Zwisler Feb. 27, 2020, 5:54 p.m. UTC | #5
On Thu, Feb 27, 2020 at 06:59:42PM +0200, Jani Nikula wrote:
> On Thu, 27 Feb 2020, Ross Zwisler <zwisler@google.com> wrote:
> > On Thu, Feb 27, 2020 at 03:18:26PM +0200, Jani Nikula wrote:
> >> On Fri, 21 Feb 2020, José Roberto de Souza <jose.souza@intel.com> wrote:
> >> > Commit 60c6a14b489b ("drm/i915/display: Force the state compute phase
> >> > once to enable PSR") was forcing the state compute too earlier
> >> > causing errors because not everything was initialized, so here
> >> > moving to the end of i915_driver_modeset_probe() when the display is
> >> > all initialized.
> >> 
> >> Hmph, really not happy about the placement here. These are high level
> >> functions, not a dumping ground for random feature specific hacks. :(
> >
> > Should we just revert 
> >
> > 60c6a14b489b ("drm/i915/display: Force the state compute phase once to enable PSR")
> >
> > and try to land a fixed-up version in the next kernel cycle?  The current
> > state is that my machine is completely unable to boot because of this issue,
> > and I've confirmed that the above patch reverts cleanly and fixes the issue.
> 
> IIUC this patch, already committed as df1a5bfc16f3 ("drm/i915/psr: Force
> PSR probe only after full initialization"), fixes the issue for you. At
> least the Tested-by says so. ;) So we should just go with that.
> 
> I'm just being grumpy about the aesthetics of the implementation. I've
> already incorporated some cleanup to this in an existing refactoring I
> had [1].

Ah, sounds good.   Sorry, I thought the fix hadn't been committed yet. :)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index b4942b6445ae..7e754201f54d 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -936,10 +936,12 @@  void intel_psr_enable(struct intel_dp *intel_dp,
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
 
-	if (!crtc_state->has_psr)
+	if (!CAN_PSR(dev_priv) || dev_priv->psr.dp != intel_dp)
 		return;
 
-	if (drm_WARN_ON(&dev_priv->drm, !CAN_PSR(dev_priv)))
+	dev_priv->psr.force_mode_changed = false;
+
+	if (!crtc_state->has_psr)
 		return;
 
 	drm_WARN_ON(&dev_priv->drm, dev_priv->drrs.dp);
@@ -1099,6 +1101,8 @@  void intel_psr_update(struct intel_dp *intel_dp,
 	if (!CAN_PSR(dev_priv) || READ_ONCE(psr->dp) != intel_dp)
 		return;
 
+	dev_priv->psr.force_mode_changed = false;
+
 	mutex_lock(&dev_priv->psr.lock);
 
 	enable = crtc_state->has_psr && psr_global_enabled(dev_priv);
@@ -1629,7 +1633,7 @@  void intel_psr_atomic_check(struct drm_connector *connector,
 	struct drm_crtc_state *crtc_state;
 
 	if (!CAN_PSR(dev_priv) || !new_state->crtc ||
-	    dev_priv->psr.initially_probed)
+	    !dev_priv->psr.force_mode_changed)
 		return;
 
 	intel_connector = to_intel_connector(connector);
@@ -1640,5 +1644,18 @@  void intel_psr_atomic_check(struct drm_connector *connector,
 	crtc_state = drm_atomic_get_new_crtc_state(new_state->state,
 						   new_state->crtc);
 	crtc_state->mode_changed = true;
-	dev_priv->psr.initially_probed = true;
+}
+
+void intel_psr_set_force_mode_changed(struct intel_dp *intel_dp)
+{
+	struct drm_i915_private *dev_priv;
+
+	if (!intel_dp)
+		return;
+
+	dev_priv = dp_to_i915(intel_dp);
+	if (!CAN_PSR(dev_priv) || intel_dp != dev_priv->psr.dp)
+		return;
+
+	dev_priv->psr.force_mode_changed = true;
 }
diff --git a/drivers/gpu/drm/i915/display/intel_psr.h b/drivers/gpu/drm/i915/display/intel_psr.h
index c58a1d438808..274fc6bb6221 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.h
+++ b/drivers/gpu/drm/i915/display/intel_psr.h
@@ -40,5 +40,6 @@  bool intel_psr_enabled(struct intel_dp *intel_dp);
 void intel_psr_atomic_check(struct drm_connector *connector,
 			    struct drm_connector_state *old_state,
 			    struct drm_connector_state *new_state);
+void intel_psr_set_force_mode_changed(struct intel_dp *intel_dp);
 
 #endif /* __INTEL_PSR_H__ */
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 759d333448e1..066934327345 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -58,6 +58,7 @@ 
 #include "display/intel_hotplug.h"
 #include "display/intel_overlay.h"
 #include "display/intel_pipe_crc.h"
+#include "display/intel_psr.h"
 #include "display/intel_sprite.h"
 #include "display/intel_vga.h"
 
@@ -264,6 +265,8 @@  static int i915_driver_modeset_probe(struct drm_i915_private *i915)
 
 	intel_init_ipc(i915);
 
+	intel_psr_set_force_mode_changed(i915->psr.dp);
+
 	return 0;
 
 cleanup_gem:
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 4305ccc4c683..2b741b352ce0 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -505,7 +505,7 @@  struct i915_psr {
 	bool dc3co_enabled;
 	u32 dc3co_exit_delay;
 	struct delayed_work dc3co_work;
-	bool initially_probed;
+	bool force_mode_changed;
 };
 
 #define QUIRK_LVDS_SSC_DISABLE (1<<1)