kernel_optimize_test/include/drm
Lyude Paul fcf4638075 drm/dp_mst: Use full_pbn instead of available_pbn for bandwidth checks
DisplayPort specifications are fun. For a while, it's been really
unclear to us what available_pbn actually does. There's a somewhat vague
explanation in the DisplayPort spec (starting from 1.2) that partially
explains it:

  The minimum payload bandwidth number supported by the path. Each node
  updates this number with its available payload bandwidth number if its
  payload bandwidth number is less than that in the Message Transaction
  reply.

So, it sounds like available_pbn represents the smallest link rate in
use between the source and the branch device. Cool, so full_pbn is just
the highest possible PBN that the branch device supports right?

Well, we assumed that for quite a while until Sean Paul noticed that on
some MST hubs, available_pbn will actually get set to 0 whenever there's
any active payloads on the respective branch device. This caused quite a
bit of confusion since clearing the payload ID table would end up fixing
the available_pbn value.

So, we just went with that until commit cd82d82cbc ("drm/dp_mst: Add
branch bandwidth validation to MST atomic check") started breaking
people's setups due to us getting erroneous available_pbn values. So, we
did some more digging and got confused until we finally looked at the
definition for full_pbn:

  The bandwidth of the link at the trained link rate and lane count
  between the DP Source device and the DP Sink device with no time slots
  allocated to VC Payloads, represented as a Payload Bandwidth Number. As
  with the Available_Payload_Bandwidth_Number, this number is determined
  by the link with the lowest lane count and link rate.

That's what we get for not reading specs closely enough, hehe. So, since
full_pbn is definitely what we want for doing bandwidth restriction
checks - let's start using that instead and ignore available_pbn
entirely.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: cd82d82cbc ("drm/dp_mst: Add branch bandwidth validation to MST atomic check")
Cc: Mikita Lipski <mikita.lipski@amd.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Sean Paul <sean@poorly.run>
Reviewed-by: Mikita Lipski <mikita.lipski@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200306234623.547525-3-lyude@redhat.com
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
2020-03-12 19:07:24 -04:00
..
bridge drm-misc-next for v5.6: 2020-01-03 11:43:44 +10:00
i2c
ttm drm-misc-next for v5.6: 2019-12-17 13:57:54 +01:00
amd_asic_type.h drm/amdgpu: Add a kernel parameter for specifying the asic type 2019-09-16 09:54:25 -05:00
drm_agpsupport.h drm/agp: Remove unused function drm_agp_bind_pages 2019-07-15 18:11:30 +02:00
drm_atomic_helper.h drm/atomic: Spell CRTC consistently 2019-12-22 11:13:00 +01:00
drm_atomic_state_helper.h drm: Add __drm_atomic_helper_crtc_state_reset() & co. 2019-12-18 16:47:34 +02:00
drm_atomic_uapi.h
drm_atomic.h Revert "drm/bridge: Add a drm_bridge_state object" 2020-01-08 00:34:34 +01:00
drm_audio_component.h
drm_auth.h
drm_blend.h
drm_bridge.h Revert "drm/bridge: Add a drm_bridge_state object" 2020-01-08 00:34:34 +01:00
drm_cache.h MIPS: Loongson64: Rename CPU TYPES 2019-10-31 15:03:10 -07:00
drm_client.h drm/client: Support unmapping of DRM client buffers 2019-08-01 15:01:22 +02:00
drm_color_mgmt.h drm: Inline drm_color_lut_extract() 2019-11-29 21:29:17 +02:00
drm_connector.h drm/modes: parse_cmdline: Add support for specifying panel_orientation (v2) 2019-12-16 12:13:18 +01:00
drm_crtc_helper.h
drm_crtc.h Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
drm_damage_helper.h
drm_debugfs_crc.h
drm_debugfs.h
drm_device.h
drm_displayid.h
drm_dp_dual_mode_helper.h
drm_dp_helper.h drm: add dp helper to initialize remote aux channel. 2020-01-09 18:07:48 -05:00
drm_dp_mst_helper.h drm/dp_mst: Use full_pbn instead of available_pbn for bandwidth checks 2020-03-12 19:07:24 -04:00
drm_drv.h drm/print: move drm_debug variable to drm_print.[ch] 2019-10-02 16:28:24 +03:00
drm_dsc.h
drm_edid.h drm/edid: Add drm_hdmi_avi_infoframe_bars() 2019-10-22 19:11:11 +03:00
drm_encoder_slave.h
drm_encoder.h drm/bridge: Make the bridge chain a double-linked list 2019-12-09 10:03:01 +01:00
drm_fb_cma_helper.h drm/fb-cma-helpers: Fix include issue 2020-01-09 17:33:41 +01:00
drm_fb_helper.h drm/fb-helper: Remove drm_fb_helper_unlink_fbi() 2019-11-19 14:37:39 +01:00
drm_file.h drm: Expose a method for creating anonymous struct file around drm_minor 2019-11-07 21:22:15 +00:00
drm_fixed.h
drm_flip_work.h
drm_format_helper.h
drm_fourcc.h drm/fb: Extend format_info member arrays to handle four planes 2020-01-07 13:16:08 +02:00
drm_framebuffer.h
drm_gem_cma_helper.h
drm_gem_framebuffer_helper.h drm/fb: remove unused function: drm_gem_fbdev_fb_create() 2019-07-21 19:32:38 +02:00
drm_gem_shmem_helper.h drm/shmem: add support for per object caching flags. 2020-02-27 13:54:38 +01:00
drm_gem_ttm_helper.h drm/ttm: add drm_gem_ttm_mmap() 2019-10-17 13:59:16 +02:00
drm_gem_vram_helper.h drm/vram-helper: Remove BO device from public interface 2020-01-07 11:53:19 +01:00
drm_gem.h drm: call drm_gem_object_funcs.mmap with fake offset 2019-12-06 11:18:11 +01:00
drm_hashtab.h
drm_hdcp.h drm/hdcp: update content protection property with uevent 2019-08-06 13:17:23 +05:30
drm_ioctl.h
drm_irq.h
drm_lease.h
drm_legacy.h drm/pci: Hide legacy PCI functions from non-legacy code 2019-12-05 08:44:04 +01:00
drm_mipi_dbi.h drm/tinydrm: Move mipi-dbi 2019-07-25 10:45:07 +02:00
drm_mipi_dsi.h drm/dsi: add helpers for DSI compression mode and PPS packets 2019-11-07 15:00:16 +02:00
drm_mm.h drm/mm: Convert drm_mm_node booleans to bitops 2019-10-04 13:43:13 +01:00
drm_mode_config.h drm: Add Content protection type property 2019-08-06 13:14:07 +05:30
drm_mode_object.h
drm_modes.h drm/selftests: reduce stack usage 2019-07-01 09:50:58 +02:00
drm_modeset_helper_vtables.h drm/connector: Share with non-atomic drivers the function to get the single encoder 2019-09-16 15:13:02 -07:00
drm_modeset_helper.h
drm_modeset_lock.h drm: Add drm_modeset_lock_assert_held() 2019-09-19 21:37:59 +03:00
drm_of.h drm: of: Fix linking when CONFIG_OF is not set 2020-01-09 10:40:58 +10:00
drm_panel.h drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time 2019-12-17 20:39:33 +01:00
drm_pci.h drm/pci: Hide legacy PCI functions from non-legacy code 2019-12-05 08:44:04 +01:00
drm_pciids.h
drm_plane_helper.h
drm_plane.h drm/plane: Clarify our expectations for src/dst rectangles 2019-10-10 15:49:34 +02:00
drm_prime.h drm/prime: Remove duplicate forward declaration 2019-09-16 17:32:51 +02:00
drm_print.h drm/print: introduce new struct drm_device based logging macros 2019-12-17 16:43:20 +02:00
drm_probe_helper.h
drm_property.h
drm_rect.h drm/selftests: Add drm_rect selftests 2019-11-28 13:33:43 +02:00
drm_scdc_helper.h drm/scdc: Fix typo in bit definition of SCDC_STATUS_FLAGS 2019-11-04 17:58:46 +01:00
drm_self_refresh_helper.h drm/atomic: fix self-refresh helpers crtc state dereference 2019-11-06 13:00:21 -05:00
drm_simple_kms_helper.h drm/simple-kms: Standardize arguments for callbacks 2019-10-24 13:55:56 +02:00
drm_syncobj.h
drm_sysfs.h drm: uevent for connector status change 2019-08-06 13:16:54 +05:30
drm_util.h drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig 2019-11-07 21:22:15 +00:00
drm_utils.h
drm_vblank.h drm/vblank: Document and fix vblank count barrier semantics 2019-09-03 17:16:53 +02:00
drm_vma_manager.h
drm_writeback.h
gma_drm.h
gpu_scheduler.h drm/amdgpu: fix doc by clarifying sched_list definition 2020-01-27 16:46:44 -05:00
i915_component.h drm/i915/tgl: Add additional ports for Tiger Lake 2019-07-11 16:31:14 -07:00
i915_drm.h drm: Move port definition back to i915 header 2019-08-30 14:08:26 +05:30
i915_mei_hdcp_interface.h drm: Extend I915 mei interface for transcoder info 2019-08-30 14:08:28 +05:30
i915_pciids.h drm/i915/cml: Separate U series pci id from origianl list. 2019-12-12 22:15:16 +02:00
intel_lpe_audio.h
intel-gtt.h
spsc_queue.h
task_barrier.h drm: Add Reusable task barrier. 2019-12-18 16:09:12 -05:00