mbox series

[v3,00/25] drm/i915: Improve BW management on shared display links

Message ID 20230914192659.757475-1-imre.deak@intel.com (mailing list archive)
Headers show
Series drm/i915: Improve BW management on shared display links | expand

Message

Imre Deak Sept. 14, 2023, 7:26 p.m. UTC
This is v3 of [1] addressing the review comments, adding R-bs
and the following changes based on further testing / offline
discussions:

- Return -ENOSPC to userspace in case of a link BW limit
  failure. (Patch 9, thanks to Karthik B S for the related IGT
  testing)
- Replace fractional bpp fix with a patch from Ville. (Patch 12)
- Disable DSC PPS SDP during output disabling. (Patch 20, Ville)

[1] https://lore.kernel.org/intel-gfx/20230824080517.693621-1-imre.deak@intel.com

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Luca Coelho <luciano.coelho@intel.com>

Imre Deak (24):
  drm/i915/dp: Factor out helpers to compute the link limits
  drm/i915/dp: Track the pipe and link bpp limits separately
  drm/i915/dp: Skip computing a non-DSC link config if DSC is needed
  drm/i915/dp: Update the link bpp limits for DSC mode
  drm/i915/dp: Limit the output link bpp in DSC mode
  drm/i915: Add helper to modeset a set of pipes
  drm/i915: During modeset forcing handle inactive but enabled pipes
  drm/i915: Factor out a helper to check/compute all the CRTC states
  drm/i915: Add helpers for BW management on shared display links
  drm/i915/fdi: Improve FDI BW sharing between pipe B and C
  drm/i915/fdi: Recompute state for affected CRTCs on FDI links
  drm/dp_mst: Add a way to calculate PBN values with FEC overhead
  drm/dp_mst: Add helper to determine if an MST port is downstream of
    another port
  drm/dp_mst: Factor out a helper to check the atomic state of a
    topology manager
  drm/dp_mst: Swap the order of checking root vs. non-root port BW
    limitations
  drm/i915/dp_mst: Fix PBN calculation with FEC overhead
  drm/i915/dp_mst: Add atomic state for all streams on pre-tgl platforms
  drm/i915/dp_mst: Program the DSC PPS SDP for each stream
  drm/i915/dp: Make sure the DSC PPS SDP is disabled whenever DSC is
    disabled
  drm/i915/dp_mst: Enable DSC decompression if any stream needs this
  drm/i915/dp_mst: Add missing DSC compression disabling
  drm/i915/dp_mst: Allow DSC only for sink ports of the first branch
    device
  drm/i915/dp_mst: Improve BW sharing between MST streams
  drm/i915/dp_mst: Check BW limitations only after all streams are
    computed

Ville Syrjälä (1):
  drm/dp_mst: Fix fractional DSC bpp handling

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
 .../display/amdgpu_dm/amdgpu_dm_mst_types.c   |   2 +-
 drivers/gpu/drm/display/drm_dp_mst_topology.c | 181 ++++++++---
 drivers/gpu/drm/i915/Makefile                 |   1 +
 drivers/gpu/drm/i915/display/g4x_hdmi.c       |   6 +-
 drivers/gpu/drm/i915/display/intel_cdclk.c    |   2 +-
 drivers/gpu/drm/i915/display/intel_crt.c      |   7 +
 drivers/gpu/drm/i915/display/intel_crtc.c     |   1 +
 drivers/gpu/drm/i915/display/intel_ddi.c      |  12 +-
 drivers/gpu/drm/i915/display/intel_display.c  | 203 +++++++++----
 drivers/gpu/drm/i915/display/intel_display.h  |   6 +-
 .../drm/i915/display/intel_display_types.h    |  26 +-
 drivers/gpu/drm/i915/display/intel_dp.c       | 196 +++++++++---
 drivers/gpu/drm/i915/display/intel_dp.h       |  17 +-
 drivers/gpu/drm/i915/display/intel_dp_mst.c   | 287 +++++++++++++++---
 drivers/gpu/drm/i915/display/intel_dp_mst.h   |   3 +
 drivers/gpu/drm/i915/display/intel_fdi.c      | 140 +++++++--
 drivers/gpu/drm/i915/display/intel_fdi.h      |   5 +
 drivers/gpu/drm/i915/display/intel_link_bw.c  | 244 +++++++++++++++
 drivers/gpu/drm/i915/display/intel_link_bw.h  |  39 +++
 drivers/gpu/drm/i915/display/intel_lvds.c     |  10 +-
 drivers/gpu/drm/i915/display/intel_sdvo.c     |  10 +-
 drivers/gpu/drm/i915/display/skl_watermark.c  |   2 +-
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |   3 +-
 .../gpu/drm/tests/drm_dp_mst_helper_test.c    |  19 +-
 include/drm/display/drm_dp_mst_helper.h       |   9 +-
 26 files changed, 1203 insertions(+), 230 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/intel_link_bw.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_link_bw.h

