From patchwork Thu May 26 11:42:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 12862376 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78518C433EF for ; Thu, 26 May 2022 11:44:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B1D9F10F2C8; Thu, 26 May 2022 11:44:17 +0000 (UTC) Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3968210E083 for ; Thu, 26 May 2022 11:44:16 +0000 (UTC) Received: by mail-pg1-x52f.google.com with SMTP id s68so1116306pgs.10 for ; Thu, 26 May 2022 04:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mf/PBhXudWeikzmFArA4THf+WTmY69KBHxrOKvhpwhE=; b=JJrDny96JbGaIUMj4x/xpDMp+oQkXSZkQxSJGDuiTpnzlerMBuCp6OEPjlDrZjuPGT Ko/TRfplkx+duYaqEwQlc0npS3jyDJoPUUj95Jj7S1x78QZlaZpnETowzov1T7FLNHKU WwhZ5zjbbr6Y21jmTQLTrFTh3LFNLxfdnUmOgs8YH+knP5vuy3iYUy+BqPnqIgXEJgQF 6MlBwSUd/twgwhmgeO4ve2f17aHiDTqmPYpNpwHO8HQ5mZCaJ6iDUFUENAp/dQOh8H7d XjUQRyeQoBQTh7b7PW0XCab62PJdTIzFONf+GOV+J2n7JXOk0ovYgBxDCyJ7plc4qzKt +rvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mf/PBhXudWeikzmFArA4THf+WTmY69KBHxrOKvhpwhE=; b=L3rIep8wootgfepmZiI1OtsBPIRfgDmiE6hp00utAFjFckZ18vWGCOcIkGQFZvM9cu csacfKF6njWM0zM2+VH1tkmoukkJT54RY2X5XzmInQrSaP4++MicDPax+j08O+f+hEXh Y+UrY5pBVwiA5a3gABWCs/1pwMclZ8hYShNimZAPy8+9DBgwe2zef9CgXXfkLpOPS843 pOyyw3BM6+K5/7gF6dEjzKPc/pty9y2AyWI3oGuYuBOsKy0jur+AprKe00lnpSeiZlXz k5rvtBKeIlvRJ/8Oz0mcb8k9r5suOtmHfQdjpDo64ppAJUKrGkwrx6F83EaAbuZKun3m nVsw== X-Gm-Message-State: AOAM530SjXXmdk9q0eaJrOVxTqM6rqSZi/jLkpFDB7BsfzcbjYD3+mTD vZrDgbONNaVzUpAgiSaUSU+uFg== X-Google-Smtp-Source: ABdhPJziKnYEnwECbcUqLKProhmiWCkQ4BTngGPQbdjiQrftLw4d0/7RPvrSr33wj3o4SRqnCdRUlQ== X-Received: by 2002:a62:15ca:0:b0:518:2bd1:aa65 with SMTP id 193-20020a6215ca000000b005182bd1aa65mr37845386pfv.78.1653565455809; Thu, 26 May 2022 04:44:15 -0700 (PDT) Received: from localhost ([122.162.234.2]) by smtp.gmail.com with ESMTPSA id j17-20020a170903025100b00161b407771dsm1313142plh.48.2022.05.26.04.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 04:44:15 -0700 (PDT) From: Viresh Kumar To: Thierry Reding , Jonathan Hunter Subject: [PATCH 16/31] drm/tegra: Migrate to dev_pm_opp_set_config() Date: Thu, 26 May 2022 17:12:15 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , Vincent Guittot , linux-pm@vger.kernel.org, Stephen Boyd , Viresh Kumar , Rafael Wysocki , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Krzysztof Kozlowski , linux-tegra@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The OPP core now provides a unified API for setting all configuration types, i.e. dev_pm_opp_set_config(). Lets start using it. Signed-off-by: Viresh Kumar --- drivers/gpu/drm/tegra/gr3d.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/gr3d.c b/drivers/gpu/drm/tegra/gr3d.c index a1fd3113ea96..05c45c104e13 100644 --- a/drivers/gpu/drm/tegra/gr3d.c +++ b/drivers/gpu/drm/tegra/gr3d.c @@ -389,6 +389,10 @@ static int gr3d_init_power(struct device *dev, struct gr3d *gr3d) struct device_link *link; unsigned int i; int err; + struct dev_pm_opp_config config = { + .genpd_names = opp_genpd_names, + .virt_devs = &opp_virt_devs, + }; err = of_count_phandle_with_args(dev->of_node, "power-domains", "#power-domain-cells"); @@ -421,7 +425,7 @@ static int gr3d_init_power(struct device *dev, struct gr3d *gr3d) if (dev->pm_domain) return 0; - err = devm_pm_opp_attach_genpd(dev, opp_genpd_names, &opp_virt_devs); + err = devm_pm_opp_set_config(dev, &config); if (err) return err;