linux/include/drm/display
Wayne Lin 6bbce873a9 drm/dp_mst: Fix drm RAD print
[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
2025-01-24 17:50:23 -05:00
..
drm_dp.h Merge drm/drm-next into drm-misc-next 2024-07-29 09:35:54 +02:00
drm_dp_aux_bus.h drm/dp: Add callbacks to make using DP AUX bus properly easier 2022-06-02 15:14:16 -07:00
drm_dp_dual_mode_helper.h
drm_dp_helper.h drm/dp: extract drm_dp_dpcd_clear_payload() 2024-12-03 21:35:58 +02:00
drm_dp_mst_helper.h drm/dp_mst: Fix drm RAD print 2025-01-24 17:50:23 -05:00
drm_dp_tunnel.h drm/dp: Add support for DP tunneling 2024-02-27 17:34:10 +02:00
drm_dsc.h drm/i915/dp: Fix DSC line buffer depth programming 2024-04-19 17:05:35 +03:00
drm_dsc_helper.h drm/display/dsc: Add a helper to dump the DSC configuration 2024-07-03 18:05:12 +03:00
drm_hdcp.h drm/display: Move HDCP helpers into display-helper module 2022-04-25 11:19:36 +02:00
drm_hdcp_helper.h drm/display: Move HDCP helpers into display-helper module 2022-04-25 11:19:36 +02:00
drm_hdmi_audio_helper.h drm/connector: implement generic HDMI audio helpers 2025-01-04 08:47:11 +02:00
drm_hdmi_helper.h drm/display: hdmi: Add HDMI compute clock helper 2024-05-28 10:12:25 +02:00
drm_hdmi_state_helper.h drm/connector: make mode_valid take a const struct drm_display_mode 2025-01-07 12:45:19 +02:00
drm_scdc.h drm/display: Move SCDC helpers into display-helper library 2022-04-25 11:19:37 +02:00
drm_scdc_helper.h drm/scdc-helper: Pimp SCDC debugs 2023-04-06 01:30:12 +03:00