From patchwork Fri Jan 27 10:15:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalyan Thota X-Patchwork-Id: 49157 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp755766wrn; Fri, 27 Jan 2023 02:18:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXsWZWgoO3kN+SfiY9NDIFN9No0Aj16zdjI7LmWq5jNFYrPOWs6vgElyqodgL27OzmeojfnK X-Received: by 2002:a05:6402:28ca:b0:499:70a8:f91a with SMTP id ef10-20020a05640228ca00b0049970a8f91amr40859313edb.19.1674814736308; Fri, 27 Jan 2023 02:18:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674814736; cv=none; d=google.com; s=arc-20160816; b=Ll2kclk+MyKM719zxvJudfTRSJMMZ+pUl26js62YysrNCZMZh9qYbsdvG6BhBwEfi8 AaEEypTGoTHdP6hcz7V6+lzRO1iMjVfbVs6/s6dYmgIze2igGlRbcW1CMP2bTHC9Orry rWzRo2ThonsRLmL+iVMX76NPbyTVrxDE+cEzS5l7kn3fPCUSE89366Uu7KAAC5svVqyF hWlcMVPjk/Sj2zKmdCUgJwkbf4GktsalxCddrufqj3KO1gf3dI/Cy4oxQGaNSLJsZi+F HRWgL2zW+5wa3KszHnFbvwDsudCkMT34eTNvm4dQyv+1eesyOlefeyBiz7kIfVG9Vdp0 0IbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=F+NVfrpPkujXLAFhLHAFnE5xU6nUW+MZpGTrDE6u64E=; b=SQKPe6GB/vyuaCX84y4dw6YysueiiRwXsszYQP9dyU7p1/uN6GJI1+wpnoV45G9m/m fD+G/1SGjJ2I5LP+QLJtqH6qMiWX5AH1N7/50QhAMY+2F2LvaqtKVNvT3stFZ1thc5j3 SxtaOdioKp9m73XwdA8YEy+DHMUq1ER6930NBQGhpzngd7D/VX6TvuFaQ2P/hMxWADcA ykxuTEkSOuBjk3yPACUuZ8lf5prbABqbYTyBOm/oBlvcSizBv/LMg6Yb91wevkN3bHg6 Etman3q0xXBIzvOkvMdNex3bX/RG1WJZ36qhQ5ot3RMnDHPJ2ITpKlqnclosS+WC617E sIrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="IvVF7/L7"; 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 wi3-20020a170906fd4300b0078df1c345dcsi3700039ejb.535.2023.01.27.02.18.32; Fri, 27 Jan 2023 02:18:56 -0800 (PST) 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="IvVF7/L7"; 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 S231981AbjA0KQG (ORCPT + 99 others); Fri, 27 Jan 2023 05:16:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233039AbjA0KQA (ORCPT ); Fri, 27 Jan 2023 05:16:00 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE8357682; Fri, 27 Jan 2023 02:15:57 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30R9JxE3029288; Fri, 27 Jan 2023 10:15:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=qcppdkim1; bh=F+NVfrpPkujXLAFhLHAFnE5xU6nUW+MZpGTrDE6u64E=; b=IvVF7/L7tRVcFiPuZNaKYhZ4oUIHHO+PvUkFmCcGXY0zH58adBS0kn9vUYNOEnWqJ7Y4 ZG0J9pVQB6Ah3F24RX5uBh9eU8QmwlTcyYmWFEHhErOuAbqzDFjpHmrSteihvmJgcY/a z26rCaak7TFvNxLKAQkQzHJMrbydk+eXJBvCrWbbx+XZSbL9QI55Zs5NIp23IeASVkMf lA53CWqBaxMdJlK88X0/gn+GCyLIa2U/YDSp7hqNih52ntOTH9oKr1jysXFyXK+RJNhI nq5luoAplBOxjXkXDTbbWysPfbeIyNAsUuedq4hqjD+zFB4DfTm1U9IBs5SlAkmFhCXh Bw== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nc9ysr7rs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Jan 2023 10:15:53 +0000 Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 30RAFoov002411; Fri, 27 Jan 2023 10:15:50 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3n894m35k9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 27 Jan 2023 10:15:50 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30RAFndM002375; Fri, 27 Jan 2023 10:15:49 GMT Received: from kalyant-linux.qualcomm.com (kalyant-linux.qualcomm.com [10.204.66.210]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 30RAFntE002374; Fri, 27 Jan 2023 10:15:49 +0000 Received: by kalyant-linux.qualcomm.com (Postfix, from userid 94428) id 9633C4B77; Fri, 27 Jan 2023 02:15:48 -0800 (PST) From: Kalyan Thota To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org Cc: Kalyan Thota , linux-kernel@vger.kernel.org, robdclark@chromium.org, dianders@chromium.org, swboyd@chromium.org, quic_vpolimer@quicinc.com, dmitry.baryshkov@linaro.org, quic_abhinavk@quicinc.com, marijn.suijten@somainline.org Subject: [PATCH 2/3] drm/msm/disp/dpu1: add dspps into reservation if there is a ctm request Date: Fri, 27 Jan 2023 02:15:44 -0800 Message-Id: <1674814545-9453-3-git-send-email-quic_kalyant@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1674814545-9453-1-git-send-email-quic_kalyant@quicinc.com> References: <1674814545-9453-1-git-send-email-quic_kalyant@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: NrlOMePMu1Z1iM0j6ShOWrcQVUCZDzvD X-Proofpoint-GUID: NrlOMePMu1Z1iM0j6ShOWrcQVUCZDzvD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-27_06,2023-01-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 mlxscore=0 phishscore=0 suspectscore=0 adultscore=0 bulkscore=0 impostorscore=0 mlxlogscore=890 spamscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301270096 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE, SPF_NONE autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756170536890879629?= X-GMAIL-MSGID: =?utf-8?q?1756170536890879629?= Add dspp blocks into the topology for reservation, if there is a ctm request for that composition. Signed-off-by: Kalyan Thota Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 9c6817b..8d76cb3 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -545,7 +545,8 @@ bool dpu_encoder_use_dsc_merge(struct drm_encoder *drm_enc) static struct msm_display_topology dpu_encoder_get_topology( struct dpu_encoder_virt *dpu_enc, struct dpu_kms *dpu_kms, - struct drm_display_mode *mode) + struct drm_display_mode *mode, + struct drm_crtc_state *crtc_state) { struct msm_display_topology topology = {0}; int i, intf_count = 0; @@ -573,11 +574,9 @@ static struct msm_display_topology dpu_encoder_get_topology( else topology.num_lm = (mode->hdisplay > MAX_HDISPLAY_SPLIT) ? 2 : 1; - if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_DSI) { - if (dpu_kms->catalog->dspp && - (dpu_kms->catalog->dspp_count >= topology.num_lm)) - topology.num_dspp = topology.num_lm; - } + if (dpu_kms->catalog->dspp && crtc_state->ctm && + (dpu_kms->catalog->dspp_count >= topology.num_lm)) + topology.num_dspp = topology.num_lm; topology.num_enc = 0; topology.num_intf = intf_count; @@ -643,7 +642,7 @@ static int dpu_encoder_virt_atomic_check( } } - topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode); + topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode, crtc_state); /* Reserve dynamic resources now. */ if (!ret) {