From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F1D3C33CA2 for ; Wed, 8 Jan 2020 22:52:46 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 43CA1206DB for ; Wed, 8 Jan 2020 22:52:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="XY5GOnFn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 43CA1206DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A4BCD6E34D; Wed, 8 Jan 2020 22:52:45 +0000 (UTC) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8A4486E34D for ; Wed, 8 Jan 2020 22:52:44 +0000 (UTC) Received: by mail-qk1-x741.google.com with SMTP id j9so4308617qkk.1 for ; Wed, 08 Jan 2020 14:52:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bQ8sePp1UB/buB3CQpsdDQjSw45clnU/8Z5dyE7MCUQ=; b=XY5GOnFn0zgYevPRNgkVz3RQithuZHY98uxSsiNEuf6vWLkXUGm9VbUWdjyqnbrO0p hSlRJ/xH3cUk/dTtQws1Y2BllgiV24bBnUj3yqD6jDFghwhecYRGqhwHtvzQlLjYIres pmL7s49IWRxqVAkNWYGTMoSy/oHAsP79XvpSw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bQ8sePp1UB/buB3CQpsdDQjSw45clnU/8Z5dyE7MCUQ=; b=XUH+u9P/A1jNIyyPGWJ6qlv4Zinh5xIkosZ9qqJeQGrTcbTPEZzRD8hQHJvzRpA/3a WPQ5NLsUK/KzzB0SGtrMoeFyF3VkDUBj57BEbZmz2Twkk2E2stJHxsTya7otXE+G37jA flo6NsISCmveJfD58xDikY/Upm7v+9GG/MxtGvpO/SZS7N4e3tw7hHdlz5zQ+8EoV40r As5kYSfjMdn9sScVzORFWtsejqBy+Xdtn8yF96JbEQ6xflutkf2jQoecpQ9vuqJXc+T1 Io08AWQPzoy4v7kkA5TTfZzi64+UYBQ7dROde8Uj2D0FNJEKTme8ByxR5FA6X8d0JuWh u54A== X-Gm-Message-State: APjAAAXORBqBs0mshAQAbNfbNqvztklUdwWu4+LhdiK9sbtHZcPzfSc8 Tdz7MFbwSN0abEuygsMKyouWf/lii2kTJ4HBJXRbNg== X-Google-Smtp-Source: APXvYqw2JjwDeqMh2CT5SlyR30QLXuZPvZ+1N9eFdrRhTkkWcwjICSQnRUvYtFyz4OeBrSGR4GBFkA8sANeEtDRg/YU= X-Received: by 2002:a37:6551:: with SMTP id z78mr7090523qkb.144.1578523963679; Wed, 08 Jan 2020 14:52:43 -0800 (PST) MIME-Version: 1.0 References: <20200108052337.65916-1-drinkcat@chromium.org> <20200108052337.65916-5-drinkcat@chromium.org> <20200108132302.GA3817@sirena.org.uk> In-Reply-To: <20200108132302.GA3817@sirena.org.uk> From: Nicolas Boichat Date: Thu, 9 Jan 2020 06:52:32 +0800 Message-ID: Subject: Re: [PATCH v2 4/7] drm/panfrost: Add support for a second regulator for the GPU To: Mark Brown 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: Mark Rutland , Devicetree List , Tomeu Vizoso , David Airlie , lkml , Liam Girdwood , dri-devel@lists.freedesktop.org, Steven Price , Rob Herring , "moderated list:ARM/Mediatek SoC support" , Alyssa Rosenzweig , Hsin-Yi Wang , Matthias Brugger , linux-arm Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Jan 8, 2020 at 9:23 PM Mark Brown wrote: > > On Wed, Jan 08, 2020 at 01:23:34PM +0800, Nicolas Boichat wrote: > > > Some GPUs, namely, the bifrost/g72 part on MT8183, have a second > > regulator for their SRAM, let's add support for that. > > > + pfdev->regulator_sram = devm_regulator_get_optional(pfdev->dev, "sram"); > > + if (IS_ERR(pfdev->regulator_sram)) { > > This supply is required for the devices that need it so I'd therefore > expect the driver to request the supply non-optionally based on the > compatible string rather than just hoping that a missing regulator isn't > important. That'd be a bit awkward to match, though... Currently all bifrost share the same compatible "arm,mali-bifrost", and it'd seem weird/wrong to match "mediatek,mt8183-mali" in this driver? I have no idea if any other Mali implementation will require a second regulator, but with the MT8183 we do need it, see below. > Though I do have to wonder given the lack of any active > management of the supply if this is *really* part of the GPU or if it's > more of a SoC thing, it's not clear what exactly adding this code is > achieving. Well if devfreq was working (see patch 7 https://patchwork.kernel.org/patch/11322851/ for a partial implementation), it would adjust both mali and sram regulators, see the OPP table in patch 2 (https://patchwork.kernel.org/patch/11322825/): SRAM voltage needs to be increased for frequencies >=698Mhz. Now if you have some better idea how to implement this, I'm all ears! Thanks. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel