Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9078038pxu; Mon, 28 Dec 2020 06:07:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWfbETACtlwkVaEHtIZhEjCR/T1mB9kNAEhw228dtzcs2yJjRNMJFgmY006DfDPBwgsSs8 X-Received: by 2002:a17:906:ae41:: with SMTP id lf1mr42772109ejb.369.1609164456857; Mon, 28 Dec 2020 06:07:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164456; cv=none; d=google.com; s=arc-20160816; b=T9bKZwmhyiF2PktOeNieq524MqqLv0oXoERa3EBCVrhzuqfNXnqW4GZWhIhXyddhiy Fp2FAUn7o5J2fch85atNYwZDjyj1Gm6bv4BhVVmKof/VZhL0DMKcuQol26fHDMqCjFt3 Nahb6ylUmyYL8RfKK808gWHLiVSTluANcjrLxZ4GGCaBSiixnnI/amI4/xIG5QwMsTen ZV0Ev0g0PxEWYao2Yoo5RK4ZD+CyhO+qPFD9gfvqXHUVlI5EZ82jztKN8EH8L0X1Yu4K 09/FyLSDVnklrcwLUy7F3CuytGGmdtOO8NuRn+8j28aiLyLFu+c9riNmuVTo4PQXTgAR HKSw== 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=/8+qXmL83f5djSxmcqWqYUuLaIhivr50go8MMs7KhsM=; b=kyNwRA4EZ9PO+vf4w7vqe+XpQuiVC/hbfqmAVEsVNehibR3Alf/xAh0FGEt7zDmEdz NIaWOeYrymZf6EK3ghkb/z5uiTeAtCvdqOc0yc0mYYNGX56frVeUQmFpplaU4z2o3kgq GIRkadPFYos06W/sZBf44uJ87lkjbLHsllPGw08GAodXbrVYqVtoYpPqRkaU1kskAHFO OuUWrTTLxa64hXOdXMeSAMBW7W9HK8dlLcCX87M3rO0Pqjr/qKU5HlGd/KdyeByC5f8K ujVvPcZvOHb/FM8h+BSKLY1qR8nJlnOZqxCS855LZBX8y2FL+6fe2LdUN3hoLl5q0gCE d+dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="W3B/o3PP"; 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 r14si18748345eju.173.2020.12.28.06.07.12; Mon, 28 Dec 2020 06:07:36 -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="W3B/o3PP"; 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 S2437578AbgL1OFM (ORCPT + 99 others); Mon, 28 Dec 2020 09:05:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:38474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437532AbgL1OFI (ORCPT ); Mon, 28 Dec 2020 09:05:08 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CCC2A2063A; Mon, 28 Dec 2020 14:04:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164293; bh=q3NY13z8LWQZ5YfejJIROehaop8JhByp7uRRPIsIRe0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W3B/o3PPXuP/Ed0pCwPm9J/2aJdLEVKoH3eZg4F5wFaQu3GiHkiSmnBXSAkee7KaH 52/jM1CVTN3cJ4KXdNGVSv+I/HyyyBgfxic94HJ8YDyC+INoEKlESdbti4wz872S4u mheE1APNh0HUOZegCaEJDgtwhFCtM6lMp6jBxiLQ= 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 129/717] media: venus: core: change clk enable and disable order in resume and suspend Date: Mon, 28 Dec 2020 13:42:07 +0100 Message-Id: <20201228125027.129998550@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 21926d466e3a4f35c2536244d1d56512cc81a0a9 ] Currently video driver is voting after clk enable and un voting before clk disable. This is incorrect, video driver should vote before clk enable and unvote after clk disable. Corrected this by changing the order of clk enable and clk disable. 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, 10 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 6103aaf43987b..52a3886c496eb 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -355,13 +355,16 @@ static __maybe_unused int venus_runtime_suspend(struct device *dev) if (ret) return ret; + if (pm_ops->core_power) { + ret = pm_ops->core_power(dev, POWER_OFF); + 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); - return ret; } @@ -371,16 +374,16 @@ 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->cpucfg_path, 0, kbps_to_icc(1000)); + if (ret) + return ret; + if (pm_ops->core_power) { ret = pm_ops->core_power(dev, POWER_ON); if (ret) 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.27.0