Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9080116pxu; Mon, 28 Dec 2020 06:09:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7DRD1SoZuawuZp0nMq4oWbtxyVKKAOPdgi4UGQP7C1SHVzuPODuBOGzyBCTWkoZhsojDS X-Received: by 2002:a50:d5d5:: with SMTP id g21mr43690914edj.41.1609164594849; Mon, 28 Dec 2020 06:09:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164594; cv=none; d=google.com; s=arc-20160816; b=duV6N3UKm8325xZzWTfhWHnu6XFTEJTU9deFrE6SZHtCxJbG/XZrMBc37X08lGIXMW AdXLD3v7F/20/E3so2nrTNi6rYvpsz/YsWF5JddYLjexPokgfOnqmszayzdVth0Fu8F3 Xwpt7MBn8TS1dm+eIwzURDL/npvgBTvNfwNriJZT0pphiFC7KqAhWKzYWeuss7NHZ8Qy r9vcA+oLsehjTRDEsSHHq3JP5EhqtHdyiKX4z+VXV8/bmSclpd1/w3vE+zXpwlZLK2oE Mklu9P1olvBocjI0pVjOAV3SEhkg/PfYl/N9trpz+Y7REuHDED+IWYG+viQFIeb2R4Fr Ilcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=R/HzfgDrhRxyGt6PCfFz5CH86QTLa7hKIpFJtvNx9BU=; b=ZggF4Jxd2e998KZIk5lOg0VBwkJaJ9DkpdOkJ9zXT/vSic4pR7Fqo0NklC0+WadQS0 ZxYwglGc9YcojVNo7TmpvYkjMnYqKN9MVcm9FdlIcEQ/KQXFJV8L3nYlPwH971izHcK4 yucYocrgjerqATwc3Thxxg1nTk5B4y4AVRgzA7XlZjZY0hhYt8lf0y/mKNU8BM+JYcBY tPIWl211163MqIJ6h3twZt++Ap6ZvylqhbgMLu4njatGg67JqJFcMEEmRH1SJpqsinCf K8cX7tzt8N9xzRW6yFUe1uMOt1bEOz+TrixpY0tCrxyLcJ/KT80PP6mQ0ofuNZUqsIQ4 pHxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Zl715zH2; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m15si20170893edp.363.2020.12.28.06.09.32; Mon, 28 Dec 2020 06:09:54 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=Zl715zH2; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437653AbgL1OFh (ORCPT + 99 others); Mon, 28 Dec 2020 09:05:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:40110 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437611AbgL1OFg (ORCPT ); Mon, 28 Dec 2020 09:05:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8936C20715; Mon, 28 Dec 2020 14:04:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164296; bh=Dcw8daAD2Yw70GrVEE2n3jG/EPOE9MABbtUUl/o2G4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zl715zH295ldfFXPH/QDryM2lb4P45ldSJUTmoOIFLk6N4CpuUJKY8hDiEvoFiwhZ Sy14hIBBJ0KJma3CCjbSVfqlsozEcISNewKdM2OPsi7u9jfmD/mCmzdAVTJm5W8S6c tfarnCJo0HVd5q8duL/x2gH0Ut0gd8Qsyzcf4ZgU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mansur Alisha Shaik , Stephen Boyd , Stanimir Varbanov , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.10 130/717] media: venus: core: vote for video-mem path Date: Mon, 28 Dec 2020 13:42:08 +0100 Message-Id: <20201228125027.175312018@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mansur Alisha Shaik [ Upstream commit 9e8efdb5787986cc0d0134925cf5c4f001bb3f2e ] 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(). suspend") Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device Signed-off-by: Mansur Alisha Shaik Reviewed-by: Stephen Boyd Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- 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 52a3886c496eb..fa363b8ddc070 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; -- 2.27.0