Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5133649ybl; Mon, 26 Aug 2019 23:21:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDgS0S0RuaHrneAoleggGPHsGXq4Da/LHTgjHV6e9XWAa+IfC2bkwPbvUVJspE6tWaLLrx X-Received: by 2002:a17:90a:dd41:: with SMTP id u1mr11306805pjv.132.1566886891550; Mon, 26 Aug 2019 23:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566886891; cv=none; d=google.com; s=arc-20160816; b=uHqqVyGo3vT6AGM7aEXc3d+Ig03NYZVyam/TZL33VVV0R4uPUTrBrh9+ruYZ86sxtX 7cAGU9XiVDwhfbe3y4QIG1cHJ9rOjGAa+tl2bA7+8X3vfW7ivKXS/4Q3WDUEsEBCxOaa ss4jtlP0nlIpZl+Ej64wDazhASe2hOfqezPE2fv9JJ/gCijXrQUbR3YStgYNdqe5ICVb D+K82+3P08Q9/+IX4RS4sjdWrXBFqs2Lmu4J4UF2QnTOwd94me+3WB+0vUioaIi/OoIl 4cQj1lKwXxz1CPN7jqO18JuEyRYtf81rVwIkvxNCvu7YzIAhZUiFhBzlMYv37EKEWhSZ 7Vsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature; bh=gqpi4WDs0Ah0d1gqpIXNBqYXfOv9c5d0TfZ3v39wC+Q=; b=y/bA9cusuJeNqzttSeQjFNu8HUn6w3j2wC+GzCEuqUD5X3yuh0KTzg7eHrYk2tN9AL BNSpE2il/Z1ImHMXVbfybk78DnrLJPF7tgCHmiFjLwP0gjVUN0Qv3X9GRfdO82soXEqL PN50Uu2g1Aysenjx8AYyf5Q7Nhjmzkc1fimx+mwch+m6ysyTt3/9g+kmViuHnv7+O89t /5UpjUjBnZFLW43J14a+wcAeX2z12Iv0rpx9M/JZAY+Qkzg4vD7vvNm1Tka9CaEdfC1o /BxZTxhdbVw4wMdXRPeijmeOyh+e1/Pa42bLo4U0aIJBrKgzXTcTLnFNbMPfGAIZxYPo d86g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=O8smOB3N; dkim=pass header.i=@codeaurora.org header.s=default header.b=O8smOB3N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13si11240013pgr.514.2019.08.26.23.21.16; Mon, 26 Aug 2019 23:21:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=O8smOB3N; dkim=pass header.i=@codeaurora.org header.s=default header.b=O8smOB3N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727306AbfH0GUB (ORCPT + 99 others); Tue, 27 Aug 2019 02:20:01 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56302 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726025AbfH0GUB (ORCPT ); Tue, 27 Aug 2019 02:20:01 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A6AC060DA8; Tue, 27 Aug 2019 06:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1566886799; bh=KMjZiOdzmbnjnMgXMNbNCaJx4QZVSnJaRQ9vtG4LnT0=; h=From:To:Cc:Subject:Date:From; b=O8smOB3NzGs27MSqejTJY2ity28oh3e6AZnR8V4mVY4JDGbF7JNkgSUyMN5fQ0xSW wnkAfKycRcuWcYfJtoiFcHa4OdY6n/Xyq//Fdp9hTyt/BFIgdWPQA45EHdKUk+wbPC 6lV3KIPu8jTxZXz9iYuimA8Cs69RKbvZyK9i48js= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from amasule-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: amasule@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 248916090F; Tue, 27 Aug 2019 06:19:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1566886799; bh=KMjZiOdzmbnjnMgXMNbNCaJx4QZVSnJaRQ9vtG4LnT0=; h=From:To:Cc:Subject:Date:From; b=O8smOB3NzGs27MSqejTJY2ity28oh3e6AZnR8V4mVY4JDGbF7JNkgSUyMN5fQ0xSW wnkAfKycRcuWcYfJtoiFcHa4OdY6n/Xyq//Fdp9hTyt/BFIgdWPQA45EHdKUk+wbPC 6lV3KIPu8jTxZXz9iYuimA8Cs69RKbvZyK9i48js= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 248916090F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=amasule@codeaurora.org From: Aniket Masule 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, Aniket Masule Subject: [PATCH 0/3] media: venus: Update clock scaling Date: Tue, 27 Aug 2019 11:49:39 +0530 Message-Id: <1566886782-9406-1-git-send-email-amasule@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In this patch series, clock scaling and core selection methods are updated. Current clock scaling is same for vpu4 and previous versions. Introducing load calculations using vpp cycles, which indicates the cycles required by video hardware to process each macroblock. Also adding vsp cycles, cycles require by stream processor. Clock scaling is now done more precisely using vpp and vsp cycles. Removing core selection from this series, there will be separate patch once issue related to power domain is fixed. This patch depends on the following patches: https://lore.kernel.org/patchwork/patch/1114762/ - Venus interconnect support for sdm845 https://lore.kernel.org/patchwork/patch/1114761/ - Venus interconnect support for sdm845 Changes since v6: - Removed core selection. - Corrected frequency calculations. - Removed instance lock used while iterating over buffers. Changes since v5: - Corrected load_per_core calculations. Changes since v4: - Added call to load_scale_clocks from venus_helper_vb2_buf_queue. - Modified check to match core_id in core_selection. Changes since v3: - vsp_cycles and vpp_cyles are now unsigned long. - Core number counting aligned with VIDC_CORE_ID_. - Aligned hardware overload handling of scale_clocks_v4 with scale_clocks. - Added bitrate based clock scaling patch in this patch series. - Instance state check is now moved from scale_clocks to load_scale_clocks. Aniket Masule (3): media: venus: Add codec data table media: venus: Update clock scaling media: venus: Update to bitrate based clock scaling drivers/media/platform/qcom/venus/core.c | 13 ++ drivers/media/platform/qcom/venus/core.h | 16 +++ drivers/media/platform/qcom/venus/helpers.c | 188 +++++++++++++++++++++++++--- drivers/media/platform/qcom/venus/helpers.h | 3 +- drivers/media/platform/qcom/venus/vdec.c | 8 +- drivers/media/platform/qcom/venus/venc.c | 4 + 6 files changed, 209 insertions(+), 23 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project