Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp157981pxu; Thu, 7 Jan 2021 01:04:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJyItz0sP+n3xaSocTeJeKnoozel4AEQOZ4vxJdgA3CzZCnMCotncDd4yxOlrkX18VavCYAA X-Received: by 2002:a17:906:da08:: with SMTP id fi8mr5563093ejb.517.1610010254409; Thu, 07 Jan 2021 01:04:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610010254; cv=none; d=google.com; s=arc-20160816; b=v2nWJUncN72VRVOd07t9mhXut938Uafnf0WjJr8I9fg+SZAYNEjVV/KPnowdab7T92 hX8SPkegzcKrfs6T3LyseOuTYf8TuW1sM5xNst9+tL4C3QOIfJPoaWdno1ONpAbDgDDV y3V3jY8Ot3YluIZpz6RwiQ7eTi6Z3Akchs5ujQbuNmJdrVCrUzcWyaOg6/ItZOArUjWf c9rhpgsNuye6AIEPRFbNiTe5BHn4vkCWlREgh7eRPTdczTa1lqdgH0rc51QLxnUtfq+5 6n8+SKW9DlVKQ/dkVBl9jvn/Nm5qOhZrqSaB8HFYFV8Zy1KR35QJoA/2jmyzxrFqsI0z hkKw== 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 :dkim-signature; bh=DastRFZT0YRTJbhjin4LYkaltVM19avoz7xyKVGj6Dw=; b=aUHxAv2M4AKt2YeAIadz2hh5PGYojAXd7l5yxjl4M1p6cStGP6rfPLuY1D/OYbhTJZ frnSHBfcn60rZHR6thwTcAYmNS62Og/7AfYwvfxhtrA27GD2GuKN92U+xy3hEalktk84 TTTm1nXtod9hBJfhC3O3lCkua2RPoojMAFgFa1CoXKkFJGSJ8t+wVbmMPokSPhV/rIHf pZGX1xEbS+FuuMmnp9+kIYbbtDLIia+GjNfRH7ewZQNt6jipi6J8fQzwFYB+e4XQv9Eu G7kJqFtx9Ap3RVRJNk63Uk+EOb7p3V/p9Wlyx4HkLvntrUl534yr0pMZQrE1GH50kjDB cTfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WrquiLyH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ar24si1936325ejc.359.2021.01.07.01.03.50; Thu, 07 Jan 2021 01:04:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WrquiLyH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727362AbhAGJBe (ORCPT + 99 others); Thu, 7 Jan 2021 04:01:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726799AbhAGJBd (ORCPT ); Thu, 7 Jan 2021 04:01:33 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07C73C0612FC for ; Thu, 7 Jan 2021 01:00:39 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id i5so4424607pgo.1 for ; Thu, 07 Jan 2021 01:00:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DastRFZT0YRTJbhjin4LYkaltVM19avoz7xyKVGj6Dw=; b=WrquiLyHqpze9casezEGrj757u5zzRnCqbtbUbvIk0QNnvRcaJNK0xR0rdxlvB7CVS FtN+2XUyriUFa1bhhxvy7N/Y4ric5y6tEAy/jbM37TOvErEvReLZ32l3Haj+Y7Q0n54q vBbYoVGOdM/cXwFGSUX3rJeoaot0xKiveejdM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DastRFZT0YRTJbhjin4LYkaltVM19avoz7xyKVGj6Dw=; b=f8b064EoEdSWYnwTfc9U9otWizlpb75WEbxvoAnJKrVbvDEZxhlMMmteig8FShvZ1c FFCcek/Nh4UoFkmIqFJcPzpxAk6JmU+Okqa6wT+qQGWSX1ODa1dFT4bJBlHLqIxHYPnO E1btamehGLaSCM4+eEXk8fJtZRR/G6dJbpsHghwj2dSqNYdH0w+LA2DJyWUzig0MHCJu c6CHmC1cr29GSal5cf5nBzQt63gZRrZBvyqM0XRM1lqpn+osyVsKMh8TMFJuojokxwkR Z79jMGa8EbwuAoo0V4/ETRxhSUWqnW2ObOpQXeZh6w0NmeXwvBSExFRz0EmIBfkwfo2S Au2Q== X-Gm-Message-State: AOAM532ahw/gR1nymZpzcOTxHzX1o8uaO4vfATSEgr3VH56rjF6BPKS7 tBukKDQtxOqbsfKdxHT5pf4Rhg== X-Received: by 2002:a62:145:0:b029:19e:a395:bd3d with SMTP id 66-20020a6201450000b029019ea395bd3dmr7842250pfb.13.1610010038443; Thu, 07 Jan 2021 01:00:38 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:7220:84ff:fe09:41dc]) by smtp.gmail.com with ESMTPSA id a29sm5022421pfr.73.2021.01.07.01.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 01:00:37 -0800 (PST) From: Nicolas Boichat To: Rob Herring , Steven Price , Alyssa Rosenzweig Cc: hsinyi@chromium.org, hoegsberg@chromium.org, Tomeu Vizoso , boris.brezillon@collabora.com, fshao@chromium.org, Nicolas Boichat , Daniel Vetter , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 3/4] drm/panfrost: devfreq: Disable devfreq when num_supplies > 1 Date: Thu, 7 Jan 2021 17:00:21 +0800 Message-Id: <20210107170017.v8.3.I3af068abe30c9c85cabc4486385c52e56527a509@changeid> X-Mailer: git-send-email 2.29.2.729.g45daf8777d-goog In-Reply-To: <20210107090022.3536550-1-drinkcat@chromium.org> References: <20210107090022.3536550-1-drinkcat@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org GPUs with more than a single regulator (e.g. G72 on MT8183) will require platform-specific handling, disable devfreq for now. Signed-off-by: Nicolas Boichat Reviewed-by: Tomeu Vizoso --- Changes in v8: - Use DRM_DEV_INFO instead of ERROR Changes in v7: - Fix GPU ID in commit message Changes in v6: - New change drivers/gpu/drm/panfrost/panfrost_devfreq.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c index f44d28fad085..812cfecdee3b 100644 --- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c +++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c @@ -92,6 +92,15 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev) struct thermal_cooling_device *cooling; struct panfrost_devfreq *pfdevfreq = &pfdev->pfdevfreq; + if (pfdev->comp->num_supplies > 1) { + /* + * GPUs with more than 1 supply require platform-specific handling: + * continue without devfreq + */ + DRM_DEV_INFO(dev, "More than 1 supply is not supported yet\n"); + return 0; + } + opp_table = dev_pm_opp_set_regulators(dev, pfdev->comp->supply_names, pfdev->comp->num_supplies); if (IS_ERR(opp_table)) { -- 2.29.2.729.g45daf8777d-goog