linux-stable/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_agpsupport.h
drm_atomic.h Revert "drm/bridge: Add a drm_bridge_state object" 2020-01-08 00:34:34 +01: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_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
drm_client.h
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.h
drm_crtc_helper.h
drm_damage_helper.h
drm_debugfs.h
drm_debugfs_crc.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_dsc.h
drm_edid.h
drm_encoder.h drm/bridge: Make the bridge chain a double-linked list 2019-12-09 10:03:01 +01:00
drm_encoder_slave.h
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_file.h
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.h drm: call drm_gem_object_funcs.mmap with fake offset 2019-12-06 11:18:11 +01:00
drm_gem_cma_helper.h
drm_gem_framebuffer_helper.h
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_gem_vram_helper.h drm/vram-helper: Remove BO device from public interface 2020-01-07 11:53:19 +01:00
drm_hashtab.h
drm_hdcp.h
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_mipi_dsi.h
drm_mm.h
drm_mode_config.h
drm_mode_object.h
drm_modes.h
drm_modeset_helper.h
drm_modeset_helper_vtables.h
drm_modeset_lock.h
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.h
drm_plane_helper.h
drm_prime.h
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_scdc_helper.h
drm_self_refresh_helper.h
drm_simple_kms_helper.h
drm_syncobj.h
drm_sysfs.h
drm_util.h
drm_utils.h
drm_vblank.h
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
i915_drm.h
i915_mei_hdcp_interface.h
i915_pciids.h drm/i915/cml: Separate U series pci id from origianl list. 2019-12-12 22:15:16 +02:00
intel-gtt.h
intel_lpe_audio.h
spsc_queue.h
task_barrier.h drm: Add Reusable task barrier. 2019-12-18 16:09:12 -05:00