This is v2 of the third part of patchset [1], unifying the link configuration selection logic used during modeset state computation and link training fallback selection, while also adding the corresponding KUnit tests. This constitutes patches 58–108 of [1] and, once merged, completes the original patchset. Due to the simplifications introduced in this version explained below, several patches from the original patchset have been dropped.
The patchset is based on the already merged first [2] and second [3] part of patchset [1]. For the rationale of this patchset, please refer to the parts related to link configuration selection in the cover letter of [1]. This v2 patchset version has the following changes: - Track the state of link config iteration in an iteration object. (Jani) - Use an opaque filter object for filtering the iterated configurations instead of exposing configuration indices via the API. (Jani) - Remove all parts of the API accepting or returning a configuration index or position. (Jani) - Use the config iterator for fallback selection. (Jani) - Remove the change to track link configurations via a virtual indexing scheme. (Ville) - Remove the functionality to merge new link configurations for a connected sink changing its capabilities, allowed by patchset [4] already merged. (Ville) - Use the max BW link configuration during mode validation and TBT BW computation, instead of using the max link limits for these. Cc: Jani Nikula <[email protected]> Cc: Ville Syrjälä <[email protected]> [1] https://lore.kernel.org/all/[email protected] [2] https://lore.kernel.org/all/[email protected] [3] https://lore.kernel.org/all/[email protected] [4] https://lore.kernel.org/all/[email protected] Imre Deak (34): drm/i915/doc: Document DP link capabilities drm/i915/dp_link_caps: Factor out helper to get link config by index drm/i915/dp_link_caps: Add support for link rate, lane count iteration orders drm/i915/dp_link_caps: Add link configuration iterator drm/i915/dp_link_caps: Add helper to get iteration order for a connector drm/i915/dp_link_caps: Validate max link limits drm/i915/dp_link_caps: Add filter for enabled link configurations drm/i915/dp_link_caps: Re-enable link configurations after a link reset drm/i915/dp_link_caps: Re-enable link configurations after sink caps change drm/i915/dp_link_caps: Drop noupdate postfix from max link limit set helpers drm/i915/dp_link_caps: Add debugfs entry showing allowed configurations drm/i915/dp: Add link configuration filter for modeset computation drm/i915/dp_link_caps: Add helper to query max BW link configuration drm/i915/dp: Query max BW config via link_caps during mode validation drm/i915/dp_tunnel: Query max BW config via link_caps for BW computation drm/i915/dp_test: Use link caps for compliance link configs drm/i915/dp: Iterate configurations via link_caps for SST non-DSC drm/i915/dp: Iterate configurations via link_caps for SST DSC drm/i915/dp: Use link caps for eDP DSC config selection drm/i915/dp_mst: Use link caps for non-DSC config selection drm/i915/dp_mst: Use link caps for MST DSC config selection drm/i915/dp: Remove min/max link config limits drm/i915/dp_link_training: Reset the max link limits in the fallback code drm/i915/dp_link_training: Use config iterator for fallback drm/i915/dp_link_training: Disable failed config during fallback drm/i915/kunit: Enable KUnit tests drm/i915/kunit: Add DP link test stub drm/xe/kunit: Add display test config drm/xe/kunit: Build DP link display tests drm/i915/kunit: Setup DP link test context drm/i915/kunit: Export link training and caps funcs for testing drm/i915/kunit: DP link: add baseline fixed table reference test drm/i915/kunit: DP link: add update config tests drm/i915/kunit: DP link: add fallback tests .../intel-display/dp-link-capabilities.rst | 11 + Documentation/gpu/intel-display/index.rst | 1 + drivers/gpu/drm/i915/.kunitconfig | 12 + drivers/gpu/drm/i915/Kconfig.debug | 12 + drivers/gpu/drm/i915/Makefile | 2 + drivers/gpu/drm/i915/display/intel_dp.c | 291 ++-- drivers/gpu/drm/i915/display/intel_dp.h | 11 +- .../gpu/drm/i915/display/intel_dp_link_caps.c | 759 ++++++++- .../gpu/drm/i915/display/intel_dp_link_caps.h | 172 +- .../drm/i915/display/intel_dp_link_training.c | 237 +-- .../drm/i915/display/intel_dp_link_training.h | 31 + drivers/gpu/drm/i915/display/intel_dp_mst.c | 72 +- drivers/gpu/drm/i915/display/intel_dp_test.c | 107 +- drivers/gpu/drm/i915/display/intel_dp_test.h | 3 +- .../gpu/drm/i915/display/intel_dp_tunnel.c | 8 +- drivers/gpu/drm/i915/display/tests/Makefile | 7 + .../i915/display/tests/intel_dp_link_test.c | 1412 +++++++++++++++++ drivers/gpu/drm/xe/.gitignore | 1 + drivers/gpu/drm/xe/.kunitconfig-display | 11 + drivers/gpu/drm/xe/Makefile | 3 + drivers/gpu/drm/xe/display/tests/Makefile | 11 + 21 files changed, 2786 insertions(+), 388 deletions(-) create mode 100644 Documentation/gpu/intel-display/dp-link-capabilities.rst create mode 100644 drivers/gpu/drm/i915/.kunitconfig create mode 100644 drivers/gpu/drm/i915/display/tests/Makefile create mode 100644 drivers/gpu/drm/i915/display/tests/intel_dp_link_test.c create mode 100644 drivers/gpu/drm/xe/.kunitconfig-display create mode 100644 drivers/gpu/drm/xe/display/tests/Makefile -- 2.49.1
