Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp331999pxb; Mon, 13 Sep 2021 20:59:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyA7LxQy8PinYHmynYf2jS6yMY/TVmXGIqNZlFRzz5SBK+kq3xn3+Y7a6StGcQ5WVqGgvjN X-Received: by 2002:a17:906:9747:: with SMTP id o7mr16628788ejy.486.1631591977780; Mon, 13 Sep 2021 20:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631591977; cv=none; d=google.com; s=arc-20160816; b=qn/jTxhlyOdjy2cBBP0pNHQBVUI88AYi2YyZjpWqtibn1A7VJg00GfkSJatgpwPJuO IeegO8rWzLd3AEwkn5UFmaqhQIjiJ5zAl6dSD0qvsm9JYeYAP7MxifOK2gEZjv+hHkyS kxr9wexIJULm4JvGWGtHwjpaUoaH3HIPovRKf9qnQ/pWfT76lLrGMR4DwNk2GdT5rEMI 7fZsf2tRywamgcSgb/Ogvzc4/q9VhrEsTDeBDD4yxye4k/+kE9aYOCUGle5qsRgmPIi+ z2gwTcKAHSMgruX55iSTMYF9w43PYD4DlnT/JPNjm2tL90lgYILl/rkM/rMH818fN4W7 pQrA== 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 :message-id:date:subject:cc:to:from; bh=ohRz7F5ZxUvCh24L88upa5oPiPVDGFoMsQo3t9Z2vcI=; b=U5JV4JzBK6jQQEdnSxdXJy6LkBiuSGLNcXDByYl+UhU228/AaXhyAqYYyerlYr6nmF Y04Pl8Xts0xf1yAQx5KVRq3yUnAILCf8fG9c9JZKoOOqvZDSL5jEnUunzcPl6DSNw1Qx qmMjquFPRfV+YRSgIyf2/cQYFOPSxSGjgwaYakmznRdPMbuSuclUCFU0ZnTtzWOyw8bg BU6XBD6ulMgjtVpklu0FLkJjF1QyPop6V3bTSa6kos37wSq/PyLUYqjGtL0a4yfy8Mbm fFbjNqJIPl0cAje9Xgc0U7zO4uo8aPxnEK6rJE+nAJ7BIK2Ug2ms4P0Wa34vmLujU07b K7sg== 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 v20si10576104ejv.515.2021.09.13.20.59.14; Mon, 13 Sep 2021 20:59:37 -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; 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 S239305AbhIND6p (ORCPT + 99 others); Mon, 13 Sep 2021 23:58:45 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:10136 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238979AbhIND6k (ORCPT ); Mon, 13 Sep 2021 23:58:40 -0400 Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 13 Sep 2021 20:57:24 -0700 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 13 Sep 2021 20:57:22 -0700 X-QCInternal: smtphost Received: from c-mansur-linux.qualcomm.com ([10.204.83.180]) by ironmsg02-blr.qualcomm.com with ESMTP; 14 Sep 2021 09:27:11 +0530 Received: by c-mansur-linux.qualcomm.com (Postfix, from userid 461723) id 0D7322267B; Tue, 14 Sep 2021 09:27:09 +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, dikshita@codeaurora.org, Mansur Alisha Shaik Subject: [RESEND] venus: fix vpp frequency calculation for decoder Date: Tue, 14 Sep 2021 09:27:07 +0530 Message-Id: <20210914035707.26670-1-mansur@codeaurora.org> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In existing video driver implementation vpp frequency calculation in calculate_inst_freq() is always zero because the value of vpp_freq_per_mb is always zero for decoder. Fixed this by correcting the calculating the vpp frequency calculation for decoder. Fixes: 3cfe5815ce0e ("media: venus: Enable low power setting for encoder") Signed-off-by: Mansur Alisha Shaik --- drivers/media/platform/qcom/venus/pm_helpers.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index 3e2345eb47f7..e031fd17f4e7 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -1085,12 +1085,16 @@ static unsigned long calculate_inst_freq(struct venus_inst *inst, if (inst->state != INST_START) return 0; - if (inst->session_type == VIDC_SESSION_TYPE_ENC) + if (inst->session_type == VIDC_SESSION_TYPE_ENC) { vpp_freq_per_mb = inst->flags & VENUS_LOW_POWER ? inst->clk_data.low_power_freq : inst->clk_data.vpp_freq; - vpp_freq = mbs_per_sec * vpp_freq_per_mb; + vpp_freq = mbs_per_sec * vpp_freq_per_mb; + } else { + vpp_freq = mbs_per_sec * inst->clk_data.vpp_freq; + } + /* 21 / 20 is overhead factor */ vpp_freq += vpp_freq / 20; vsp_freq = mbs_per_sec * inst->clk_data.vsp_freq; -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation