linux/drivers/gpu/drm/display
Wayne Lin 69e90c1e33 drm/dp_mst: Fix drm RAD print
[ Upstream commit 6bbce873a9 ]

[Why]
The RAD of sideband message printed today is incorrect.
For RAD stored within MST branch
- If MST branch LCT is 1, it's RAD array is untouched and remained as 0.
- If MST branch LCT is larger than 1, use nibble to store the up facing
  port number in cascaded sequence as illustrated below:

  u8 RAD[0] = (LCT_2_UFP << 4) | LCT_3_UFP
     RAD[1] = (LCT_4_UFP << 4) | LCT_5_UFP
     ...

In drm_dp_mst_rad_to_str(), it wrongly to use BIT_MASK(4) to fetch the port
number of one nibble.

[How]
Adjust the code by:
- RAD array items are valuable only for LCT >= 1.
- Use 0xF as the mask to replace BIT_MASK(4)

V2:
- Document how RAD is constructed (Imre)

V3:
- Adjust the comment for rad[] so kdoc formats it properly (Lyude)

Fixes: 2f015ec6ea ("drm/dp_mst: Add sideband down request tracing + selftests")
Cc: Imre Deak <imre.deak@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Harry Wentland <hwentlan@amd.com>
Cc: Lyude Paul <lyude@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250113091100.3314533-2-Wayne.Lin@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-04-10 14:39:13 +02:00
..
drm_bridge_connector.c drm/bridge-connector: reset the HDMI connector state 2024-09-03 10:18:31 +02:00
drm_display_helper_mod.c drm/display: Introduce a DRM display-helper module 2022-04-25 11:19:21 +02:00
drm_dp_aux_bus.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
drm_dp_aux_dev.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
drm_dp_cec.c gpu: drm_dp_cec: fix broken CEC adapter properties check 2025-02-17 10:04:58 +01:00
drm_dp_dual_mode_helper.c drm/display: Fix building with GCC 15 2024-12-14 20:03:45 +01:00
drm_dp_helper.c drm: Fix DSC BPP increment decoding 2025-02-21 14:01:21 +01: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_mst_topology.c drm/dp_mst: Fix drm RAD print 2025-04-10 14:39:13 +02:00
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_tunnel.c drm/display: use ERR_PTR on DP tunnel manager creation fail 2024-12-27 14:02:09 +01:00
drm_dsc_helper.c drm/display/dsc: Add a helper to dump the DSC configuration 2024-07-03 18:05:12 +03:00
drm_hdcp_helper.c drm/sysfs: rename drm_sysfs_connector_status_event() 2023-06-23 15:54:00 +02:00
drm_hdmi_helper.c drm/display: hdmi: Add HDMI compute clock helper 2024-05-28 10:12:25 +02:00
drm_hdmi_state_helper.c drm/connector: Allow clearing HDMI infoframes 2025-02-08 09:56:57 +01:00
drm_scdc_helper.c drm/scdc-helper: Pimp SCDC debugs 2023-04-06 01:30:12 +03:00
Kconfig drm/bridge-connector: reset the HDMI connector state 2024-09-03 10:18:31 +02:00
Makefile drm/bridge-connector: move to DRM_DISPLAY_HELPER module 2024-09-03 10:18:31 +02:00