Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3187233imj; Mon, 18 Feb 2019 22:09:12 -0800 (PST) X-Google-Smtp-Source: AHgI3IamyNoI//CX/1kzQN88iK6JIT+HD2I6cfzdpC6c3H1u0ELppKi6SEDZTwyZP/+6hjT3mslA X-Received: by 2002:aa7:8019:: with SMTP id j25mr13284318pfi.82.1550556552420; Mon, 18 Feb 2019 22:09:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550556552; cv=none; d=google.com; s=arc-20160816; b=Z0XunnVvZ6OAvbVuVjPl0dQvlQ8IbXrYqtkWw59811hEDhyRmgVCRgo4luIS57kdTm Wv+LpWYZCzULcUXZ3SQbS7Y1VxqBZT1okQMFv+tljhBO+Me3TMLjZgj95wvYURFTloLI g36So6OaeswODE066sTXB5dtm0WEOLzlufvm21dI9Cvjn2uUmflPez+YMLCcjN3msFOD TB1KBkx1BqgQRlkp+CIqZ4GfNGsgpAPkk69TlZ72g5+3yqgVGELdXeDRCx7Ul1/w0tjW F7j1mXx8fe5PLSQU4Qh8zq4QcRc+lUMOWErKlLO7cxvFQJW3cdlNCe0oUFJdux+1I2X0 uPZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=F4VXMFnxSNm23FFb83QK8MzofUbP12Bnt1hGWLKIul4=; b=d6ftVotN2bmbJk/GuAUiQF5vdPSwyZoG5xXgCffb91X2mph7Dy62fCJ/G3jVKYiJiZ npgfwmMXIlVq7yZ0aMmSoE4teqPP2Sz1gv2yZFc1LOXuZiNZ4uGNJnvzh6DmA8MI7sYm wQCUJJC3R1rtsVWwbhm2tzpLfLSi3quq0l/UAIl+8VGrYvzomIWFT/35MmjqBlnAhMJO Yl5FJCjUckNlTakGSkKkKzZATh9nK4rDkkKcQTp0dq9VpJuSzlDkk3hcEbcUJAjB3Ues lnDwckOdVIAFh18GZi/SpioVvIpAJE3vcAhAAofvS0w9pfMzhp976YLAkmE0VI96rn1+ k/Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=SWpMev0U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17si14995650pfh.6.2019.02.18.22.08.56; Mon, 18 Feb 2019 22:09:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=SWpMev0U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725805AbfBSGIf (ORCPT + 99 others); Tue, 19 Feb 2019 01:08:35 -0500 Received: from hqemgate15.nvidia.com ([216.228.121.64]:17991 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbfBSGIf (ORCPT ); Tue, 19 Feb 2019 01:08:35 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 18 Feb 2019 22:08:32 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 18 Feb 2019 22:08:33 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 18 Feb 2019 22:08:33 -0800 Received: from [10.19.225.182] (10.124.1.5) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 19 Feb 2019 06:08:29 +0000 Subject: Re: [PATCH v1 04/12] of: Add bindings of gpu hw throttle for Tegra soctherm To: Rob Herring CC: , , , , , , , References: <1545118484-23641-1-git-send-email-wni@nvidia.com> <1545118484-23641-6-git-send-email-wni@nvidia.com> <20190218202939.GA7473@bogus> From: Wei Ni Message-ID: <5ce01da3-cb00-3d35-5164-d837df65c184@nvidia.com> Date: Tue, 19 Feb 2019 14:08:26 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190218202939.GA7473@bogus> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1550556513; bh=F4VXMFnxSNm23FFb83QK8MzofUbP12Bnt1hGWLKIul4=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=SWpMev0UhwORMDbzXuioKEiDpbx4HTP2XJkMHTopoly407O3MTWapr61NTvnVbwq0 fgN6Qw961LLVJC4KAHsIXX9s+/iDHO5m8KClqKD6ER4GElzKId5U3veNVcr3GXmWQE AGltqohhuTg4fvKY0JNGCdLwReiAJQBBheSD1tEnP03ziNEY75qzYAI2FrzIU8ooMM 9puiYGzEQgwJ67aQWu30sycG0ikZG2wCb/Ok5W5JMASFARCOMamCSqFBWQM1NlzKqF rQRekVEwSuaRMOu3SmnbR+m9sY6HNxxGw21kll+e9FuDvkGwIIvNPdrBmaSvUQgWce a9NkUjKf1JAIA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/2/2019 4:29 AM, Rob Herring wrote: > On Tue, Dec 18, 2018 at 03:34:36PM +0800, Wei Ni wrote: >> Add "nvidia,gpu-throt-level" property to set gpu hw >> throttle level. >> >> Signed-off-by: Wei Ni >> --- >> .../bindings/thermal/nvidia,tegra124-soctherm.txt | 17 +++++++++++++++-- >> include/dt-bindings/thermal/tegra124-soctherm.h | 22 ++++++++++++++++++---- >> 2 files changed, 33 insertions(+), 6 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt >> index ab66d6feab4b..cf6d0be56b7a 100644 >> --- a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt >> +++ b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt >> @@ -52,6 +52,15 @@ Required properties : >> Must set as following values: >> TEGRA_SOCTHERM_THROT_LEVEL_LOW, TEGRA_SOCTHERM_THROT_LEVEL_MED >> TEGRA_SOCTHERM_THROT_LEVEL_HIGH, TEGRA_SOCTHERM_THROT_LEVEL_NONE >> + - nvidia,gpu-throt-level: This property is for Tegra124 and Tegra210. >> + It is the level of pulse skippers, which used to throttle clock >> + frequencies. It indicates gpu clock throttling depth and can be >> + programmed to any of the following values which represent a throttling >> + percentage: >> + TEGRA_SOCTHERM_THROT_LEVEL_NONE (0%) >> + TEGRA_SOCTHERM_THROT_LEVEL_LOW (50%), >> + TEGRA_SOCTHERM_THROT_LEVEL_MED (75%), >> + TEGRA_SOCTHERM_THROT_LEVEL_HIGH (85%). >> - #cooling-cells: Should be 1. This cooling device only support on/off state. >> See ./thermal.txt for a description of this property. >> >> @@ -96,22 +105,26 @@ Example : >> throttle-cfgs { >> /* >> * When the "heavy" cooling device triggered, >> - * the HW will skip cpu clock's pulse in 85% depth >> + * the HW will skip cpu clock's pulse in 85% depth, >> + * skip gpu clock's pulse in 85% level >> */ >> throttle_heavy: heavy { >> nvidia,priority = <100>; >> nvidia,cpu-throt-percent = <85>; >> + nvidia,gpu-throt-level = ; >> >> #cooling-cells = <1>; >> }; >> >> /* >> * When the "light" cooling device triggered, >> - * the HW will skip cpu clock's pulse in 50% depth >> + * the HW will skip cpu clock's pulse in 50% depth, >> + * skip gpu clock's pulse in 50% level >> */ >> throttle_light: light { >> nvidia,priority = <80>; >> nvidia,cpu-throt-percent = <50>; >> + nvidia,gpu-throt-level = ; >> >> #cooling-cells = <1>; >> }; >> diff --git a/include/dt-bindings/thermal/tegra124-soctherm.h b/include/dt-bindings/thermal/tegra124-soctherm.h >> index c15e8b709a0d..75853df1c609 100644 >> --- a/include/dt-bindings/thermal/tegra124-soctherm.h >> +++ b/include/dt-bindings/thermal/tegra124-soctherm.h >> @@ -1,5 +1,19 @@ >> /* SPDX-License-Identifier: GPL-2.0 */ >> /* >> + * Copyright (c) 2014 - 2018, NVIDIA CORPORATION. All rights reserved. >> + * >> + * Author: >> + * Mikko Perttunen >> + * >> + * This software is licensed under the terms of the GNU General Public >> + * License version 2, as published by the Free Software Foundation, and >> + * may be copied, distributed, and modified under those terms. >> + * >> + * This program is distributed in the hope that it will be useful, >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + * > > Why are you adding this? We doesn't need it, will remove it. > >> * This header provides constants for binding nvidia,tegra124-soctherm. >> */ >> >> @@ -12,9 +26,9 @@ >> #define TEGRA124_SOCTHERM_SENSOR_PLLX 3 >> #define TEGRA124_SOCTHERM_SENSOR_NUM 4 >> >> -#define TEGRA_SOCTHERM_THROT_LEVEL_LOW 0 >> -#define TEGRA_SOCTHERM_THROT_LEVEL_MED 1 >> -#define TEGRA_SOCTHERM_THROT_LEVEL_HIGH 2 >> -#define TEGRA_SOCTHERM_THROT_LEVEL_NONE -1 >> +#define TEGRA_SOCTHERM_THROT_LEVEL_NONE 0 >> +#define TEGRA_SOCTHERM_THROT_LEVEL_LOW 1 >> +#define TEGRA_SOCTHERM_THROT_LEVEL_MED 2 >> +#define TEGRA_SOCTHERM_THROT_LEVEL_HIGH 3 > > You are breaking an ABI. > > Rob >