linux/drivers/gpu/drm/display
Alexander Kaplan e40e20ac08 drm/dp: Read the PCON max FRL bandwidth only for HDMI DFPs
The PCON max FRL bandwidth field lives in byte 2 of the DFP Detailed
Capability Info (DPCD 0x82 for the first DFP).
The DP standard defines the meaning of descriptor bytes 1-3 strictly
per DFP type, and for a DisplayPort type DFP all of them are
reserved, with "read all 0s" semantics (DP v2.0, section 2.12.3,
Table 2-183).
The FRL bandwidth field is an HDMI DFP extension added by the VESA
DP-to-HDMI PCON specification.
drm_dp_get_pcon_max_frl_bw() however parses the byte without checking
the DFP type, the branch presence or DETAILED_CAP_INFO_AVAILABLE.
Without the latter the port descriptors are one byte wide and
port_cap[2] is not even the right register.

All neighbouring helpers parsing the same descriptor are scoped by
the DFP type already, see for instance drm_dp_downstream_max_bpc()
reading the same byte and returning 0 for a DP type DFP.
amdgpu's DC parses the field only for HDMI(/DP++) detailed types as
well.

This is not theoretical.
A Synaptics VMM7100 based USB-C to HDMI adapter with a macOS targeted
firmware advertises a DisplayPort type DFP with the type byte
replicated across the whole descriptor (08 08 08 08).
i915 decodes that as "PCON limited to 18 Gbps FRL" and prunes every
mode above ~750 MHz dotclock, including all the 4k@100/120 modes the
sink EDID offers, while macOS drives 4k@120 through the same adapter
just fine via DP DSC (and amdgpu's type-scoped parser would ignore
the bogus field as well).

Only parse the field for an HDMI DFP behind a DPCD 1.1+ branch
device that reports detailed cap info, matching the type-scoped
field layout of the spec and the rest of the helpers.

Fixes: ce32a6239d ("drm/dp_helper: Add Helpers for FRL Link Training support for DP-HDMI2.1 PCON")
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Uma Shankar <uma.shankar@intel.com> (v2)
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v5.12+
Signed-off-by: Alexander Kaplan <alexander.kaplan@sms-medipool.de>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patch.msgid.link/20260610193825.2933-1-alexander.kaplan@sms-medipool.de
2026-07-29 17:31:31 +05:30
..
drm_bridge_connector.c Merge drm/drm-next into drm-misc-next 2026-05-07 16:17:01 +02:00
drm_display_helper_mod.c
drm_dp_aux_bus.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_dp_aux_dev.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_dp_cec.c gpu: drm: display: drm_dp_cec: update Hans' email address 2025-09-09 15:59:07 +02:00
drm_dp_dual_mode_helper.c drm/i915/lspcon: do not hardcode settle timeout 2025-01-27 14:54:46 -05:00
drm_dp_helper_internal.h drm/display: Make DisplayPort AUX Chardev Kconfig name consistent 2024-03-28 11:26:46 +01:00
drm_dp_helper.c drm/dp: Read the PCON max FRL bandwidth only for HDMI DFPs 2026-07-29 17:31:31 +05:30
drm_dp_mst_topology_internal.h drm/dp_mst: avoid includes in drm_dp_mst_topology_internal.h 2024-03-11 11:47:06 +02:00
drm_dp_mst_topology.c drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe() 2026-07-01 12:07:10 +02:00
drm_dp_tunnel.c - Enable PIPEDMC_ERROR interrupt (Dibin) 2026-05-06 10:55:14 +10:00
drm_dsc_helper.c drm/display: Include <linux/export.h> 2025-06-16 09:02:32 +02:00
drm_hdcp_helper.c drm/sysfs: rename drm_sysfs_connector_status_event() 2023-06-23 15:54:00 +02:00
drm_hdmi_audio_helper.c drm/display: Include <linux/export.h> 2025-06-16 09:02:32 +02:00
drm_hdmi_cec_helper.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drm_hdmi_cec_notifier_helper.c drm/display: Include <linux/export.h> 2025-06-16 09:02:32 +02:00
drm_hdmi_helper.c drm/display: hdmi: Use drm_output_color_format instead of hdmi_colorspace 2026-03-24 13:54:35 +01:00
drm_hdmi_state_helper.c drm: Rename struct drm_atomic_state to drm_atomic_commit 2026-05-04 14:05:04 +10:00
drm_scdc_helper.c drm/display: Include <linux/export.h> 2025-06-16 09:02:32 +02:00
Kconfig drm/display: bridge-connector: handle CEC adapters 2025-05-21 01:35:21 +03:00
Makefile drm/display: add CEC helpers code 2025-05-21 01:35:16 +03:00