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 985E7397B18 for ; Fri, 22 May 2026 07:58:14 +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=1779436695; cv=none; b=dQOqCtYs8XAptxH+ckI8MTJyE301oJJ9qNsYM/OAN2nS8X+DWOiNoGh0UOgPjiryPze6RzG6XAEC/+6UjCdwPsOjFUA708+hs7IgB3GxhpscxyLWToP/7OmTY5FYir1fp+fT4b4THgHShz3+K4ZZz2wgL48G+IPpR14BtAM0uvs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779436695; c=relaxed/simple; bh=6WNY6+7JTzSDWCJvJvRITSaXaAln8yAoOqxMVXSKhDk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=F3uhlIAjyhypz8O3C30dhkHKv2A9ulTa84VnImZ5baSb82zb5jq2Tzq37M2eRJauLEM2tYVNisQVavoIlKHKsLW/5tMCqVoIu2Wy5MYzJm84O6Rcl4nRwSiOtwULg5h+hqkEha1mziN7EaMLz3EIfPiM6iHiFykvlYUrL702TM4= 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=nuPUmRr3; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=CvCJ8yPo; 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="nuPUmRr3"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="CvCJ8yPo" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64M42Ck63005817 for ; Fri, 22 May 2026 07:58:14 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= kxBZMjXWfEDezTxhg4NXRbYWC2H2xYO8KsQ+Odv+Xpo=; b=nuPUmRr3EY5asGTb lm33cvgGHMoqefeW+ED9j2GIonpRmQSfAB1mFs3S+0j13/xQ0zZTeyHq0CR4Hf+T ZmJPCHrY3W7SV4H15GIDOcJqbq3jJOxWes79HqcgZ3dnDQnGNFB1YItcUc7ffiGl PGri1GJqDyQlheewdPUQ0ObvAOl5sJA4R3fBBf5zBjffCodkWBROe4CG3XVsCgAI k+CEYCryoFJqAS7p3npIxxsZZgK3Brc4AV6hM9q9lmRyskw3KdaV2ha35U8jFM6q fWqKv65+x1RaMGBQAiN/yGhsy8NIK/jpR5LQGa03CC/0ILjXEAexRhhXi9+wa1F/ 5QaiLQ== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eafrt8t68-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 22 May 2026 07:58:13 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2bd1dbcccf6so118767135ad.2 for ; Fri, 22 May 2026 00:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1779436693; x=1780041493; 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=kxBZMjXWfEDezTxhg4NXRbYWC2H2xYO8KsQ+Odv+Xpo=; b=CvCJ8yPo66V0pYP8uynAZrkohnvkuP3MDhB3dGB7LzAfkGT7simnluLRx5+pyIyAAw dThR1f02BTJmLzIt1eEuOZkQuKeHYIeUnNqSJNXJdGhxcbuJ2KIZONrnqW8S1Y+OuS5n V0WxOuexXIbtb5v+B7O+hRwyRLFUhicZ2xxVT02CkBoxt8T9ysdL90wI7myxHJ18wgFI nM++/njkvcY3z1hTkBPcB2w84eGFBK25pIBnCaAZCrJ5FWKa43kgF/7bbFDoJ6fk1nov QTgbBvD6OHpM4IL4xXjWC83y9ZJr4Kh7Nq9kosmb3NE9kqxolhXIbWoJSXi3uSe9j4L1 MAkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779436693; x=1780041493; 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=kxBZMjXWfEDezTxhg4NXRbYWC2H2xYO8KsQ+Odv+Xpo=; b=dxPviqvq5eU8VW5GFjruwqTeB8gt9MzkICNld39WFwGgl2px8vjqXawftpCuHyeI9W 8+foSGsN1rqP6HVk6DeecNvcCUK9+RENRyW1CtK0h8ulriVKOFRXrUIhnzMIfONjzC7X O+FRVhmDhtoE34bliTXVc6kRC2M1GmvZiRWDLmcCQcXHrnP1X+r21vHxNjeXF//U2sz1 qzI8vhsV4nJxvDxUGUVbB94p9Ku5bD0WR5lJ+HX/SY//t+hBdhtRd5pl3AhchKe4pGvZ KZeP7cSb1oCqh60EctnaGfazeVWwFIYiH5+2Hbr29xsYEQTE2kx6Ow02pHT8xNOu7C3O 6wQA== X-Forwarded-Encrypted: i=1; AFNElJ9knHSt1IqfsDnsp8sF+O7LmiEWOiGEVyR8h3WVmyeGWP564deQDmaymBAUyzIhzA1Qy9dUu5Dps3700t8=@vger.kernel.org X-Gm-Message-State: AOJu0YwMgtZV9DAuYGKxdRb+8kMkXY3myPM9U5oxa0DOOoxJCphChgej vEskdVdwJzBZgfLC+h0RVLNnv7awxVDFhEgtuD1qCVZ7zK0nnLlWNYZozMN6ng4l19TZK79tlTX IZ21COikw2bWSWk1l2PGJJj5EAir/vQDlRjp1meAqyhMssecSX2rYxW/uzpjcLIEFvEU= X-Gm-Gg: Acq92OG2/+ZyxxDttigUI+EXc9XnqwXxvPV7zZxnYF9/ToWW0F0ckDTZd443M3FfbqR Q9kWzcG/GJLrkNt8qw1TO9s8YemRMAXkVfZaUzuKJEqQPa/Td2ckCz8V3ymdgW0cKqtLmUpezOu 8OCkBL2zWuVbMnjR+uadUeh2Itt9ETgcotPJdcpHyINvgP/TlhHvpePpT0npZKu7Ylul807eUHB Np8qKVawXMlKdU83CGoGC74qVQT82Xy6Phz5JplwMqVLko5Cdiqzd3cuKbHSQd0Y9YIvyKk4ctj 5jmoXBCVl6csjZNvC8c/iOxRcjbf+/3iwTeIY5s+/EUZ7j1BojoDx0m8MjRv9RElxZQAfkP8NCp pK3pqtR789UHnVeWWe1jyAPyobYnr6UwayHvKbdKpzHy2niYXx1S7LEuohGLEuHYamRAefMSrLd N5AGVIWLvyAI7IPA5BKOTC5ClSlOIL X-Received: by 2002:a17:903:2c04:b0:2b2:549f:7d2b with SMTP id d9443c01a7336-2beb0596f55mr27972695ad.11.1779436693315; Fri, 22 May 2026 00:58:13 -0700 (PDT) X-Received: by 2002:a17:903:2c04:b0:2b2:549f:7d2b with SMTP id d9443c01a7336-2beb0596f55mr27972335ad.11.1779436692784; Fri, 22 May 2026 00:58:12 -0700 (PDT) Received: from [10.133.33.148] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2beb56958d3sm7780935ad.12.2026.05.22.00.58.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 May 2026 00:58:12 -0700 (PDT) Message-ID: <33ab5c3f-5a6d-4d81-b310-760ac519bfd1@oss.qualcomm.com> Date: Fri, 22 May 2026 15:58:06 +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 14/39] drm/msm/dp: introduce max_streams for DP controller MST support 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-14-b20518dea8de@oss.qualcomm.com> <0e39dd9f-9858-49cb-a052-7d0791b694af@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: 7bit X-Authority-Analysis: v=2.4 cv=JN0LdcKb c=1 sm=1 tr=0 ts=6a100c95 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=COk6AnOGAAAA:8 a=tbUuAszfmx72r74QhgEA:9 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTIyMDA3OCBTYWx0ZWRfX4pp/lsJJOYVc RKEsik24NhZJICG3EqO1wEaP2aBAaoYN6Uw2N6QT+4jfC7Nb+w8bRubLqCflrCMXuDxOYIbBmbH za0TrfFVp0eXTBtbaWjfCxawoA99Z65GQPyrHaMPLSU1VKXfdOctAJs5kcQbjANoJ2qYgwKjPbQ oxJBZ7RvzM7ZB2g2KpeLX6uvMWRSBxz4vvylLJQQ3LHLTVPL3UVWcgtB5qvcnjMf76c85FmH8mm qC48ozuPWByySeVoN+JSdFasK81xm+uAZUbyo8WCZneb4eEtmkNmuC1Hi3aWgPPEAO155d3L5Zh JHkq4E1z36047VBt77lcYF6gUMKImc/Ok1vzXOFZbQ+uElBNhrmoHBKPt032+Pz69M7Zoiaegc0 8o6Y8SaQftAjh2oVUPCCLPXcfRCp3uGyfzWE6eLrW0QlG4Q3MlKHTJCuz9QGc5ayBmnaMK+XqZ9 BU2WqnNylQ0YdEtBT3g== X-Proofpoint-GUID: kzvh0l_Mq5TbwE73xITKDFGyQzmHxdh- X-Proofpoint-ORIG-GUID: kzvh0l_Mq5TbwE73xITKDFGyQzmHxdh- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-22_01,2026-05-18_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 impostorscore=0 phishscore=0 bulkscore=0 clxscore=1015 spamscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605220078 On 5/21/2026 8:07 PM, Dmitry Baryshkov wrote: > On Thu, May 21, 2026 at 07:34:32PM +0800, Yongxing Mou wrote: >> >> >> On 4/12/2026 1:59 AM, Dmitry Baryshkov wrote: >>> On Fri, Apr 10, 2026 at 05:33:49PM +0800, Yongxing Mou wrote: >>>> From: Abhinav Kumar >>>> @@ -2740,7 +2741,8 @@ static int msm_dp_ctrl_clk_init(struct msm_dp_ctrl *msm_dp_ctrl) >>>> if (rc) >>>> return rc; >>>> - for (i = DP_STREAM_0; i < DP_STREAM_MAX; i++) { >>>> + ctrl->num_pixel_clks = 0; >>>> + for (i = DP_STREAM_0; i < max_stream; i++) { >>> >>> Why? I think the code was fine with getting up to DP_STREAM_MAX clocks. >> Sure.. will change max_stream -> DP_STREAM_MAX next version. >>> In fact, I'd rather use that instead of the hardcoded value for >>> determining how many streams can be there. Think of the old DTs which >>> didn't have extra stream clocks. We still need to support those. >>> >> The current logic only assigns num streams to dp->max_stream when >> desc->mst_streams == num_pixel_clks, otherwise set to 1 which mean sst. >> I would like to introduce a switch in the driver to control the number of >> streams, rather than having it fully determined by the DTs. > > Why? > 1. In some scenarios, even if the hardware supports up to 4-stream MST, we may not want to enable all streams (e.g., LeMans: 2xDSI + 4xMST + 2xMST, but it only has a 6-layer mixer). 2. Currently, the DTs for all platforms have already been merged, and for some legacy platforms, not sure if all platforms MST will work. If my understanding is incorrect, please feel free to correct me. Thanks. >> Do you think it would be acceptable to use: >> dp->max_stream = min(num_pixel_clks, desc->mst_streams)? > > We know that num_pixel_clks <= desc->mst_streams. Otherwise DT is wrong > and should not have been comitted. So, the min(a,b) has a known return > value of num_pixel_clks. > >> >>>> ctrl->pixel_clk[i] = devm_clk_get(dev, pixel_clks[i]); >>>> if (i == 0 && IS_ERR(ctrl->pixel_clk[i])) >