Comments

Imre Deak Sept. 19, 2023, 1:29 p.m. UTC | #1
On Tue, Sep 19, 2023 at 11:55:30AM +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Improve BW management on shared display links (rev10)
> URL   : https://patchwork.freedesktop.org/series/122589/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_13651 -> Patchwork_122589v10
> ====================================================
> 
> Summary
> -------
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with Patchwork_122589v10 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_122589v10, please notify your bug team (lgci.bug.filing@intel.com) 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_122589v10/index.html
> 
> Participating hosts (38 -> 37)
> ------------------------------
> 
>   Additional (2): fi-kbl-soraka bat-rpls-2 
>   Missing    (3): fi-tgl-1115g4 bat-atsm-1 fi-snb-2520m 
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in Patchwork_122589v10:
> 
> ### IGT changes ###
> 
> #### Possible regressions ####
> 
>   * igt@i915_module_load@load:
>     - bat-mtlp-8:         [PASS][1] -> [INCOMPLETE][2]
>    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/bat-mtlp-8/igt@i915_module_load@load.html
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122589v10/bat-mtlp-8/igt@i915_module_load@load.html

Looks like an issue in 
intel_crtc_initial_plane_config() -> intel_plane_disable_noatomic()

which has been happening on different mtlp machines, recently in
CI_DRM_13651 / re-mtlp-7. I opened a ticket for it:
https://gitlab.freedesktop.org/drm/intel/-/issues/9366

