Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9394941pxu; Mon, 28 Dec 2020 15:05:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzE1g+Nn3zzec258GXM1YSmhem50j8itn092JhY7AVmo+84X2pMdg7oeKZbxRCCTqVuwTIq X-Received: by 2002:a17:906:68d1:: with SMTP id y17mr43673938ejr.447.1609196712879; Mon, 28 Dec 2020 15:05:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609196712; cv=none; d=google.com; s=arc-20160816; b=Tk1JdkKFjeXW66qtk3S6YBrKsRzPkbtpGPlBlPRxOZS0BCJWKCEprhGhst13KXOjVC R9r3yeRfMLRl/IawdIF9Yzm4TmYZKNtrsFRT87dmzdzb9QsQ+8S9NRDTzZ5HK/qgYw+j EyBQDIIuqDigHl+32oQ3YgFuPsbwY8+Amuz/Fnhl6DqRup3WowpoZoLa+2twyIxoghnP qwWL0Gh3zUnTtQQEU+6jH+i7Yndyp/ImelFeFIupn2+dWlDdgbKSwaLS7CzeMAe7C/HF 6v2KvOTD6J1u4pcXGjQ0iq80/QrAY6jDNXsm21o/On1VGR203//LTOMu1sNJbHriWz7c oN7A== 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=zFrt63mLDG+OjPJjUzfUIeGhKtlYvElnRJE6LWDXjJ4=; b=Nm2OucSSAqGaZw4s+3Lou1ZuuxyOT6OElm2e+y6zqgy1XUX5vI3jG9cf8ur3LhQXJQ ihoLLkwubl/O9v+sX1QrGoxTU51b7thW95R2Ym3anIM1hLCzd7odM6Jwm+8hjQFnZ6O8 V8rD7GmZvA+lw7Q1y7kMrOkjT6o4zMG6zLfxvkjrRoUlPFfYVjdWSBRn+cS4Wxfj+PGx H3hBaW7yp+DMCByL9VNbh+Gwog0TTIap3Lc9aKEZtaQuMlmkzIdkwds3ea0TXIxwpSGk 9VGB4d1I5DjwVHOEkibfbpTbiQzFxrfn0vjz+6gZfxRjisKDIvgBA+qdnVjkeEyc/jq7 BsWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mAU7n97X; 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 y12si15448516ejb.78.2020.12.28.15.04.49; Mon, 28 Dec 2020 15:05:12 -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=mAU7n97X; 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 S2438174AbgL1OGn (ORCPT + 99 others); Mon, 28 Dec 2020 09:06:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:40464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437696AbgL1OFy (ORCPT ); Mon, 28 Dec 2020 09:05:54 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DFBB422C9C; Mon, 28 Dec 2020 14:05:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164313; bh=IWbrbmoSWSZ0KfQhmos6beNGwnM6tyUVVHNpCdFWtHs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mAU7n97XXXt5OcC8C0qHCZq+OL1eH7WbM8Qd6rQPSoAdn0xNdjxTo4EC8mqyp+1LQ Aj6Uo82tSUwZaAQLd2OEQIs7jN3QsRR0591q8REjlmtXr4Hm2tD9PCh/BGcouGBB3M SrOxGZYyC2pP73VQovBlaJRku8kTt5But11Q61Ys= 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 136/717] media: venus: put dummy vote on video-mem path after last session release Date: Mon, 28 Dec 2020 13:42:14 +0100 Message-Id: <20201228125027.468375360@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 eff5ce02e170125936c43ca96c7dc701a86681ed ] As per current implementation, video driver is unvoting "videom-mem" path for last video session during vdec_session_release(). While video playback when we try to suspend device, we see video clock warnings since votes are already removed during vdec_session_release(). corrected this by putting dummy vote on "video-mem" after last video session release and unvoting it during 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/pm_helpers.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index a9538c2cc3c9d..2946547a0df4a 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -212,6 +212,16 @@ static int load_scale_bw(struct venus_core *core) } mutex_unlock(&core->lock); + /* + * keep minimum bandwidth vote for "video-mem" path, + * so that clks can be disabled during vdec_session_release(). + * Actual bandwidth drop will be done during device supend + * so that device can power down without any warnings. + */ + + if (!total_avg && !total_peak) + total_avg = kbps_to_icc(1000); + dev_dbg(core->dev, VDBGL "total: avg_bw: %u, peak_bw: %u\n", total_avg, total_peak); -- 2.27.0