Message ID | 20230802-add-widebus-support-v3-1-2661706be001@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp705821vqx; Wed, 2 Aug 2023 13:22:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlGhVO1KT/1K0Xzpjbh78jIZ/iZ6zpUkaumh/HTrYn7NyfhDdsI4xnpsyzBgIjR8RrnlmXnV X-Received: by 2002:a17:903:22c6:b0:1b8:41d4:89f with SMTP id y6-20020a17090322c600b001b841d4089fmr18530291plg.4.1691007765539; Wed, 02 Aug 2023 13:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691007765; cv=none; d=google.com; s=arc-20160816; b=ELRn7diBVm6qwKX+mdcP6hC89t+sgzI2nV1RdrlsatlED89Aj1P6mA8FwJfGbVaz10 gX3Lbc7Irz+Esf3OHpv5318WxfjQvLygSoCjB1VZbaS39H74zVoi7dYZ1F7duEDxihW/ WWmQRFN0jSopIi3L/qdldl5YmG+bZh57XP3MdhZ5Mptcjy03ryzABZbYE33FwdsJbh4E JD5FajKz3/M0980ENLxTX8TGCIBXL65F7HftndEA8gvaN+cxowKtzIJ41ydWnF2ADOUv pdiKCTDPe22rwTrESZQPtne8KCepWRrAxdcuZqJ90xackIon8oDbtDux+Bh2O1v5SStR Rlhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=XNMYA4UbcbSXzfcqNjsG0H+M63r3pQMWY3iLGwCz6eI=; fh=LWwl7zBKZSW8zR8hD6VgzF0OgF7Ft3bCDc50/EguBU8=; b=yoTN7Kh9L/eZtnb99tbHXMffpyCuNQi/am2anuxNzahcW44XzlL/oBB8pbsEijbiby qIEygcDdAQyIlmeteullr2ikuu6HM7Kci6jNwBVe7nWX92J3cpqPjkAaFCu6fDbnNtzf r/jZczy8XmMcp/K1Y3LkZsHjb9pqHU+g/NeQQF7DDTFhW+m/KnTZKXNx4SRR3dg4wuZE MnRtjgiSeFGQTBQRmTfbqUwtZ5IQk6TR61s0N819i6yhA3vcvuxcj/dIjM5V4VGQJNEn dYkiI2Loo8zmZTXB2wGnj31sTLqWiEtA/5not8vCkbSOTr4MopEt2ph+tDBnzZZSL93y gwMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=n3rDGpSa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f14-20020a170902ce8e00b001b9ea0f0e25si11604321plg.607.2023.08.02.13.22.31; Wed, 02 Aug 2023 13:22:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=n3rDGpSa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232875AbjHBSJY (ORCPT <rfc822;maxi.paulin@gmail.com> + 99 others); Wed, 2 Aug 2023 14:09:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233350AbjHBSJW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 2 Aug 2023 14:09:22 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 223F11FD6; Wed, 2 Aug 2023 11:09:16 -0700 (PDT) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 372AZpbp024201; Wed, 2 Aug 2023 18:09:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : date : subject : mime-version : content-type : content-transfer-encoding : message-id : references : in-reply-to : to : cc; s=qcppdkim1; bh=XNMYA4UbcbSXzfcqNjsG0H+M63r3pQMWY3iLGwCz6eI=; b=n3rDGpSaOIIvvOa3z0TXlHvTfGTAmiz6mVQm2mHrH3LEnTi7JsEJPYWVG9HwVxUSqEEJ KF+jmey5nf0CxS/psoBWzuxO6YIJ7o8GjGwsz0MrgcveFQ/Ia1rvRp7sERzxoZGmU5e4 KWdnG3QO0JZ/XKTtHi4nouk9/RgIVOjrzz9nAqsOg9hRSXQT7qCd9DjAoeZmNVveXnaZ R8uKWnAcco/P/1DoM+ijbwPjQuRC5cNSLYXBYJAk7sz4eC0SvLbHR2Z3EiZ+QdRRSH9b 4qDZc7KyUV2/wn1M1noPvJ13QP0JKssP44yc3SNzl4Y7l4k9t/GWSQuMdVclyjwpCwpM 2A== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3s76jv30hs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Aug 2023 18:09:08 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 372I97a6025295 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 2 Aug 2023 18:09:07 GMT Received: from jesszhan-linux.qualcomm.com (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Wed, 2 Aug 2023 11:09:07 -0700 From: Jessica Zhang <quic_jesszhan@quicinc.com> Date: Wed, 2 Aug 2023 11:08:48 -0700 Subject: [PATCH v3 1/4] drm/msm/dpu: Move DPU encoder wide_bus_en setting MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20230802-add-widebus-support-v3-1-2661706be001@quicinc.com> References: <20230802-add-widebus-support-v3-0-2661706be001@quicinc.com> In-Reply-To: <20230802-add-widebus-support-v3-0-2661706be001@quicinc.com> To: Rob Clark <robdclark@gmail.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sean Paul <sean@poorly.run>, Marijn Suijten <marijn.suijten@somainline.org>, David Airlie <airlied@gmail.com>, "Daniel Vetter" <daniel@ffwll.ch> CC: <quic_abhinavk@quicinc.com>, <linux-arm-msm@vger.kernel.org>, <dri-devel@lists.freedesktop.org>, <freedreno@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>, Jessica Zhang <quic_jesszhan@quicinc.com> X-Mailer: b4 0.13-dev-034f2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1690999747; l=1688; i=quic_jesszhan@quicinc.com; s=20230329; h=from:subject:message-id; bh=v5usOJssXFWNQ35+PYIdulVA0KY1v7/lvKo5ADvLodg=; b=QNRCYxZXwNhEQ6iJF9jR3Jp8PqyJPnq3RqLVQ90YhkPRfHX2FWZhFtVDARncvUcRSiRlVZI73 faEywMDRjXyC/gnvqDOn3yTDfJDa582MJ6CRchoPLRY1fWW1gTyFQnw X-Developer-Key: i=quic_jesszhan@quicinc.com; a=ed25519; pk=gAUCgHZ6wTJOzQa3U0GfeCDH7iZLlqIEPo4rrjfDpWE= X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 1r9A7K8T_vsxGidKUlm4BcrjMgT7qtXi X-Proofpoint-GUID: 1r9A7K8T_vsxGidKUlm4BcrjMgT7qtXi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-02_13,2023-08-01_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 clxscore=1015 mlxscore=0 suspectscore=0 mlxlogscore=984 phishscore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308020160 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773144584095119678 X-GMAIL-MSGID: 1773150159040694817 |
Series |
drm/msm: Enable widebus for DSI
|
|
Commit Message
Jessica Zhang
Aug. 2, 2023, 6:08 p.m. UTC
Move the setting of dpu_enc.wide_bus_en to
dpu_encoder_virt_atomic_enable() so that it mirrors the setting of
dpu_enc.dsc.
Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
Comments
On 8/2/2023 12:32 PM, Marijn Suijten wrote: > I find this title very undescriptive, it doesn't really explain from/to > where this move is happening nor why. > > On 2023-08-02 11:08:48, Jessica Zhang wrote: >> Move the setting of dpu_enc.wide_bus_en to >> dpu_encoder_virt_atomic_enable() so that it mirrors the setting of >> dpu_enc.dsc. > > mirroring "the setting of dpu_enc.dsc" very much sounds like you are > mirroring _its value_, but that is not the case. You are moving the > initialization (or just setting, because it could also be overwriting?) > to _the same place_ where .dsc is assigned. Hi Marijn, Hmm.. got it. Will reword it to "mirror how dpu_enc.dsc is being set" if that makes it clearer. > > I am pretty sure that this has a runtime impact which we discussed > before (hotplug...?) but the commit message omits that. This is > mandatory. I'm assuming the prior discussion you're referring to is with Kuogee on his DSC fix [1]. Unlike DSC, both DSI and DP know if wide bus is enabled upon initialization. The main reasons the setting of the wide_bus_en flag was moved here were 1) to mirror how dpu_enc.dsc was being set (as stated in the commit message) as wide bus is related to DSC, and 2) account for the possibility of DSC for DSI being set during runtime in the future. Thanks, Jessica Zhang [1] https://patchwork.freedesktop.org/patch/543867/ > > - Marijn > >> >> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> >> --- >> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 11 +++++++---- >> 1 file changed, 7 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c >> index d34e684a4178..3dcd37c48aac 100644 >> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c >> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c >> @@ -1194,11 +1194,18 @@ static void dpu_encoder_virt_atomic_enable(struct drm_encoder *drm_enc, >> struct dpu_encoder_virt *dpu_enc = NULL; >> int ret = 0; >> struct drm_display_mode *cur_mode = NULL; >> + struct msm_drm_private *priv = drm_enc->dev->dev_private; >> + struct msm_display_info *disp_info; >> >> dpu_enc = to_dpu_encoder_virt(drm_enc); >> + disp_info = &dpu_enc->disp_info; >> >> dpu_enc->dsc = dpu_encoder_get_dsc_config(drm_enc); >> >> + if (disp_info->intf_type == INTF_DP) >> + dpu_enc->wide_bus_en = msm_dp_wide_bus_available( >> + priv->dp[disp_info->h_tile_instance[0]]); >> + >> mutex_lock(&dpu_enc->enc_lock); >> cur_mode = &dpu_enc->base.crtc->state->adjusted_mode; >> >> @@ -2383,10 +2390,6 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev, >> timer_setup(&dpu_enc->frame_done_timer, >> dpu_encoder_frame_done_timeout, 0); >> >> - if (disp_info->intf_type == INTF_DP) >> - dpu_enc->wide_bus_en = msm_dp_wide_bus_available( >> - priv->dp[disp_info->h_tile_instance[0]]); >> - >> INIT_DELAYED_WORK(&dpu_enc->delayed_off_work, >> dpu_encoder_off_work); >> dpu_enc->idle_timeout = IDLE_TIMEOUT; >> >> -- >> 2.41.0 >>
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index d34e684a4178..3dcd37c48aac 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -1194,11 +1194,18 @@ static void dpu_encoder_virt_atomic_enable(struct drm_encoder *drm_enc, struct dpu_encoder_virt *dpu_enc = NULL; int ret = 0; struct drm_display_mode *cur_mode = NULL; + struct msm_drm_private *priv = drm_enc->dev->dev_private; + struct msm_display_info *disp_info; dpu_enc = to_dpu_encoder_virt(drm_enc); + disp_info = &dpu_enc->disp_info; dpu_enc->dsc = dpu_encoder_get_dsc_config(drm_enc); + if (disp_info->intf_type == INTF_DP) + dpu_enc->wide_bus_en = msm_dp_wide_bus_available( + priv->dp[disp_info->h_tile_instance[0]]); + mutex_lock(&dpu_enc->enc_lock); cur_mode = &dpu_enc->base.crtc->state->adjusted_mode; @@ -2383,10 +2390,6 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev, timer_setup(&dpu_enc->frame_done_timer, dpu_encoder_frame_done_timeout, 0); - if (disp_info->intf_type == INTF_DP) - dpu_enc->wide_bus_en = msm_dp_wide_bus_available( - priv->dp[disp_info->h_tile_instance[0]]); - INIT_DELAYED_WORK(&dpu_enc->delayed_off_work, dpu_encoder_off_work); dpu_enc->idle_timeout = IDLE_TIMEOUT;