>   * igt@runner@aborted:
>     - bat-rpls-2:         NOTRUN -> [FAIL][3]
>    [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122589v10/bat-rpls-2/igt@runner@aborted.html

This is an issue unrelated to i915, happening before loading the driver:

6>[   12.711379] pcieport 0000:00:1d.0:   bridge window [mem 0x6001000000-0x60019fffff 64bit pref]

<4>[   12.715089] ======================================================
<4>[   12.721385] WARNING: possible circular locking dependency detected
<4>[   12.727676] 6.6.0-rc2-Patchwork_122589v10-g61b71c3f061a+ #1 Not tainted
<4>[   12.734394] ------------------------------------------------------
<4>[   12.740680] irq/123-pciehp/150 is trying to acquire lock:
<4>[   12.746193] ffff888105adc2f8 (&ctrl->reset_lock){.+.+}-{3:3}, at: pciehp_configure_device+0xb5/0x160
<4>[   12.755573]
                  but task is already holding lock:
<4>[   12.761693] ffffffff827aeb68 (pci_rescan_remove_lock){+.+.}-{3:3}, at: pciehp_configure_device+0x23/0x160

> Known issues
> ------------
> 
>   Here are the changes found in Patchwork_122589v10 that come from known issues:
> 
> ### CI changes ###
> 
> #### Issues hit ####
> 
>   * boot:
>     - fi-hsw-4770:        [PASS][4] -> [FAIL][5] ([i915#8293])
>    [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/fi-hsw-4770/boot.html
>    [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122589v10/fi-hsw-4770/boot.html
> 
>   
> 
> ### IGT changes ###
> 
> #### Issues hit ####
> 
>   * igt@gem_huc_copy@huc-copy:
>     - fi-kbl-soraka:      NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#2190])
>    [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122589v10/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html
> 
>   * igt@gem_lmem_swapping@basic:
>     - fi-kbl-soraka:      NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#4613]) +3 other tests skip
>    [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122589v10/fi-kbl-soraka/igt@gem_lmem_swapping@basic.html
> 
>   * igt@i915_selftest@live@gt_pm:
>     - fi-kbl-soraka:      NOTRUN -> [DMESG-FAIL][8] ([i915#1886] / [i915#7913])
>    [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122589v10/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
> 
>   * igt@kms_dsc@dsc-basic:
>     - fi-kbl-soraka:      NOTRUN -> [SKIP][9] ([fdo#109271]) +9 other tests skip
>    [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122589v10/fi-kbl-soraka/igt@kms_dsc@dsc-basic.html
> 
>   
> #### Possible fixes ####
> 
>   * igt@i915_selftest@live@execlists:
>     - fi-bsw-n3050:       [ABORT][10] ([i915#7913]) -> [PASS][11]
>    [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/fi-bsw-n3050/igt@i915_selftest@live@execlists.html
>    [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122589v10/fi-bsw-n3050/igt@i915_selftest@live@execlists.html
> 
>   * igt@kms_chamelium_edid@hdmi-edid-read:
>     - {bat-dg2-13}:       [DMESG-WARN][12] ([i915#7952]) -> [PASS][13]
>    [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/bat-dg2-13/igt@kms_chamelium_edid@hdmi-edid-read.html
>    [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122589v10/bat-dg2-13/igt@kms_chamelium_edid@hdmi-edid-read.html
> 
>   * igt@kms_hdmi_inject@inject-audio:
>     - fi-kbl-guc:         [FAIL][14] ([IGT#3] / [i915#6121]) -> [PASS][15]
>    [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/fi-kbl-guc/igt@kms_hdmi_inject@inject-audio.html
>    [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122589v10/fi-kbl-guc/igt@kms_hdmi_inject@inject-audio.html
> 
>   
>   {name}: This element is suppressed. This means it is ignored when computing
>           the status of the difference (SUCCESS, WARNING, or FAILURE).
> 
>   [IGT#3]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/3
>   [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
>   [i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
>   [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
>   [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
>   [i915#6121]: https://gitlab.freedesktop.org/drm/intel/issues/6121
>   [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
>   [i915#7952]: https://gitlab.freedesktop.org/drm/intel/issues/7952
>   [i915#8293]: https://gitlab.freedesktop.org/drm/intel/issues/8293
> 
> 
> Build changes
> -------------
> 
>   * Linux: CI_DRM_13651 -> Patchwork_122589v10
> 
>   CI-20190529: 20190529
>   CI_DRM_13651: 61b71c3f061a44a6ab1dcf756918886aa03a5480 @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_7493: 2517e42d612e0c1ca096acf8b5f6177f7ef4bce7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
>   Patchwork_122589v10: 61b71c3f061a44a6ab1dcf756918886aa03a5480 @ git://anongit.freedesktop.org/gfx-ci/linux
> 
> 
> ### Linux commits
> 
> 083e3c934233 drm/i915/dp_mst: Check BW limitations only after all streams are computed
> 981a0f4e3e4c drm/i915/dp_mst: Improve BW sharing between MST streams
> 56ef0e4b6625 drm/i915/dp_mst: Allow DSC only for sink ports of the first branch device
> d6dd87fac678 drm/i915/dp_mst: Add missing DSC compression disabling
> 1a32e08efe98 drm/i915/dp_mst: Enable DSC decompression if any stream needs this
> 6cc7e9ed99c7 drm/i915/dp: Make sure the DSC PPS SDP is disabled whenever DSC is disabled
> 11fc2f2b8219 drm/i915/dp_mst: Program the DSC PPS SDP for each stream
> 1ae3523042c4 drm/i915/dp_mst: Add atomic state for all streams on pre-tgl platforms
> a0ef3c0a67ac drm/i915/dp_mst: Fix PBN calculation with FEC overhead
> cbeff948d039 drm/dp_mst: Swap the order of checking root vs. non-root port BW limitations
> 53b98fbfae49 drm/dp_mst: Factor out a helper to check the atomic state of a topology manager
> 08dccb8ead0c drm/dp_mst: Add helper to determine if an MST port is downstream of another port
> 9ce658a8cf6c drm/dp_mst: Add a way to calculate PBN values with FEC overhead
> 0a1f353ad215 drm/dp_mst: Fix fractional DSC bpp handling
> ff78e7f980c5 drm/i915/fdi: Recompute state for affected CRTCs on FDI links
> 94262c175ffd drm/i915/fdi: Improve FDI BW sharing between pipe B and C
> bfb10a7239d1 drm/i915: Add helpers for BW management on shared display links
> 0899c01543f4 drm/i915: Factor out a helper to check/compute all the CRTC states
> 81ea58177388 drm/i915: Rename intel_modeset_all_pipes() to intel_modeset_all_pipes_late()
> f3bc271dbb8b drm/i915: Add helper to modeset a set of pipes
> 45a2fb673630 drm/i915/dp: Limit the output link bpp in DSC mode
> a14f3e77aa9f drm/i915/dp: Update the link bpp limits for DSC mode
> 7b7d3300dc14 drm/i915/dp: Skip computing a non-DSC link config if DSC is needed
> 94fc9fc20497 drm/i915/dp: Track the pipe and link bpp limits separately
> 33e00687bb18 drm/i915/dp: Factor out helpers to compute the link limits
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122589v10/index.html