Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5125486rwb; Tue, 17 Jan 2023 09:27:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXufE5u9qtW+QbcTnaFXVxnG48bH3su/saFxOFMy4QTHhVSvPjt7r8LF9ORgPhz6nPMP2v6G X-Received: by 2002:a17:907:d684:b0:7c1:e78:1e2 with SMTP id wf4-20020a170907d68400b007c10e7801e2mr3866389ejc.11.1673976478592; Tue, 17 Jan 2023 09:27:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673976478; cv=none; d=google.com; s=arc-20160816; b=SLVqLDbM9rG7fCX8OybPNQu6076F35hLASxIF/UEHwSAh5pJFeNTJg7f9WFHOZ2DrL 98AzcB0oedv3lDNrAG9hQp59bsNsUa7A0njrgNJmwUCxNBXlXABfwR/Ie3rMh+tgMZoJ mtpljpLy7HZ20Ctri8xsfDG/jxWHiqECq4j8VWyDBN3+xBKRsNODecepcY1mAQalgarx xdnUNcf9n4M/SRj2X0MpF2KhM/zSFmOys10sqDvHg3QVeDq1hjkNb1gKiuZSP8aKOiab y/mpEjhXbDWRfIlLxWNnwrq2JdZRMlWqYvcp1S8WSwlFi4lvwSSL09K28QyNve5aaeD/ 4spQ== 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=8l6r3oGXtQ4eFNhlS+2XD+vzNkErClOvY4jbLM9GnxA=; b=Q0fTf5ykOf85GVwq4zjBHpQMSV69DH6slQIVnkWY26mbNcSPfA2EhFJBMD8gjW6xlB zETSNigb+yv1XNIuc1ahU+fIgcySC0r1RTozIY/hQ+uGv8tJC9jIXpJfau2MgWDtWD1f 24EYU/jZqGuUm8qCA2766ZuVztheFn2wN9ZN4GrrfmC8BDr1YwMZ0uc7PbCctvIi3Eyn xmh37DCChRE5UdWeo1Vve16ljstEDl7VSpoXkiIzyiewIGjdWrn+2H1qGg2hbM8LeVDQ sLGOlG7IPqCPO5i/xavWlq1zCllLWwXgjDIiTl8TE36YTDM+25rvuVOcv4qj7oRUnYXW fKLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=HolnVwoS; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz16-20020a0564021d5000b0049e00541168si12144502edb.304.2023.01.17.09.27.46; Tue, 17 Jan 2023 09:27:58 -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=HolnVwoS; 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 S232503AbjAQQV4 (ORCPT + 48 others); Tue, 17 Jan 2023 11:21:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231742AbjAQQVn (ORCPT ); Tue, 17 Jan 2023 11:21:43 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B390C3D0A5; Tue, 17 Jan 2023 08:21:42 -0800 (PST) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30HEbjjd003067; Tue, 17 Jan 2023 16:21:40 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=8l6r3oGXtQ4eFNhlS+2XD+vzNkErClOvY4jbLM9GnxA=; b=HolnVwoSXYbFNVoItG1qDyI2U9SZ4/TmCveH3INtaOu6PDyZAlA2iDAgQN+og2+vy6bm T8O7T5VQpKRly8/Yb0i2yZpZWtJ+Wxkn3HiC6xX1sBA78T6AdnzWBC729KAmQF3J4CMH laklkJnGIVRCEHY2Q2fkXzwpo1dDikXHltXO/ZnAVxnveF2iNp4T9iFmzw2hz4rctwdf xDES0rpWYFesmaMBFDdUGEVUwv8VrLgc3nNSNJwxv3kaGJx6xxHeW0JrpXtyk8dAC9+Q RbjgZWvrwdnk5TqebNVPwj/rkw9HnNt+419jshmfm2yfdoVaT6aMirPglsIs0JqsA0Fy ZQ== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n3mm9wskp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Jan 2023 16:21:40 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 30HGLaAV014806; Tue, 17 Jan 2023 16:21:36 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3n3nfk7sv0-1; Tue, 17 Jan 2023 16:21:36 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30HGLav2014801; Tue, 17 Jan 2023 16:21:36 GMT Received: from kalyant-linux.qualcomm.com (kalyant-linux.qualcomm.com [10.204.66.210]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 30HGLagF014798; Tue, 17 Jan 2023 16:21:36 +0000 Received: by kalyant-linux.qualcomm.com (Postfix, from userid 94428) id 8BF134B06; Tue, 17 Jan 2023 08:21:35 -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 Subject: [PATCH 2/3] drm/msm/disp/dpu1: allow dspp selection for all the interfaces Date: Tue, 17 Jan 2023 08:21:27 -0800 Message-Id: <1673972488-30140-3-git-send-email-quic_kalyant@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673972488-30140-1-git-send-email-quic_kalyant@quicinc.com> References: <1673972488-30140-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-GUID: TnMJU5Sz2oNNRAHDxbjadSDMfcib3gH7 X-Proofpoint-ORIG-GUID: TnMJU5Sz2oNNRAHDxbjadSDMfcib3gH7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-17_08,2023-01-17_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 spamscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 impostorscore=0 adultscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 mlxlogscore=522 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301170131 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE 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: X-Mailing-List: linux-kernel@vger.kernel.org Allow dspps to be populated as a requirement for all the encoder types it need not be just DSI. If for any encoder the dspp allocation doesn't go through then there can be an option to fallback for color features. Signed-off-by: Kalyan Thota --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 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..e39b345 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; @@ -563,8 +564,9 @@ static struct msm_display_topology dpu_encoder_get_topology( * 1 LM, 1 INTF * 2 LM, 1 INTF (stream merge to support high resolution interfaces) * - * Adding color blocks only to primary interface if available in - * sufficient number + * dspp blocks are made optional. If RM manager cannot allocate + * dspp blocks, then reservations will still go through with non dspp LM's + * so as to allow color management support via composer fallbacks */ if (intf_count == 2) topology.num_lm = 2; @@ -573,11 +575,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 && + (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 +643,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) { -- 2.7.4