Re: [PATCH 2/2] drm/dp_mst: Set CLEAR_PAYLOAD_ID_TABLE as broadcast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 22, 2021 at 12:00:27PM +0800, Wayne Lin wrote:
> [Why & How]
> According to DP spec, CLEAR_PAYLOAD_ID_TABLE is a path broadcast request
> message and current implementation is incorrect. Fix it.
> 
> Signed-off-by: Wayne Lin <Wayne.Lin@xxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> ---
>  drivers/gpu/drm/drm_dp_mst_topology.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> index 713ef3b42054..6d73559046e5 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -1072,6 +1072,7 @@ static void build_clear_payload_id_table(struct drm_dp_sideband_msg_tx *msg)
>  
>  	req.req_type = DP_CLEAR_PAYLOAD_ID_TABLE;
>  	drm_dp_encode_sideband_req(&req, msg);
> +	msg->path_msg = true;
>  }
>  
>  static int build_enum_path_resources(struct drm_dp_sideband_msg_tx *msg,
> @@ -2722,7 +2723,8 @@ static int set_hdr_from_dst_qlock(struct drm_dp_sideband_msg_hdr *hdr,
>  
>  	req_type = txmsg->msg[0] & 0x7f;
>  	if (req_type == DP_CONNECTION_STATUS_NOTIFY ||
> -		req_type == DP_RESOURCE_STATUS_NOTIFY)
> +		req_type == DP_RESOURCE_STATUS_NOTIFY ||
> +		req_type == DP_CLEAR_PAYLOAD_ID_TABLE)
>  		hdr->broadcast = 1;

Looks correct.
Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Hmm. Looks like we're missing DP_POWER_DOWN_PHY and DP_POWER_UP_PHY
here as well. We do try to send them as path requests, but apparently
forget to mark them as broadcast messages.

>  	else
>  		hdr->broadcast = 0;
> -- 
> 2.17.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux