Re: [PATCH 02/13] drm/msm/dp: Support multiple generic SDP slots
From: Dmitry Baryshkov
Date: Wed Sep 30 2026 - 13:16:50 EST
On Wed, Sep 30, 2026 at 08:41:46PM +0800, Xilin Wu wrote:
> The SDP writer currently targets Generic0 for VSC packets. Static HDR
> metadata needs a separate slot so that both packets can be sent on the
> same stream.
>
> Allow the SDP writer to address a generic packet slot, and define the
> Generic2 registers needed for static HDR metadata. Use unaligned
> little-endian loads for the payload words and accept a const SDP header.
>
> The existing VSC packet continues to use Generic0 without changing its
> layout or enable sequence.
>
> Assisted-by: LLM
> Signed-off-by: Xilin Wu <sophon@xxxxxxxxx>
> ---
> drivers/gpu/drm/msm/dp/dp_panel.c | 22 ++++++++++------------
> drivers/gpu/drm/msm/dp/dp_reg.h | 4 ++++
> drivers/gpu/drm/msm/dp/dp_utils.c | 3 ++-
> drivers/gpu/drm/msm/dp/dp_utils.h | 3 ++-
> 4 files changed, 18 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/dp/dp_utils.c b/drivers/gpu/drm/msm/dp/dp_utils.c
> index 4a5ebb0c33b8..226b370ce8fe 100644
> --- a/drivers/gpu/drm/msm/dp/dp_utils.c
> +++ b/drivers/gpu/drm/msm/dp/dp_utils.c
> @@ -74,7 +74,8 @@ u8 msm_dp_utils_calculate_parity(u32 data)
> return parity_byte;
> }
>
> -void msm_dp_utils_pack_sdp_header(struct dp_sdp_header *sdp_header, u32 header_buff[2])
> +void msm_dp_utils_pack_sdp_header(const struct dp_sdp_header *sdp_header,
> + u32 header_buff[2])
Nit: separate commit for this one, please.
Feel free to use for both of them:
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> {
> header_buff[0] = FIELD_PREP(HEADER_0_MASK, sdp_header->HB0) |
> FIELD_PREP(PARITY_0_MASK, msm_dp_utils_calculate_parity(sdp_header->HB0)) |
> diff --git a/drivers/gpu/drm/msm/dp/dp_utils.h b/drivers/gpu/drm/msm/dp/dp_utils.h
> index 2e4f98a863c4..2fdb89efc57c 100644
> --- a/drivers/gpu/drm/msm/dp/dp_utils.h
> +++ b/drivers/gpu/drm/msm/dp/dp_utils.h
> @@ -31,6 +31,7 @@
> u8 msm_dp_utils_get_g0_value(u8 data);
> u8 msm_dp_utils_get_g1_value(u8 data);
> u8 msm_dp_utils_calculate_parity(u32 data);
> -void msm_dp_utils_pack_sdp_header(struct dp_sdp_header *sdp_header, u32 header_buff[2]);
> +void msm_dp_utils_pack_sdp_header(const struct dp_sdp_header *sdp_header,
> + u32 header_buff[2]);
>
> #endif /* _DP_UTILS_H_ */
>
> --
> 2.55.0
>
--
With best wishes
Dmitry