Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp990423imm; Wed, 13 Jun 2018 11:29:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ2njKCW7bLvIObKyuN9nk7qJ0/9nitWDAOaU35ZG9YGpujswfUijM3ArAVriYq8rVdYXMk X-Received: by 2002:a17:902:654c:: with SMTP id d12-v6mr6267042pln.8.1528914591191; Wed, 13 Jun 2018 11:29:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528914591; cv=none; d=google.com; s=arc-20160816; b=JE6+DP+gOGxqgqI3zF0vVk0A3AULdoaaVhaol8dGm+68mx3dNoMV3Tan5zk9HXKQrE Vd1bmhoP2x0y8xrWwqrukOzwQlgIa03q7IkPtxaDsc1AN225WStn/zpg6GUjZnhpVUzF D8EkHpsq0FRuhLfH4GD41VSc84RG26YNVTOxTOOIHIe3B1MlbI9QQkb2Ru9P0DktUBFM yZQ8LQz3KmN8oKBmAThjcDCpENsdFC+MptolHei9MKpx0Lba8vnHJkNNnV02CNEkxqQd 4AocmCcc031/Ps6Sd0nm9e5AxvnCTqdTX6YTLxul3QTQEftbLbAgWVdB0+Ir758seLdn OcLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=O+h+r53jS8zDmDGFXlWSXV2L1G6RMGopSgOWZdQVgas=; b=FjHD/L8A33NhS36cF59ft79NTBo3NvhBmbQRmBH2O1nXA45GKvvFdme9ethcj38afU dlgeXat1QuEaVtDFn14s3RZnkz6KPF7isVPBNlTzY67tsuzbys2mDuzyrLoAC+ig9L1f q6c6cv0ndLHiP3FvwsT3wFCKXS+yo1imh+GRlXycvync+LHrSVnw7H+fYb8P2QPngxTh 0riICg43tDLrz39bP2K55/dteTuObl3zd06VKQPTzxVEPnQbyWyy9z1Ihf2Oqdhx2bw4 2kOetYBza+6zgRnjEL7PY2ll4YocvLjBcMch3XN6PHo+60FjmQTJcIgZ9DluA3PeYM5w sCtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=LBzWxVrG; dkim=pass header.i=@codeaurora.org header.s=default header.b=LBzWxVrG; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z188-v6si3429479pfz.335.2018.06.13.11.29.36; Wed, 13 Jun 2018 11:29:51 -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=@codeaurora.org header.s=default header.b=LBzWxVrG; dkim=pass header.i=@codeaurora.org header.s=default header.b=LBzWxVrG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935498AbeFMS3E (ORCPT + 99 others); Wed, 13 Jun 2018 14:29:04 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42178 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935202AbeFMS3C (ORCPT ); Wed, 13 Jun 2018 14:29:02 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id EAAEE607E4; Wed, 13 Jun 2018 18:29:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528914541; bh=NoUUW4RU+MChkXxjxz3EgekvSB/hGsWURRRdeWLALHo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LBzWxVrGNZ2r0NW5zJmZe4G0Yc4NfjBeNN+syLTAK0dit2nmLjd9oaVe1ikUMCH9B n8ZT3oyWv0EREXG4VAJ6B3sK8KiceRjhH60RcRgbn2j9lTL1vuuZ5gcfzaabzD9TGQ F0+LmGbyCfXTOPGnXvb9jmEZix1cSXISLjEjCGhE= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: ilina@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2B0FA60717; Wed, 13 Jun 2018 18:29:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528914541; bh=NoUUW4RU+MChkXxjxz3EgekvSB/hGsWURRRdeWLALHo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LBzWxVrGNZ2r0NW5zJmZe4G0Yc4NfjBeNN+syLTAK0dit2nmLjd9oaVe1ikUMCH9B n8ZT3oyWv0EREXG4VAJ6B3sK8KiceRjhH60RcRgbn2j9lTL1vuuZ5gcfzaabzD9TGQ F0+LmGbyCfXTOPGnXvb9jmEZix1cSXISLjEjCGhE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2B0FA60717 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ilina@codeaurora.org Date: Wed, 13 Jun 2018 12:29:00 -0600 From: Lina Iyer To: David Collins Cc: Rajendra Nayak , viresh.kumar@linaro.org, sboyd@kernel.org, andy.gross@linaro.org, ulf.hansson@linaro.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 5/6] soc: qcom: rpmh powerdomain driver Message-ID: <20180613182900.GB22824@codeaurora.org> References: <20180525100121.28214-1-rnayak@codeaurora.org> <20180525100121.28214-6-rnayak@codeaurora.org> <215deee5-6472-d587-9a90-f7158162ed82@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <215deee5-6472-d587-9a90-f7158162ed82@codeaurora.org> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 25 2018 at 19:08 -0600, David Collins wrote: >Hello Rajendra, > >On 05/25/2018 03:01 AM, Rajendra Nayak wrote: >> + >> + to_active_sleep(pd, pd->corner, &this_corner, &this_sleep_corner); >> + >> + if (peer && peer->enabled) >> + to_active_sleep(peer, peer->corner, &peer_corner, >> + &peer_sleep_corner); >> + >> + active_corner = max(this_corner, peer_corner); >> + >> + ret = rpmhpd_send_corner(pd, RPMH_ACTIVE_ONLY_STATE, active_corner); >> + if (ret) >> + return ret; >> + >> + sleep_corner = max(this_sleep_corner, peer_sleep_corner); >> + >> + return rpmhpd_send_corner(pd, RPMH_SLEEP_STATE, sleep_corner); >> +} > >This aggregation function as well as the rpmhpd_send_corner() calls below >are not sufficient for RPMh. There are 3 states that must all be used: >RPMH_ACTIVE_ONLY_STATE, RPMH_WAKE_ONLY_STATE, and RPMH_SLEEP_STATE. The >naming is somewhat confusing as rpmhpd is defining a different concept of >active-only. > >For power domains without active-only or peers, only >RPMH_ACTIVE_ONLY_STATE should be used. This instructs RPMh to issue the >request immediately. > >For power domains with active-only, requests will need to be made for all >three. active_corner would be sent for both RPMH_ACTIVE_ONLY_STATE (so >that the request takes effect immediately) and RPMH_WAKE_ONLY_STATE (so >that the request is inserted into the wake TCS). sleep_corner would be >sent for RPMH_SLEEP_STATE (so that the request is inserted into the sleep >TCS). > >You can see how this is handled in the RPMh clock driver in patch [3]. > >You may be able to get away with using only RPMH_SLEEP_STATE and >RPMH_ACTIVE_ONLY_STATE assuming that you issue the RPMH_SLEEP_STATE >request first due to the rpmh driver caching behavior added in the >cache_rpm_request() function in [4]. However, could you please confirm >with Lina that this usage will continue to work in the future? I'm not >sure what guarantees are made at the rpmh API level. > We expect to cache all active values into wake if there was a sleep value already defined. Expect to continue this behavior in the future as well. But it would be safer for you to send sleep and wake votes in addition to active votes. It shouldn't add too much of an overhead. -- Lina