• Paloma Arellano's avatar
    drm/msm/dp: add VSC SDP support for YUV420 over DP · 55fb8ffc
    Paloma Arellano authored
    Add support to pack and send the VSC SDP packet for DP. This therefore
    allows the transmision of format information to the sinks which is
    needed for YUV420 support over DP.
    
    Changes in v5:
    	- Slightly modify use of drm_dp_vsc_sdp_pack()
    	- Remove dp_catalog NULL checks
    	- Modify dp_utils_pack_sdp_header() to more clearly pack the
    	  header buffer
    	- Move dp_utils_pack_sdp_header() inside of
    	  dp_catalog_panel_send_vsc_sdp to clearly show the relationship
    	  between the header buffer and the vsc_sdp struct
    	- Due to the last point, remove the dp_utils_pack_vsc_sdp()
    	  function and only call drm_dp_vsc_sdp_pack() in
    	  dp_panel_setup_vsc_sdp_yuv_420()
    
    Changes in v4:
    	- Remove struct msm_dp_sdp_with_parity
    	- Use dp_utils_pack_sdp_header() to pack the SDP header and
    	  parity bytes into a buffer
    	- Use this buffer when writing the VSC SDP data in
    	  dp_catalog_panel_send_vsc_sdp()
    	- Write to all of the MMSS_DP_GENERIC0 registers instead of just
    	  the ones with non-zero values
    
    Changes in v3:
    	- Create a new struct, msm_dp_sdp_with_parity, which holds the
    	  packing information for VSC SDP
    	- Use drm_dp_vsc_sdp_pack() to pack the data into the new
    	  msm_dp_sdp_with_parity struct instead of specifically packing
    	  for YUV420 format
    	- Modify dp_catalog_panel_send_vsc_sdp() to send the VSC SDP
    	  data using the new msm_dp_sdp_with_parity struct
    
    Changes in v2:
    	- Rename GENERIC0_SDPSIZE macro to GENERIC0_SDPSIZE_VALID
    	- Remove dp_sdp from the dp_catalog struct since this data is
    	  being allocated at the point used
    	- Create a new function in dp_utils to pack the VSC SDP data
    	  into a buffer
    	- Create a new function that packs the SDP header bytes into a
    	  buffer. This function is made generic so that it can be
    	  utilized by dp_audio
    	  header bytes into a buffer
    	- Create a new function in dp_utils that takes the packed buffer
    	  and writes to the DP_GENERIC0_* registers
    	- Split the dp_catalog_panel_config_vsc_sdp() function into two
    	  to disable/enable sending VSC SDP packets
    	- Check the DP HW version using the original useage of
    	  dp_catalog_hw_revision() and correct the version checking
    	  logic
    	- Rename dp_panel_setup_vsc_sdp() to
    	  dp_panel_setup_vsc_sdp_yuv_420() to explicitly state that
    	  currently VSC SDP is only being set up to support YUV420 modes
    Signed-off-by: default avatarPaloma Arellano <quic_parellan@quicinc.com>
    Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Patchwork: https://patchwork.freedesktop.org/patch/579636/
    Link: https://lore.kernel.org/r/20240222194025.25329-14-quic_parellan@quicinc.comSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
    55fb8ffc
dp_utils.c 1.88 KB