Message ID | 20221221231943.1961117-6-marijn.suijten@somainline.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp33288wrn; Wed, 21 Dec 2022 15:21:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXt6U6qNTiLRj5JAV026Y0fkYpqFUpaIpT7eGHV7pKVA5wYPBQ/O7la5mTIVr2cwsIlsqiwd X-Received: by 2002:a05:6a20:4f88:b0:ac:5a0c:32ad with SMTP id gh8-20020a056a204f8800b000ac5a0c32admr3251654pzb.53.1671664917817; Wed, 21 Dec 2022 15:21:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671664917; cv=none; d=google.com; s=arc-20160816; b=CsSSpJjnStxzd4GSVc8XqmqTVFvU/oFeHNjlQihV269IwMIqrCQituXLAb8D5Gqz76 N+rxMwgXBwC5IQE4JK9r8j/3eooxDX3WSskITtJ4bmqqP5YAO6KV33O6YhFYt85IT9kx 3lk3xbMJwmvEVGZVpUdMeZog19F0E1AOiTXo8S5xfbZrbAwEVpEFacbnyfOyogHnZKgC 5muecacIM56TtyEa7kKvJUM2iqo+uLpzHwocQe33krrAH5cBOTGW8pWUjdcqhhRct1e4 V6GMPy7Mu7B/BDgQWa83eeykUd4JsxKfO5YieDj0wjxO2jwGi9fY6tqQGfjZ56wxnPdI y/hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=FpJ/J2rmkueAtztW1ZEE/VCFcMHbv+ru35oRYFjAtbY=; b=VslREwMr6UTK72j32y+mKLE5Y3MyWZMkQJBgJBmjCui40foFKJ9zBkslBCQie7SyzP HyOb6gLvlX8R4Sub80aeqBD8NKur6orOzGdTXB5SAoViSMDzCHsbQ9diPlxznQEbkfxM Nw9apHA98zFfuOzdKq940RgaKMxtB1zvO7sGevQ2CtMgw6fjkYCqK+bMSQ1W7GBZ1uI+ G2qSn+UH9L1FeFGgdOMvSeB5wRsYGUF1oGaobyXtsmrmM9IMa9+vP97U1TjaYCi4b4Gk 93cOpMYb0aPyB6h4KmEaxj7B7K86BtJK3KgxONgAxprf2Ov8aUYWBJTSWm/sUI6ZjIk1 lmsw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 141-20020a630193000000b00491c2c993b8si3882392pgb.763.2022.12.21.15.21.44; Wed, 21 Dec 2022 15:21:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235027AbiLUXUY (ORCPT <rfc822;pacteraone@gmail.com> + 99 others); Wed, 21 Dec 2022 18:20:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234997AbiLUXUL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 21 Dec 2022 18:20:11 -0500 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [IPv6:2001:4b7a:2000:18::163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F287024BE3 for <linux-kernel@vger.kernel.org>; Wed, 21 Dec 2022 15:20:05 -0800 (PST) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 8ACD82038C; Thu, 22 Dec 2022 00:20:03 +0100 (CET) From: Marijn Suijten <marijn.suijten@somainline.org> To: phone-devel@vger.kernel.org, Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Vinod Koul <vkoul@kernel.org> Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>, Konrad Dybcio <konrad.dybcio@somainline.org>, Martin Botka <martin.botka@somainline.org>, Jami Kettunen <jami.kettunen@somainline.org>, Marijn Suijten <marijn.suijten@somainline.org>, Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Stephen Boyd <swboyd@chromium.org>, Bjorn Andersson <andersson@kernel.org>, Jessica Zhang <quic_jesszhan@quicinc.com>, =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= <ville.syrjala@linux.intel.com>, Kuogee Hsieh <quic_khsieh@quicinc.com>, Jani Nikula <jani.nikula@intel.com>, sunliming <sunliming@kylinos.cn>, Sam Ravnborg <sam@ravnborg.org>, Haowen Bai <baihaowen@meizu.com>, Konrad Dybcio <konrad.dybcio@linaro.org>, Loic Poulain <loic.poulain@linaro.org>, Vinod Polimera <quic_vpolimer@quicinc.com>, Douglas Anderson <dianders@chromium.org>, Vladimir Lypak <vladimir.lypak@gmail.com>, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/8] drm/msm/dpu: Reject topologies for which no DSC blocks are available Date: Thu, 22 Dec 2022 00:19:40 +0100 Message-Id: <20221221231943.1961117-6-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221221231943.1961117-1-marijn.suijten@somainline.org> References: <20221221231943.1961117-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752867712599292034?= X-GMAIL-MSGID: =?utf-8?q?1752867712599292034?= |
Series |
drm/msm: DSC Electric Boogaloo for sm8[12]50
|
|
Commit Message
Marijn Suijten
Dec. 21, 2022, 11:19 p.m. UTC
Resource allocation of DSC blocks should behave more like LMs and CTLs
where NULL resources (based on initial hw_blk creation via definitions
in the catalog) are skipped ^1. The current hardcoded mapping of DSC
blocks however means that resource allocation shouldn't succeed at all
when the DSC block on the corresponding index doesn't exist, rather than
searching for the next free block.
This hardcoded mapping should be loosened separately as DPU 5.0.0
introduced a crossbar where DSC blocks can be "somewhat" freely bound to
any PP and CTL (in proper pairs).
^1: which, on hardware that supports DSC, can happen after a git rebase
ended up moving additions to _dpu_cfg to a different struct which has
the same patch context.
Fixes: f2803ee91a41 ("drm/msm/disp/dpu1: Add DSC support in RM")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 5 +++++
1 file changed, 5 insertions(+)
Comments
On 22/12/2022 01:19, Marijn Suijten wrote: > Resource allocation of DSC blocks should behave more like LMs and CTLs > where NULL resources (based on initial hw_blk creation via definitions > in the catalog) are skipped ^1. The current hardcoded mapping of DSC > blocks however means that resource allocation shouldn't succeed at all > when the DSC block on the corresponding index doesn't exist, rather than > searching for the next free block. > > This hardcoded mapping should be loosened separately as DPU 5.0.0 > introduced a crossbar where DSC blocks can be "somewhat" freely bound to > any PP and CTL (in proper pairs). > > ^1: which, on hardware that supports DSC, can happen after a git rebase > ended up moving additions to _dpu_cfg to a different struct which has > the same patch context. > > Fixes: f2803ee91a41 ("drm/msm/disp/dpu1: Add DSC support in RM") > Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 5 +++++ > 1 file changed, 5 insertions(+) Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c index 8471d04bff50..dcbf03d2940a 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c @@ -496,6 +496,11 @@ static int _dpu_rm_reserve_dsc(struct dpu_rm *rm, /* check if DSC required are allocated or not */ for (i = 0; i < num_dsc; i++) { + if (!rm->dsc_blks[i]) { + DPU_ERROR("DSC %d does not exist\n", i); + return -EIO; + } + if (global_state->dsc_to_enc_id[i]) { DPU_ERROR("DSC %d is already allocated\n", i); return -EIO;