From patchwork Thu Feb 23 01:47:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 60751 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp57873wrd; Wed, 22 Feb 2023 17:53:29 -0800 (PST) X-Google-Smtp-Source: AK7set81wuALdZFUAvWNo37MN+as1isLK2ObT3mSxVzDij3zGleoQ/9xCP+zhp5St/r5mGS+at2J X-Received: by 2002:a17:90b:1b0f:b0:237:2edb:d4e3 with SMTP id nu15-20020a17090b1b0f00b002372edbd4e3mr6697294pjb.27.1677117209503; Wed, 22 Feb 2023 17:53:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677117209; cv=none; d=google.com; s=arc-20160816; b=qgPWSSCTiZGRcyRZhyqLE82nSZUQiILLN6SFWA7unWMuzsFB2FtM2Ry/kVDt88MgWf 3+eqZcD0KpTMgryAQCXw0uNfb+jxIdKlcz5deOJZAuiAcOrTzHCIMnhcHphiI9h/8CIG YFLp7Sjvytxconb2PlTN20Jv41a6iSRZHBRgOJOzCHvco/WTplDUOTANUltgmx1SRJFi d2KEh7cIIyazxLW+JUFmTdTtMurMn0hKjS03hMdXNCY6C0ojJG23C7PNOrsGoaR8bxbH tvIL90cQexPYnINAaAHtBDE5EwZ8X2iToaUdjaUO3bwFtn2k86SZL1FiomofgNo/Gb1l YYkA== 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=Uw9ANW8A0HIEHlu0J95K8GI8spDLrbsMISUzwV0ijx4=; b=enB3owuIT7Q8G67aAIb8573Us6DX2DtyQyzCuwqcxT3Ro1SIhJbDUQo1Pa8xWRaZJY 8CnKcLDPijzrHgA0coGxAWbevAJJDr7AUr7MX5ogu9+7RdtxNXKSjSCmh0ZZfbC8tguY LFCJ9d10AI+45efnUgOr7HD6bifzip8nmN0gAvQ62E6lNvp/inw2JnptBF1he4RmHC7G B+apufOG8s3p6hnefYi9peDJdYOWuB2Q29cfBD2SqvvTg1Y7eHTANkr1B5Foc2/w/1x8 FiN6vlXqXTBtKqI9WF/FLNZCUQAMd2oogIjRModZKEBjggVuk8i0VVemR/zZMtnTh+s2 Q/eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tQWLe5Wc; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jw1-20020a170903278100b00192721d6a97si9640163plb.499.2023.02.22.17.53.15; Wed, 22 Feb 2023 17:53:29 -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=@linaro.org header.s=google header.b=tQWLe5Wc; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233025AbjBWBsD (ORCPT + 99 others); Wed, 22 Feb 2023 20:48:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232992AbjBWBrt (ORCPT ); Wed, 22 Feb 2023 20:47:49 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75EE610D1 for ; Wed, 22 Feb 2023 17:47:48 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id f18so12475889lfa.3 for ; Wed, 22 Feb 2023 17:47:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Uw9ANW8A0HIEHlu0J95K8GI8spDLrbsMISUzwV0ijx4=; b=tQWLe5WcJzNbK/0p370q5JCC8xgYGmEwPZJ1u6Jeop0GH/tTM6fKYVde7vjXHCszdz f/ZjfII2Yl+byBaNLDjx0CQfwG3e0seCepo4C4GVKGCVRZmJByOi0FjsUQHZE8NTYyXD 6Ipy9iEz8c9OGNaIua1la3+dYcQjQ5wrpAkN9nkNKtGd37SwjHq0fGXCpH1cAOWMCyK7 LNNwXLk3mMsep1eDtljLQAr/JxPlaTqfaFeiZvMdLEPMmSU8T0ykV/iMy2Sar3KaGFNS k8eNDCmuGPhCtt3HlOSqjC+lTp8Wp2DJsdE/BzOuBJTjlKFf+1TDR2RwuybWldBf7YO7 u4tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Uw9ANW8A0HIEHlu0J95K8GI8spDLrbsMISUzwV0ijx4=; b=4isOBbrBY/xK0KTDhSfwnKOw8AM/W8TolpHO9mmQ1mxLiUVAwSl7sVG0e5BsyZKQOt mJVnVy4hf70YP+2yh1cMo+nU+gzfcQJIWgi+Y9kfTmfvHluAggGyz8JeEhsiJelQ+3mU H2rA671Co15dlqg3wHmppos/8RdG0896xMW1UyYuY4NtZ466air8HbN83dK9aEaQURpx 9yWGSKviuudGf3c2RvdqsMRYN5YGa8OS7hZFAC24K2tMgQ/HxmucXKCdeFBc2UonHVmS ZrSDwOecPUoAxYyCQaptjykVpQ6cn/H70ycIRoBPdeZ4AuDBRhxYE1fYBzFGJBxYWUfC W7nA== X-Gm-Message-State: AO0yUKWQLAefZXECR/rLegdOq+Ek2uuOaUHnh93FOOvgllvnH6sY0K1U 0bTbPY+XpOCVM1RhwVG3zWmrsXwzK2K9x1fv X-Received: by 2002:a19:f512:0:b0:4cb:c11:d01f with SMTP id j18-20020a19f512000000b004cb0c11d01fmr3528085lfb.22.1677116866864; Wed, 22 Feb 2023 17:47:46 -0800 (PST) Received: from [192.168.1.101] (abxi151.neoplus.adsl.tpnet.pl. [83.9.2.151]) by smtp.gmail.com with ESMTPSA id 12-20020ac2482c000000b004dc807b904bsm427376lft.120.2023.02.22.17.47.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 17:47:46 -0800 (PST) From: Konrad Dybcio Date: Thu, 23 Feb 2023 02:47:42 +0100 Subject: [PATCH v2 6/6] drm/msm/adreno: Enable optional icc voting from OPP tables MIME-Version: 1.0 Message-Id: <20230223-topic-opp-v2-6-24ed24cd7358@linaro.org> References: <20230223-topic-opp-v2-0-24ed24cd7358@linaro.org> In-Reply-To: <20230223-topic-opp-v2-0-24ed24cd7358@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677116858; l=767; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=lx2DqRTcWzcl/VYcOjFYV+HDGYAZOMxix7RaJuIvTv8=; b=mYkZ7qwqRbSRNaoLVDbG+NeuUgSJomROk/h9vglxkqTqHBuqRkB9BIoLFrYD7vD+bXjLGT7PYIoJ MeljqooSASz7mlvRrVYqcvglbqNK7hJ+uUF4kGeKVT8KaExP5mtI X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= 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_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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758584855032004835?= X-GMAIL-MSGID: =?utf-8?q?1758584855032004835?= Add the dev_pm_opp_of_find_icc_paths() call to let the OPP framework handle bus voting as part of power level setting. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/adreno_device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index 36f062c7582f..5142a4c72cfc 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -548,6 +548,10 @@ static int adreno_bind(struct device *dev, struct device *master, void *data) return PTR_ERR(gpu); } + ret = dev_pm_opp_of_find_icc_paths(dev, NULL); + if (ret) + return ret; + return 0; }