From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AA163CF02E for ; Tue, 16 Jun 2026 09:23:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781601804; cv=none; b=O3EbUsAW/OeRBj0UTOSXaYaaPF8ilnUpOgb3AshQp6nZq3goGzMIfwgg53S8ZVdwUdLLx+HXxkasOOyDdz/O2hlmYeBa39DSsp6/qYyko3L0B5Sdg1U6qDhV/fxJ03wEphIh7qF1KbZRb9jmhaCYbYTzEiw84GJYNUaeszuOfig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781601804; c=relaxed/simple; bh=szIFmq9trnDGRMkH31Lg6OUAgi48Us5qv94sPXVoC2g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GMzhCTFTlcZpQqcgU0UQocxH5Yq3EDm4uAsBxum6CqEhhBN5me5g9ZywZ2wPrYsgZbLegqL1AfAP44q5wQ0+OYHQ1WU1sNvrIDBvvzYfVpvdbp2zbjDEt+RmT19H4Znwreo+byewLql9rqOMmwPsQu+iho9g/kU/ki77OCE/78E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=oyrXOda9; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=iZp/xUXy; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="oyrXOda9"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="iZp/xUXy" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65G8OYxr006701 for ; Tue, 16 Jun 2026 09:23:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 1Qq8vPHgKwH4q0SQ20diO3tSTvhdrp1Q/CuwfNHfduU=; b=oyrXOda9Vh6h4jKO qi2P0JZUYE1q88Me/6Zict/gF1BGdDMvwpZCszzVzE56B5j+/E+l03s9OH/jWhbv 6rH98zRH05jD7YDd1q32s0tnQ5XkDLGKOe07F/zzVaXLq77n02Ur8KVhVGRbWJ4C ji8SFwTDYZ0vfTttDc9By5TyzAuU4EgO4zdQkJ7HPrTYwNMAyrAHpryX6zm419mp UdWEQMgcC7iyOaFhvzN7OkX6qfA46KYaevm+Vfmrbzu1521ys/1qk38qs5kCrvn0 fC+rGdADW7S5Qe2ko3sGecSaKej0QqFrEVMFyNyuTv2tDaxQZmX//H0gC/zGV1DM o3eBXg== Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu2xs883r-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 09:23:22 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-8426ed9f24dso3159732b3a.1 for ; Tue, 16 Jun 2026 02:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781601802; x=1782206602; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=1Qq8vPHgKwH4q0SQ20diO3tSTvhdrp1Q/CuwfNHfduU=; b=iZp/xUXyjkaVJ1OE0IF+CMQ5aO00ObNTYQvFbQzEh0V440BpuvgLBualS4Qq98pqRv z8RxQ4J/1EqM4sS7QsWJfXcMjicumCO1RB/HUxZEZ7XqfZKbfz9HKZNh7xRd3vgnWv4k S47PmcprTmvi7hPWB/UyawzFFOMCvrtsd3BsWiUBwJlv9xpBCZXrDQqI2kL3Uc6m3jMw lbAdPJV2BvNMQo7B+oNT6XDde8GgmxxYjeCeb4fGZKhrtGbj0SOwyGrAicoTSkWXhi+e do3WcxI0FJKKzCgpQGJ82iVPO1NOnniPMfGc3REfZzIycdgCl2Z2Ss0iyCzgB355albS ib5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781601802; x=1782206602; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1Qq8vPHgKwH4q0SQ20diO3tSTvhdrp1Q/CuwfNHfduU=; b=JpInxQmyyt6V327eJszmu/RcwAakyt5qVEMSRR6Bsg0C10qga/SjgIboM2s82QqFm9 JOiqwLZ3ur3a2rMfU/+C6rjElfzwLkwgTXdq6OtizVgre1wAMx4CxPiWU7HayP0kl0DH 8ezvAA5RDagZGWQPXfEwae6B0CE2po997hLuOUXLRdPj9DA/UDvadVRMXAURN1V13JDP 5RqY25Emo3fy9w0Qaoi+PmdAzlvH8GWzMPtfozJHVc1IzdUJ2gO8og966TufKj7F6ocP mlZcp9q2fnF+J7Ws4nUjNWD5SXB7WiU26hWO+4yyQ47by9YNGoEgV8ODbde4wt5WrzuC XxtQ== X-Forwarded-Encrypted: i=1; AFNElJ86fBR9FJDbtpY62Ejts7EO3wNowJBbG1ho37mnmORwiN4pLnfC0dOQtXjW2EnfgVI115g4IaF9bMKv/0Y=@vger.kernel.org X-Gm-Message-State: AOJu0Yww//9ij+mCdd0QgAD6ZrPj8FfR6k1v1gXYWWA99Xdv2ycJP/hv 9Woq6CYFkt+L7FER2XGpY/nWzhzlaDHhNSdjyb4LXlPAAH7W8fYyo7bLmJMcgR7II0fIvmK6Asw vWNjnP5F/8ohkDpgXpB5pQChtewxGYpFyMWlUP8hMIMzjAP92i6BzGOWGtypX59O8bhc= X-Gm-Gg: Acq92OE6Vy2Ls2MsrRugZmJbYzVAItVRUZo88HhQjhWwecxUXoHHUMfvh0JIAOLCmw9 dwsghbzfBwe2Ki6/1DaiLgeoCxBognq7Om398vTJwNvqri0PEJjkTzvWtcOWgAepu8neoskZd7a qkkiKUJiH5M5VHveLf3XJ844Aft3znibl7N5mNDCwuqc0ab6jUPiuJVXtUMANnV/WV858bJQKEc jR8FAg8Psn9qq7SKIe6wmBTV0KVJhu584rkaemKlplsjlGg7tbvyvmBpSMKxle+9xKVi91h8LFZ K9Rk0D19sDfR4Vh657Vigm2Tu7E8COTh9UM1SdHhiozwhBpN0lkhWFDRB6cB1nH4GMjC5h6qIxM BiKuwXmBXmkkHZZrUgQnWVgBpp94KGpY7oTJibJJaKME08l9Z9bHiy2Ur7BDFoPEIQgbmkSYcmt cu0l3geluAjJUP4fUj X-Received: by 2002:a05:6a00:1954:b0:82f:7888:e2fa with SMTP id d2e1a72fcca58-84513eb9e2dmr2530014b3a.17.1781601802049; Tue, 16 Jun 2026 02:23:22 -0700 (PDT) X-Received: by 2002:a05:6a00:1954:b0:82f:7888:e2fa with SMTP id d2e1a72fcca58-84513eb9e2dmr2529994b3a.17.1781601801577; Tue, 16 Jun 2026 02:23:21 -0700 (PDT) Received: from [10.133.33.98] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434afd50f7sm12099158b3a.35.2026.06.16.02.23.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Jun 2026 02:23:20 -0700 (PDT) Message-ID: <8c80a4e3-7c3d-4d0f-93e1-27f7f3fe6bf2@oss.qualcomm.com> Date: Tue, 16 Jun 2026 17:23:15 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 22/39] drm/msm/dp: Add support for sending VCPF packets in DP controller To: Dmitry Baryshkov Cc: Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Jessica Zhang , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Abhinav Kumar References: <20260410-msm-dp-mst-v4-0-b20518dea8de@oss.qualcomm.com> <20260410-msm-dp-mst-v4-22-b20518dea8de@oss.qualcomm.com> Content-Language: en-US From: Yongxing Mou In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: rt4ZXFhXCtSMMWCKgwSS0RY87Z2XpC0J X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDA5NCBTYWx0ZWRfX2B+zxpMr/GJ7 JvFbs5ODKzCiJOqpWLAjOpxhWaWKU1kOZKcRzNb5WXH4/a2keq0VFSfoHFgDxh4HuEmRw0qUDh+ /t4AMfkRJ91787e3jYioR/woj2hiO+0O5p//Drnv0iENasVMY1KOuplCVD+fQ9e/Qi5chTYNMUr iVH0L3SsNrkqhrRZSvwae85yPw1TFL3xLoRYzHY0i/Kb2gTlpkRnUE+Qo5jD60VLorWAK0Zhxdw Qo/4R5odGvjs70oGVFscl4PAx9BYjdRh8hDgDvVn3XqZzaWIJK35hYwB8iZUqGtqS9WbViVFL9S LfP6JI/ZXyAIgS9jT03nfwiekTqUxPl8pKctFvPaAHnhMBrLJS6K3+Vhu+ONZeAEXt9V4e/KvIz IRh+BUmkK2zn9HInEIWNEd/JGl2yFFciRuDCpctqZ2kSmZYyvuvJKD4Z/qJJeqF1xV/9SZMhXdc RlL+AurYT7JK8Yfr5tQ== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDA5NCBTYWx0ZWRfX4Hj9Gr6asiQT 096Pvtbu7JR6VKCyZdCasuDzMIuB836t8Xw8agxaZnf3FO9c+UR936kpibMMAw4lJiC9azUXm+9 coyA0OC+Z2yWsfh15T/twAVBsqRGR+0= X-Authority-Analysis: v=2.4 cv=MdJcfZ/f c=1 sm=1 tr=0 ts=6a31160a cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=COk6AnOGAAAA:8 a=EUspDBNiAAAA:8 a=h4G6HOsH2xYsS-_yFfgA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoOABgeZipijB_acs4fv:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-GUID: rt4ZXFhXCtSMMWCKgwSS0RY87Z2XpC0J X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_02,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 spamscore=0 priorityscore=1501 phishscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160094 On 6/16/2026 8:44 AM, Dmitry Baryshkov wrote: > On Mon, Jun 15, 2026 at 04:35:06PM +0800, Yongxing Mou wrote: >> >> >> On 4/12/2026 3:24 AM, Dmitry Baryshkov wrote: >>> On Fri, Apr 10, 2026 at 05:33:57PM +0800, Yongxing Mou wrote: >>>> From: Abhinav Kumar >>>> >>>> The VC Payload Fill (VCPF) sequence is inserted by the DP controller >>>> when stream symbols are absent, typically before a stream is disabled. >>>> This patch adds support for triggering the VCPF sequence in the MSM DP >>>> controller. >>>> >>>> Signed-off-by: Abhinav Kumar >>>> Signed-off-by: Yongxing Mou >>>> Reviewed-by: Dmitry Baryshkov >>>> --- >>>> drivers/gpu/drm/msm/dp/dp_ctrl.c | 55 ++++++++++++++++++++++++++++++++++--- >>>> drivers/gpu/drm/msm/dp/dp_ctrl.h | 2 +- >>>> drivers/gpu/drm/msm/dp/dp_display.c | 2 +- >>>> drivers/gpu/drm/msm/dp/dp_reg.h | 5 ++++ >>>> 4 files changed, 58 insertions(+), 6 deletions(-) >>>> >>>> @@ -516,14 +542,28 @@ static bool msm_dp_ctrl_mainlink_ready(struct msm_dp_ctrl_private *ctrl) >>>> return true; >>>> } >>>> -void msm_dp_ctrl_push_idle(struct msm_dp_ctrl *msm_dp_ctrl) >>>> +void msm_dp_ctrl_push_idle(struct msm_dp_ctrl *msm_dp_ctrl, struct msm_dp_panel *msm_dp_panel) >>>> { >>>> struct msm_dp_ctrl_private *ctrl; >>>> + u32 state = 0x0; >>>> ctrl = container_of(msm_dp_ctrl, struct msm_dp_ctrl_private, msm_dp_ctrl); >>>> + if (!ctrl->mst_active) >>>> + state |= DP_STATE_CTRL_PUSH_IDLE; >>>> + else if (msm_dp_panel->stream_id == DP_STREAM_0) >>>> + state |= DP_DP0_PUSH_VCPF; >>>> + else if (msm_dp_panel->stream_id == DP_STREAM_1) >>>> + state |= DP_DP1_PUSH_VCPF; >>>> + else >>>> + state |= DP_MSTLINK_PUSH_VCPF; >>>> + >>>> reinit_completion(&ctrl->idle_comp); >>> >>> And there can't be two streams wanting to push idle at the same time? >>> >> In MST, msm_dp_ctrl_push_idle() is only reached from >> msm_dp_display_disable_helper(), which is called from >> msm_dp_mst_stream_disable() / msm_dp_mst_stream_post_disable() in >> dp_mst_drm.c. Both of those >> callers hold mst->mst_lock for the duration of the disable sequence, >> which serializes push_idle (and the wait on idle_comp) across streams. So >> sharing a single idle_comp on the ctrl is safe. > > Comment, protected by mst_lock in msm_dp_foo(). > Got it. >>>> - msm_dp_write_link(ctrl, 0, REG_DP_STATE_CTRL, DP_STATE_CTRL_PUSH_IDLE); >>>> + >>>> + msm_dp_write_link(ctrl, msm_dp_panel->stream_id, >>>> + msm_dp_panel->stream_id > 1 ? >>>> + REG_DP_MSTLINK_STATE_CTRL : REG_DP_STATE_CTRL, >>>> + state); >>>> if (!wait_for_completion_timeout(&ctrl->idle_comp, >>>> IDLE_PATTERN_COMPLETION_TIMEOUT_JIFFIES)) > >>>> @@ -2183,7 +2223,7 @@ static int msm_dp_ctrl_link_maintenance(struct msm_dp_ctrl_private *ctrl) >>>> int ret = 0; >>>> int training_step = DP_TRAINING_NONE; >>>> - msm_dp_ctrl_push_idle(&ctrl->msm_dp_ctrl); >>>> + msm_dp_ctrl_push_idle(&ctrl->msm_dp_ctrl, ctrl->panel); >>> >>> Which panel are we passing and why? It feels to me that we have two >>> different cases, one for the MST stream and another one for the SST >>> link. Can we handle them separately? (note: I might be wrong here, >>> please correct me if I'm wrong). >>> >> For SST, we push to bit 8 of MDSS_0_DPTX_0_STATE_CTRL. >> For MST, stream0 and stream1 use bit 12 and bit 14 respectively. >> For MST stream2 and stream3 use REG_DP_MSTLINK_STATE_CTRL. >> Do we need to handle MST and SST separately here? > > Where is the MST panel coming from? You are pushing ctrl->panel, which > is the SST one, if I'm not mistaken. > This function is only used in the SST path, which is why ctrl->panel is passed in. The only reason for the change here is the interface update of msm_dp_ctrl_push_idle(). If needed, we could keep msm_dp_ctrl_push_idle() for SST and introduce a new msm_dp_ctrl_push_vcpf() for MST. Since the SST behavior hasn’t changed, no modification is needed here. >>>> ctrl->link->phy_params.p_level = 0; >>>> ctrl->link->phy_params.v_level = 0; >