Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1826399imm; Thu, 23 Aug 2018 09:21:25 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxxcImB1CnYiS6jaqmrgj5qxBU49VPC8Xh0I55rPL/hCagpRJdFAHny5WLP5Dqw0tpdd4Lf X-Received: by 2002:a17:902:9a48:: with SMTP id x8-v6mr31008591plv.72.1535041284953; Thu, 23 Aug 2018 09:21:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535041284; cv=none; d=google.com; s=arc-20160816; b=PJ8hZw+PS/nKLHzLZWYMxHlMMn4FFSbg5xrPcsZ33QyIueeu+dty8lBjCOnwKfxWih 6raTfrTwNQdgagIg+OpGa1yo3zwVaN/CRVtR736Kz3RDCCTnxF47pUeV1wLG9BdObASA +3puquNI15HWERUWMDTvbZ+7IHnnAICjh9T3EeIIVDpVFCTsGLADytWiVdO2vzXE/9GH oca1OE3ZtyU5TpPk/SVMDZLn5st4mB/RNb9izm1x8VIKLfZPIglPuyrGSHvsKfyk/YFr A2QenCl9N+H7Ng0tQ5TBleFOhOYPGcmeum4acuiY3PWRdu5B1/JgvuSKeZwQSarMt/W0 alMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:date:message-id:autocrypt :openpgp:references:cc:to:subject:from:dkim-signature :arc-authentication-results; bh=ro0hnSFxwtJXPSSPYVqMvxxcW4O0TqJQDoUTJ8wP8IE=; b=HyM3JeaJW87aeZ6tGPKm+fZufazvutFakQdaLhktRoZ66yrhkYvnXzcSUhk1aooI/I ddPbaseqbd1nX/2330eKVGWZIxZtUTR6uzzDbj0nVx+BPvCh30unKUk627EbFLgetf2b nFX8ayjw9xlBXSMrw4/d0bGl5tXQYWBbv+YTCCx3avOP6APOmf8llIkCKsZxcdyS0NFx a9YwFhuh1Zn9SyAnMUmgJ5+qzYHJsBAGGXeJboysbqGRkn2+v7wkVfFW2YvuzlQjtkLu nmJi36yOFP+NVyRGobNogtWeB4KpxKPyWFGmc9tWntqeDJJqX7IT8xoj9XmFgfmLCK2M vRfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Li5VfmEO; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u27-v6si2486878pga.112.2018.08.23.09.21.09; Thu, 23 Aug 2018 09:21:24 -0700 (PDT) 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=@linaro.org header.s=google header.b=Li5VfmEO; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730105AbeHWQ37 (ORCPT + 99 others); Thu, 23 Aug 2018 12:29:59 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:44930 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728465AbeHWQ36 (ORCPT ); Thu, 23 Aug 2018 12:29:58 -0400 Received: by mail-wr1-f66.google.com with SMTP id v16-v6so4559060wro.11 for ; Thu, 23 Aug 2018 06:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:subject:to:cc:references:openpgp:autocrypt:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ro0hnSFxwtJXPSSPYVqMvxxcW4O0TqJQDoUTJ8wP8IE=; b=Li5VfmEOG58SaZR/tr/HibFARthkL2WLYEu3kLn9m1n/A28bR4kZHqN1UGqhtUJCOb PRYJS6ttwfA3zP+TmsAjwjRrwwuym8eJ3N6TffJoy33dIk5ouhumndZagn//z1+/L8g3 SUJBDf/9dGVQmoNnvElY0mYWADuO8KBTw6mE8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:openpgp:autocrypt :message-id:date:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ro0hnSFxwtJXPSSPYVqMvxxcW4O0TqJQDoUTJ8wP8IE=; b=V4Mzod1vS8t9yHe4z4UV3g8RVpEfORqr84Xc6Mp25GK6qtkA7FCV3invcNQlvdipcO Le9d8hJnWqyvR2+EcFsRfatgqss1+YWU/ElaRiay9fNmGDB5mjkRtZO4RGtX/FFVV+bN FSsH+NVPFgPruXxVgJpmlF1AZcToh8InkvcxhvD8luNznTD0Ny+23nmujiLWzV2B1FJn qyDr/qsYU8Zg4CjeCd0xqNAZf3TPbpVCSebfmt9ZdWa8BSotdvZbbTQ5YBvy35sHd7SD qzAZAutxnNi7HymMGvn/wE/VI2BMTrECMsXXYXeeYF8ePUUt9s9w7ViBQkzUCSZoNCss idNg== X-Gm-Message-State: APzg51Bo3bcCJ549JsNsT9siWWx5pehA8DWgJfRbu45APHZsm2k8Rpta Jui08fki9S8MT72BlXUvUOCkhMQetkw= X-Received: by 2002:adf:9227:: with SMTP id 36-v6mr17223886wrj.275.1535029219575; Thu, 23 Aug 2018 06:00:19 -0700 (PDT) Received: from [10.44.66.8] ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id g133-v6sm4770967wmf.44.2018.08.23.06.00.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Aug 2018 06:00:19 -0700 (PDT) From: Georgi Djakov Subject: Re: [PATCH v3 2/2] PM / devfreq: Add devfreq driver for interconnect bandwidth voting To: Saravana Kannan Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Rob Herring , Mark Rutland , vincent.guittot@linaro.org, daidavid1@codeaurora.org, bjorn.andersson@linaro.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <1533171465-25508-2-git-send-email-skannan@codeaurora.org> Openpgp: preference=signencrypt Autocrypt: addr=georgi.djakov@linaro.org; prefer-encrypt=mutual; keydata= xsFNBFjTuRcBEACyAOVzghvyN19Sa/Nit4LPBWkICi5W20p6bwiZvdjhtuh50H5q4ktyxJtp 1+s8dMSa/j58hAWhrc2SNL3fttOCo+MM1bQWwe8uMBQJP4swgXf5ZUYkSssQlXxGKqBSbWLB uFHOOBTzaQBaNgsdXo+mQ1h8UCgM0zQOmbs2ort8aHnH2i65oLs5/Xgv/Qivde/FcFtvEFaL 0TZ7odM67u+M32VetH5nBVPESmnEDjRBPw/DOPhFBPXtal53ZFiiRr6Bm1qKVu3dOEYXHHDt nF13gB+vBZ6x5pjl02NUEucSHQiuCc2Aaavo6xnuBc3lnd4z/xk6GLBqFP3P/eJ56eJv4d0B 0LLgQ7c1T3fU4/5NDRRCnyk6HJ5+HSxD4KVuluj0jnXW4CKzFkKaTxOp7jE6ZD/9Sh74DM8v etN8uwDjtYsM07I3Szlh/I+iThxe/4zVtUQsvgXjwuoOOBWWc4m4KKg+W4zm8bSCqrd1DUgL f67WiEZgvN7tPXEzi84zT1PiUOM98dOnmREIamSpKOKFereIrKX2IcnZn8jyycE12zMkk+Sc ASMfXhfywB0tXRNmzsywdxQFcJ6jblPNxscnGMh2VlY2rezmqJdcK4G4Lprkc0jOHotV/6oJ mj9h95Ouvbq5TDHx+ERn8uytPygDBR67kNHs18LkvrEex/Z1cQARAQABzShHZW9yZ2kgRGph a292IDxnZW9yZ2kuZGpha292QGxpbmFyby5vcmc+wsF+BBMBAgAoBQJY07kXAhsDBQkHhM4A BgsJCAcDAg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mXh7OlBL1MpJYY/ydIm3B KEmKjLDvB0pePJkdTw== Message-ID: <4fcac639-cba9-1a71-9b78-326ebb9242da@linaro.org> Date: Thu, 23 Aug 2018 16:00:18 +0300 MIME-Version: 1.0 In-Reply-To: <1533171465-25508-2-git-send-email-skannan@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Saravana, On 08/02/2018 03:57 AM, Saravana Kannan wrote: > This driver registers itself as a devfreq device that allows devfreq > governors to make bandwidth votes for an interconnect path. This allows > applying various policies for different interconnect paths using devfreq > governors. > > Example uses: > * Use the devfreq performance governor to set the CPU to DDR interconnect > path for maximum performance. > * Use the devfreq performance governor to set the GPU to DDR interconnect > path for maximum performance. > * Use the CPU frequency to device frequency mapping governor to scale the > DDR frequency based on the needs of the CPUs' current frequency. Usually CPUs and GPUs have dedicated cpufreq/devfreq drivers and i was wondering if the interconnect support could be put into these drivers directly? > > Signed-off-by: Saravana Kannan > --- > Documentation/devicetree/bindings/devfreq/icbw.txt | 21 ++++ > drivers/devfreq/Kconfig | 13 +++ > drivers/devfreq/Makefile | 1 + > drivers/devfreq/devfreq_icbw.c | 116 +++++++++++++++++++++ > 4 files changed, 151 insertions(+) > create mode 100644 Documentation/devicetree/bindings/devfreq/icbw.txt > create mode 100644 drivers/devfreq/devfreq_icbw.c > > diff --git a/Documentation/devicetree/bindings/devfreq/icbw.txt b/Documentation/devicetree/bindings/devfreq/icbw.txt > new file mode 100644 > index 0000000..36cf045 > --- /dev/null > +++ b/Documentation/devicetree/bindings/devfreq/icbw.txt > @@ -0,0 +1,21 @@ > +Interconnect bandwidth device > + > +icbw is a device that represents an interconnect path that connects two > +devices. This device is typically used to vote for BW requirements between > +two devices. Eg: CPU to DDR, GPU to DDR, etc > + > +Required properties: > +- compatible: Must be "devfreq-icbw" > +- interconnects: Pairs of phandles and interconnect provider specifier > + to denote the edge source and destination ports of > + the interconnect path. See also: > + Documentation/devicetree/bindings/interconnect/interconnect.txt > +- interconnect-names: Must have one entry with the name "path". > + > +Example: > + > + qcom,cpubw { > + compatible = "devfreq-icbw"; > + interconnects = <&snoc MASTER_APSS_1 &bimc SLAVE_EBI_CH0>; > + interconnect-names = "path"; interconnect-names is optional when there is only a single path. > + }; > diff --git a/drivers/devfreq/Kconfig b/drivers/devfreq/Kconfig > index 3d9ae68..590370e 100644 > --- a/drivers/devfreq/Kconfig > +++ b/drivers/devfreq/Kconfig > @@ -121,6 +121,19 @@ config ARM_RK3399_DMC_DEVFREQ > It sets the frequency for the memory controller and reads the usage counts > from hardware. > > +config DEVFREQ_ICBW > + bool "DEVFREQ device for making bandwidth votes on interconnect paths" Can this be a module? > + select DEVFREQ_GOV_PERFORMANCE > + select DEVFREQ_GOV_POWERSAVE > + select DEVFREQ_GOV_USERSPACE > + default n There's no need to specify this default. It is 'n' by default anyway. Also maybe you want to add something like: depends on INTERCONNECT=y Thanks, Georgi > + help > + Different devfreq governors use this devfreq device to make > + bandwidth votes for interconnect paths between different devices > + (Eg: CPU to DDR, GPU to DDR, etc). This driver provides a generic > + interface so that the devfreq governors can be shared across SoCs > + and architectures. > + > source "drivers/devfreq/event/Kconfig"