Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp410463pxu; Thu, 7 Jan 2021 08:03:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxkiL6Fm9x3HPFn5P/zMbEUqJExOyv97o2FOJXtX0IHa652fDGtG3JUczmN83rNvdJTMmVK X-Received: by 2002:a05:6402:45:: with SMTP id f5mr2126788edu.273.1610035381756; Thu, 07 Jan 2021 08:03:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610035381; cv=none; d=google.com; s=arc-20160816; b=UfmTRqgIVOEIb+LTYxCLa8k2pnfPER0LJWeYBEEFcJM6j6GtrHYUqDGoH1nDsFej4O fI1cBjMR8IvFNWU6EEKwqJh0Kdtapfoa0h7uY6XkYB3gH9umAcu6AZEcP0D5p1Jhk8b5 glJqsdMuZnSgf2jmaQuFNyheKEVIc/1rWvOMiezDHt9VGCs9kHRE5434oS9WooQlV0SQ 5/zsBn/Je6qTMK3VEc1pYyNP+Hoile2M4DvYNMu/EYfXoYw9Mdk1EwEs6icWbzMgwYH0 XBXBoYQ0vsedAhKQ/AjwWcMPXmVMBdzvpx3AzYPGe76u8qV1d1STyqPZy1HpKbHOI9Tj t2Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=+4U/6fVetWNsFNOR0ae5xfNH5OeWm05q58VTkY7jGiE=; b=vy94hMQX6fFA0MgCjRA6JdiuP4o/EVBmcY1wIqX+gZugPbLXQ3SaiEElk3sfVWTNx5 xNGop6AaXBRUmO50AAB7Tu7LOGocjhywvJpet7+damGg1QpVTodVA2SNo0txz29wrg0e sIvPaCIORr/EvJQopAKehfehgBvkO9J2Azq/IDHQbTOCvRUFBnMUJqJYPyN1JhcQSstl +sZIXeOOKzVbb34Al/csYSvfDwbCU/SNnM42ZZQ7mJR9irQq7IQNB2V75RNFuX06hw6Q nFEOmENb64ZZRsTPMI6rWWculhPTGw+3q1P6xTkQ8VNRUTuUgVl5AljUm4HUKApI7WbG A46g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si2544401edt.50.2021.01.07.08.02.32; Thu, 07 Jan 2021 08:03:01 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726514AbhAGQAp (ORCPT + 99 others); Thu, 7 Jan 2021 11:00:45 -0500 Received: from foss.arm.com ([217.140.110.172]:35256 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725965AbhAGQAp (ORCPT ); Thu, 7 Jan 2021 11:00:45 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0CA2B31B; Thu, 7 Jan 2021 07:59:59 -0800 (PST) Received: from [192.168.1.179] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 78C533F719; Thu, 7 Jan 2021 07:59:57 -0800 (PST) Subject: Re: [PATCH v6 3/4] drm/panfrost: devfreq: Disable devfreq when num_supplies > 1 To: Nicolas Boichat , Rob Herring , Alyssa Rosenzweig Cc: hsinyi@chromium.org, hoegsberg@chromium.org, fshao@chromium.org, boris.brezillon@collabora.com, Daniel Vetter , David Airlie , Tomeu Vizoso , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20210105001119.2129559-1-drinkcat@chromium.org> <20210105081111.v6.3.I3af068abe30c9c85cabc4486385c52e56527a509@changeid> From: Steven Price Message-ID: Date: Thu, 7 Jan 2021 15:59:47 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210105081111.v6.3.I3af068abe30c9c85cabc4486385c52e56527a509@changeid> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/01/2021 00:11, Nicolas Boichat wrote: > GPUs with more than a single regulator (e.g. G-57 on MT8183) will > require platform-specific handling, disable devfreq for now. Can you explain what actually goes wrong here? AFAICT the existing code does support controlling multiple regulators - but clearly this is the first platform that exercises that code with num_supplies>1. Steve > > Signed-off-by: Nicolas Boichat > --- > > 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..1f49043aae73 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_ERROR(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)) { >