Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3194823pxx; Mon, 2 Nov 2020 02:34:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9Cw4uRo4Q5ccT1hg0vDAECmyz0zEl094DB1S+MfJdGKdZuhdtxUEe/HIMnu88FhM1xVb9 X-Received: by 2002:a50:99cd:: with SMTP id n13mr15954436edb.10.1604313245217; Mon, 02 Nov 2020 02:34:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604313245; cv=none; d=google.com; s=arc-20160816; b=Q18AJ4pAR7W2hjHw+N8PUINkE7c1iKvHMmAmSVJf+bGLOz6q4mEYDH5qZ3ujEdTXGR 7HXkmxXzpvF4VDZQXL36j7bWZ1xXUm2+mOG8MiyqN+hLaMj7WHYtm3435apXyDd+Fi3u VX9A9k2sBnC0J97EqT56W0t4bQ28roTohh1z98A1HUXjsBTHVfVc7TOMuF9nk8hAvu0V Vl6iHAEUXEC9hlVixAwMd4g63BvtyZPgGJGG3op50TKuavMSK7KJB8W9JaTe9qrEdxvK eT64OeX8D+xWQiDKlJt1BJBuMshDBqA6geh2xok4KP0FKrA3bpitvHUa6WjbCINAgnrp Hffg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=8Zl2ziHovYK5qxuI+WvEL+kl+O20uVr7z/0/Ps4DqGg=; b=jXtOtVWBU08ZGVNZVkzq+PCbv4dTwc2PswPYbczPCHXF/YXVbE1LwGZkgerJ+6dTfb 0ED+8i2uVOKLGreknnhMgmelosdSdAVNw8rMrF5MpexrQAOPnQSJoIahXm2+raBcs/UK vtD4f9pcHKpSZrfY55rNWycjCkTOFJroYKeVXXf8M0uQy6wS33IloYouHU/4LHCyBjxq tmMTd3PnPfI+vJf/wnIFDXmclKsvbFP38jttZndHgO4sxvofXdFDU27XyVM5DczXedPZ X9UvdSDDEwV9M9f14pX5himEN4H6v5qbgZPXcPru2y5kln5zMFvJXekj5kmwmdUVEwDH 9Lxw== 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 f2si9423270edl.256.2020.11.02.02.33.43; Mon, 02 Nov 2020 02:34:05 -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; 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 S1728478AbgKBKby (ORCPT + 99 others); Mon, 2 Nov 2020 05:31:54 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:33076 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728156AbgKBKby (ORCPT ); Mon, 2 Nov 2020 05:31:54 -0500 Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 02 Nov 2020 02:31:53 -0800 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 02 Nov 2020 02:31:51 -0800 X-QCInternal: smtphost Received: from c-mansur-linux.qualcomm.com ([10.204.90.208]) by ironmsg01-blr.qualcomm.com with ESMTP; 02 Nov 2020 16:01:39 +0530 Received: by c-mansur-linux.qualcomm.com (Postfix, from userid 461723) id 7B2852111B; Mon, 2 Nov 2020 16:01:38 +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, Mansur Alisha Shaik Subject: [RESEND] venus: fix calculating mbps in calculate_inst_freq() Date: Mon, 2 Nov 2020 16:01:37 +0530 Message-Id: <1604313097-2178-1-git-send-email-mansur@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently in calculate_inst_freq(), video driver is calculating macro blocks per frame in stead of macro blocks per second(mpbs). Which results frequency is always setting to lower frequency (150MB) as per frequency table for sc7180. Hence the playback is not smooth. Corrected this by correcting the mbps calculation in calculate_inst_freq(). Signed-off-by: Mansur Alisha Shaik --- drivers/media/platform/qcom/venus/pm_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index 57877ea..001513f 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -928,7 +928,7 @@ static unsigned long calculate_inst_freq(struct venus_inst *inst, u32 fps = (u32)inst->fps; u32 mbs_per_sec; - mbs_per_sec = load_per_instance(inst) / fps; + mbs_per_sec = load_per_instance(inst); vpp_freq = mbs_per_sec * inst->clk_data.codec_freq_data->vpp_freq; /* 21 / 20 is overhead factor */ -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation