Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5136054rwb; Tue, 17 Jan 2023 09:35:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXt0cE3zO8ssChQug05qjSJ6FbCNKTJvjNh8c9uLlJSZgAgkB0iJ725Eny+yjEq6H5+QX8K/ X-Received: by 2002:a17:90b:3004:b0:229:19e3:3879 with SMTP id hg4-20020a17090b300400b0022919e33879mr4192658pjb.21.1673976914582; Tue, 17 Jan 2023 09:35:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673976914; cv=none; d=google.com; s=arc-20160816; b=k1ToTKzqrTl94FjawlvvxPOpPkajBXFR0b7ovbKMmWhXv/7YsPSe8zbxRkjfSgqiwB RmyvPyB9xYPNgxKHg7emR8uXmZNloq+OY4s2cNy/xdbgXXLesoQkSdi2mafnsU3om47D /HuyCwbpuNA3rrNTI6hm83G5/aT4aIgZSFieQQ3BgkSP4/1tLRIfi8Ufin4BAKc0f2K8 tNl3Ivg5/xT4uuNlN4z4w3cGm3+cxoEb2AXpPjM9fmYTMxvVnDXwbSl9grL8s/trVIyI fxCuwLaVKAZhW7Xat/M6Cy0qKhDt7s6CSCqLGS2RMxVSi4DwIDsBbhNDTh+Oja2lpytM Tqsg== 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=CMUiND6SnIwB9sjI7rtmvilq/3s4ZbHzOgUy3H3Ysvw=; b=bjJ2aASVtAyN3EAgVeZJ7cAFTwuGJjv3R2d3b2j25cbH5ApLFdyOBLVoKiet8ZaBZU FboE56EUtM3fT7U7bayvT2zEOiriQ4OMHU/XgVSncXBy5ioI1bQkoaoSPVBg8tegyBTf 7TfFgX3YYgUJbEhC8ZhODgZ83Dkl1f/tth2hKnsZuoO5jraJbs06e1RJIAKK14eNgOvj YJaxzSMivTIdI7nr+O1euSNkXbIe/y7JQ+e36Os9L2vI8BGcrwsVCsuHK9zc8+WDf0A/ WgGFU7Bm4fhYlvFyKG6a7BYBbj+ChaVbcoGTHfyRWjL/+gXosaV5sh1H5AI7yJ7hU8/H 9URg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=EpGbZkVM; 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 lx11-20020a17090b4b0b00b00227213d4563si26450970pjb.144.2023.01.17.09.35.08; Tue, 17 Jan 2023 09:35:14 -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=EpGbZkVM; 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 S229700AbjAQQVo (ORCPT + 48 others); Tue, 17 Jan 2023 11:21:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbjAQQVk (ORCPT ); Tue, 17 Jan 2023 11:21:40 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A21783D0A5; Tue, 17 Jan 2023 08:21:39 -0800 (PST) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30HEkMoU031207; Tue, 17 Jan 2023 16:21:37 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=CMUiND6SnIwB9sjI7rtmvilq/3s4ZbHzOgUy3H3Ysvw=; b=EpGbZkVM8UFskEvQtkAFp1RYc7fSmkfWGHZ4Fp4DxcTkAEh2++wPcnpL+ayBWR11o03D DqpmJejEIOVqsHXEiRxv8ZdkV3vwvuVzIEBHU+YHXTzgahT7w2SStmytAUD6AhrqIHBg Gexw1sloD7T+xFhMkD2bSsxiW8j9EZED0WRw2W7j3acnvKBAm5KNQS8lGz0WtKYyK3oK H479lWFEgdWM6n2Dgj74O3KFS9EWFwi0LQTZMXZEXNNYVH1+7SjKJjw7E/Ks2VlOT2Wy xeAH3YSAXLDjctu+/aYSnYZRHBzjBeDq08W3AQGtI5RhyTNFOmMDhhjgLaN5EuhUjWPj 5g== 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 3n5r2qgta2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Jan 2023 16:21:37 +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 30HGLXrR014792; Tue, 17 Jan 2023 16:21:33 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3n3nfk7sus-1; Tue, 17 Jan 2023 16:21:33 +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 30HGLXHX014786; Tue, 17 Jan 2023 16:21:33 GMT Received: from kalyant-linux.qualcomm.com (kalyant-linux.qualcomm.com [10.204.66.210]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 30HGLXFh014783; Tue, 17 Jan 2023 16:21:33 +0000 Received: by kalyant-linux.qualcomm.com (Postfix, from userid 94428) id B485F4B06; Tue, 17 Jan 2023 08:21:32 -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 1/3] drm/msm/disp/dpu1: allow reservation even if dspps are not available. Date: Tue, 17 Jan 2023 08:21:26 -0800 Message-Id: <1673972488-30140-2-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-ORIG-GUID: 9EIWkcfpadbyPtSNePQk4K0Yh3mXvCIt X-Proofpoint-GUID: 9EIWkcfpadbyPtSNePQk4K0Yh3mXvCIt 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 malwarescore=0 clxscore=1015 priorityscore=1501 spamscore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 adultscore=0 phishscore=0 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 if any topology requests for dspps and catalogue doesn't have the allocation, avoid failing the reservation. This can pave way to build logic allowing composer fallbacks for all the color features that are handled in dspp. Signed-off-by: Kalyan Thota --- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c index 73b3442..c8899ae 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c @@ -343,7 +343,13 @@ static bool _dpu_rm_check_lm_and_get_connected_blks(struct dpu_rm *rm, return true; idx = lm_cfg->dspp - DSPP_0; - if (idx < 0 || idx >= ARRAY_SIZE(rm->dspp_blks)) { + + if (idx < 0) { + DPU_DEBUG("lm doesn't have dspp, ignoring the request %d\n", lm_cfg->dspp); + return true; + } + + if (idx >= ARRAY_SIZE(rm->dspp_blks)) { DPU_ERROR("failed to get dspp on lm %d\n", lm_cfg->dspp); return false; } -- 2.7.4