Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp115580ybg; Mon, 8 Jun 2020 18:02:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9WC1DwN4Si9uBsaIYhTGKRZpBurKGKuHVxK75caFoUYYl03mjETm84vT7RhNw5df9BrnG X-Received: by 2002:aa7:c987:: with SMTP id c7mr23814340edt.268.1591664574153; Mon, 08 Jun 2020 18:02:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591664574; cv=none; d=google.com; s=arc-20160816; b=UhX9Llb6vv39bDsw8HvRRijeYAIj5oxNF+b6H5DsPCetBMUCROFqXcgvihss6XL+0+ eG1LIPqUhME4uWGcDFo4s36AG7KczOPQ240h8LP1fWs6vlsrC5FgJ8UMJzHuADeAPR0S bOp7duCdPDTk7Zkneu6ni8Lbt5T/P1mMX11ZdGhYZL99tio37dhHlOwUohRUM4uGeX/B OdJqqF+/yks/vsTj7mT4/iaJJEWSrDBoLwnwranoU/LhPvKHaM5wu/6lITaIkEfeTAzA 3it3kTiU4p0Ka+V7tidtXWc0fd+lin8vUXlUmruXbijBjJImuzv5WqGvgM2x55rKkYjn /UcA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Jv32K1uc5WbGrQ+nHe71913G8XW6iwURCC6CcyEtNis=; b=c4Rafshssx33WVNLDieO64C4xDqWenGC8EboVdzrJWJ+pB2wKgW3yqxy/WYI2FghA3 oH9MrxzK+1js5eE69MCQdS0lQSvBZL0ktmgD+E4r7lDWoPxqfxFAQZt4P6Prves2sTuF 6Xc5pvzRi4Ca1J4eN9BA/NWwpAzRLN3jtHh4lgzjGfuR7K16DlaPdqvDmYKXf+ynjm3Y dDqDQ2YHPB9tLBYx7G1FRFqYXorbRIZ1OkSJR7/kUbYOTVvbwyiwTY6aQiLgXNRkY0eG rygsDAshNsLfiq2wZw3AoC3y0iYW57VcukI9ZsYylhx5AwRd/g4cI5NERK9gp9RpiD8z 25rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sjp1N+VL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ks19si9294798ejb.409.2020.06.08.18.02.27; Mon, 08 Jun 2020 18:02:54 -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; dkim=pass header.i=@kernel.org header.s=default header.b=sjp1N+VL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388098AbgFIBAk (ORCPT + 99 others); Mon, 8 Jun 2020 21:00:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:53402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727884AbgFHXIS (ORCPT ); Mon, 8 Jun 2020 19:08:18 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E5DA208A7; Mon, 8 Jun 2020 23:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657697; bh=qMBN6ywlGZR40UxUS7UN9pzv36EbDklsZp2ZsKOoD8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sjp1N+VLvRFx2jsRegJPWFxkfXKDJjLb+/4GhWxsL7nu8bu/wEWImgKznLe3gStm6 mvcmTNcAB8ROGVIOF7NAgDJhD45CgUnvvBTHCXhdj8ltSIoZBXud3KU5WZfW/i0CNj TAHUPGQBsOhMx7XmYJU0Rcd2inwFNy0ivcCtAf1A= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mansur Alisha Shaik , Stanimir Varbanov , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 097/274] media: venus: core: remove CNOC voting while device suspend Date: Mon, 8 Jun 2020 19:03:10 -0400 Message-Id: <20200608230607.3361041-97-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mansur Alisha Shaik [ Upstream commit 07f8f22a33a9e3e9955e24a84e2f856dcc8c31c4 ] The Venus driver is voting Configuration NoC during .probe but not clear voting in .suspend. Because of this NoC is up during shutdown also. As a consequence the whole device could leak energy while in .suspend. So correct this by moving voting in .resume and unvoting in .suspend Signed-off-by: Mansur Alisha Shaik Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/qcom/venus/core.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 194b10b98767..13fa5076314c 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -242,10 +242,6 @@ static int venus_probe(struct platform_device *pdev) if (ret) return ret; - ret = icc_set_bw(core->cpucfg_path, 0, kbps_to_icc(1000)); - if (ret) - return ret; - ret = hfi_create(core, &venus_core_ops); if (ret) return ret; @@ -350,6 +346,10 @@ static __maybe_unused int venus_runtime_suspend(struct device *dev) if (ret) return ret; + ret = icc_set_bw(core->cpucfg_path, 0, 0); + if (ret) + return ret; + if (pm_ops->core_power) ret = pm_ops->core_power(dev, POWER_OFF); @@ -368,6 +368,10 @@ static __maybe_unused int venus_runtime_resume(struct device *dev) return ret; } + ret = icc_set_bw(core->cpucfg_path, 0, kbps_to_icc(1000)); + if (ret) + return ret; + return hfi_core_resume(core, false); } -- 2.25.1