Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2724235pxk; Sun, 27 Sep 2020 20:10:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjjGwzVmLHN5i0p+qg7Dof3YxZ7pWILpSUVbJH81ck8BVVsrhnE+6BI1f1j/dtwf2DhsO0 X-Received: by 2002:aa7:c6cf:: with SMTP id b15mr13593514eds.134.1601262601714; Sun, 27 Sep 2020 20:10:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601262601; cv=none; d=google.com; s=arc-20160816; b=CphxzVEzneOjNxOTUkTK82PrjRKCACGiyofKxStc3hVTV+RgoYr4CbbsZ11JqiwqJn gzMYyCeIkVG4+IbH5jTxeI0uLAU+o/+VMGQ/C0OPgYht+hhbal4/3Pva8o/RtBC/Rxeg l5fhKwflNaNQMcur4FpdjK2XhqxQaZRUu4H5z6NGn+ch09N7U/hb3m27KRhvOI406BvQ mJ5JV84IJOQgE6yqfTDkYoDRT0pUFmA1PQAnRKem2Ohw5WWys0XY/LfL9tRfR1lEJzK7 IGLIXJEn3vgESbj88k5Dxm3c5/QA8q7n6FsJbfdzePejh1FDgzoahw40Odv9ipR3pbhc j8Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=eRO4e3GtYKf/fEzk4nSA/MUtHk2A/cx+xLATKK/WLB0=; b=KvEL7/WEKmrRvyKInR3W/BSeSXSJ4V4HfJe1OlLMlMlxGM9YrcxhxdeBEwGNa/oF3u UB2mEqXuBjYw1sBlz1ahVWw/DEnJrr/u0uKRm/tV9NvYnymSUwD1+KJenD0KII3Axk7x bD4ubFLRhKdWBZSwoeqddMwepf+olr7igmWW3+Kg/obeMwXSxvhN2Ero9jL1+vfYhJzR HxoW1DGqS8siGRuq6G+cL2w9a2k7KwkMG7MTmyINkq7uBPUY0YUnuoNH9KWQrcxA1jls 6vZPNnJKnZSUUC9Q620XoyAf8Vc0SkuWXLRR8A1uGocYfPIozosc3SDb65keWwvU18j2 ZU4A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp9si6194467ejc.203.2020.09.27.20.09.39; Sun, 27 Sep 2020 20:10:01 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726641AbgI1DIj (ORCPT + 99 others); Sun, 27 Sep 2020 23:08:39 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:7600 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbgI1DIh (ORCPT ); Sun, 27 Sep 2020 23:08:37 -0400 Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 27 Sep 2020 20:08:37 -0700 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 27 Sep 2020 20:08:35 -0700 X-QCInternal: smtphost Received: from c-mansur-linux.qualcomm.com ([10.204.90.208]) by ironmsg01-blr.qualcomm.com with ESMTP; 28 Sep 2020 08:38:23 +0530 Received: by c-mansur-linux.qualcomm.com (Postfix, from userid 461723) id EF36A21C27; Mon, 28 Sep 2020 08:38:22 +0530 (IST) From: Mansur Alisha Shaik To: linux-media@vger.kernel.org, stanimir.varbanov@linaro.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, vgarodia@codeaurora.org, swboyd@chromium.org, Mansur Alisha Shaik Subject: [RESEND v3 2/4] venus: core: vote for video-mem path Date: Mon, 28 Sep 2020 08:38:14 +0530 Message-Id: <1601262496-27026-3-git-send-email-mansur@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601262496-27026-1-git-send-email-mansur@codeaurora.org> References: <1601262496-27026-1-git-send-email-mansur@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently video driver is voting for venus0-ebi path during buffer processing with an average bandwidth of all the instances and unvoting during session release. While video streaming when we try to do XO-SD using the command "echo mem > /sys/power/state command" , device is not entering to suspend state and from interconnect summary seeing votes for venus0-ebi Corrected this by voting for venus0-ebi path in venus_runtime_resume() and unvote during venus_runtime_suspend(). Fixes: 7482a983d ("media: venus: redesign clocks and pm domains control") Signed-off-by: Mansur Alisha Shaik Reviewed-by: Stephen Boyd --- drivers/media/platform/qcom/venus/core.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 52a3886..fa363b8 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -363,7 +363,18 @@ static __maybe_unused int venus_runtime_suspend(struct device *dev) ret = icc_set_bw(core->cpucfg_path, 0, 0); if (ret) - return ret; + goto err_cpucfg_path; + + ret = icc_set_bw(core->video_path, 0, 0); + if (ret) + goto err_video_path; + + return ret; + +err_video_path: + icc_set_bw(core->cpucfg_path, kbps_to_icc(1000), 0); +err_cpucfg_path: + pm_ops->core_power(dev, POWER_ON); return ret; } @@ -374,6 +385,10 @@ static __maybe_unused int venus_runtime_resume(struct device *dev) const struct venus_pm_ops *pm_ops = core->pm_ops; int ret; + ret = icc_set_bw(core->video_path, 0, kbps_to_icc(1000)); + if (ret) + return ret; + ret = icc_set_bw(core->cpucfg_path, 0, kbps_to_icc(1000)); if (ret) return ret; -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation