From patchwork Fri Mar 12 17:30:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 398679 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1383922jai; Fri, 12 Mar 2021 09:30:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbY8GKqwdIkjvLFRhVzEcZvOkD8TbIVp2gc9HGrPtjUF8wsb7W9w4c8gpIjLcuy1AmpfiZ X-Received: by 2002:a05:6402:27d3:: with SMTP id c19mr15713158ede.129.1615570235457; Fri, 12 Mar 2021 09:30:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615570235; cv=none; d=google.com; s=arc-20160816; b=KQBmJ28D4BHwR+gtmfJNVlu7bWOi7GqjXUg7Hb6YBsgMZbQJ+RlaNlRsBl1diO6I3t YMqv1raA/FK3r1HgLxr4dNP+LLZR8Xv8WVJrYTpGqFs9922/IStZiBpn7qR4Iggsy5/p e6/iUCLh9PzGHtKrBiD5mW5DL3yp2vL49j5pCQ4OOlC7viEHNY9KiXVGBhEnc4rO5f2k ittVSiwdQak/qsOJe66VwgKEudyIkUgsL2QpdYNWWe9qeVBmQKMK09e9EwEesAsZOi6N Sz3JC7/5+wigvKLSII8lHQIrubgaYePxOsiObBodLoidLaBrIDf7fiJbzfYMgydwzOqO U5Fg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aAjW4GW8O+sHFwP0oe1kd9Dh6BYS5Lz26CDNq9x7MhQ=; b=0qYTBpAO14UIpALUb1lif//MvWUGKtPyidnxDLQwr8eUerbejnD26VVBFsgbxNDtbQ oE5WnDm5tiph6oP/DkZuHbcCjfh9jM7h8vYBcLdJe1wXywXFe5a9mlSVMFt2kxIZ1/Vu w5BMZH0iRX7oJrBdPImOIPTKugrtvRCihRYjYR9CNdgQ0FJrvsIkzOHrFQLFelVaXc4K 78WA90qsXZQ001dD3sCsDFTtkIUBSD5ndeXRCAcRVzeXwgvh1Eky1nUONMt8OxSmriyV oFxpYUWibncM2ebCFgvtT1sogKzJrnpDeRINtVo8g1nzlyrV6wLQplDFvCwYAEet9qpC obGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yeZNMB70; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ot6si4540497ejb.337.2021.03.12.09.30.35; Fri, 12 Mar 2021 09:30:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-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=@linaro.org header.s=google header.b=yeZNMB70; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232741AbhCLR36 (ORCPT + 16 others); Fri, 12 Mar 2021 12:29:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232804AbhCLR3c (ORCPT ); Fri, 12 Mar 2021 12:29:32 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E943C061761 for ; Fri, 12 Mar 2021 09:29:32 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id b9so2211083wrt.8 for ; Fri, 12 Mar 2021 09:29:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aAjW4GW8O+sHFwP0oe1kd9Dh6BYS5Lz26CDNq9x7MhQ=; b=yeZNMB70f5BCRmJb1J0fsPQGQikVHcGeCNRrqgnUVrnZAjbPnUA5xhTiXtjpmp9wqY oZS2RVdqzB3Pa/X5He9+hmhD4d37fDszTNwcDm2laR+7I7K3MO6tYQ0fbrElex+VAB3x YInapK7FzunSoV2C68ZJLiK9XbCs8YHcb//GJZ8RcdGFRbaETHs4XwJTanbqwQoYTVKt m2YxSWKVrZRKwLHQ6JgA31UzjKoqf8q5c/mfSJsaSi11QzHktSM0wjMnO2+e+R7r4x/g J6Pxt2EelkWgEw7JjfOCRLqg6JYM3iGB6XE+y2H6BbcuRfT6g8PRjDthmgGPV8EcfIyH SRcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aAjW4GW8O+sHFwP0oe1kd9Dh6BYS5Lz26CDNq9x7MhQ=; b=bhWkRqPzRIIJU9c7UjrEpzRHLtGmjzD7IhoyKWZb+NiobC+wnSyQhinNudQ44bsYE6 qG7u3c/qauNAEtPjlHxAbwteGDdNFCUUec2QsFKfK5YOYnYftVczblEbaZ6pi67W1VNv d2Mxz1698RSul7as1kih/9VjEjfmjv2xXkpA+RbBpi2Gw1I2pJykMRsxo+I7vCkkqsrz wHg+gzzNZlN2izRlz1SL/4kgxiYC6dJq4kPRabHf8g235mkcea3v6LyxzEkezmHlc5YL ZbQTYIApgAhaHBcIpD2h/FE/Vkk1I/UZ5+u2uygoX3XKhh/qP/+pG6/0A0WlyHT+2sc+ FjNA== X-Gm-Message-State: AOAM533mgWEBw4zDPRviVug9bY8h3jP9KFeMXwb8dFRSdnLKtzehXcz9 7XlBw3YMyf/Zn77pAZOTDr+l1A== X-Received: by 2002:a5d:4686:: with SMTP id u6mr15015847wrq.60.1615570171020; Fri, 12 Mar 2021 09:29:31 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id 18sm2876375wmj.21.2021.03.12.09.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:29:30 -0800 (PST) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v2 19/25] media: venus: pm: Toggle 6xx wrapper power in vcodec_control Date: Fri, 12 Mar 2021 17:30:33 +0000 Message-Id: <20210312173039.1387617-20-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210312173039.1387617-1-bryan.odonoghue@linaro.org> References: <20210312173039.1387617-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal When in vcodec_control_v4() on the 4xx path we select between one of two vcodec cores to toggle power control bits. In 6xx there is only one core which offsets the relevant control registers to a slightly different address. This patch accounts for the address offset for 6xx silicon. Signed-off-by: Dikshita Agarwal Co-developed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/pm_helpers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index a91dc24de2a4..dfe3ee84eeb6 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -414,7 +414,10 @@ static int vcodec_control_v4(struct venus_core *core, u32 coreid, bool enable) u32 val; int ret; - if (coreid == VIDC_CORE_ID_1) { + if (IS_V6(core)) { + ctrl = core->wrapper_base + WRAPPER_CORE_POWER_CONTROL_V6; + stat = core->wrapper_base + WRAPPER_CORE_POWER_STATUS_V6; + } else if (coreid == VIDC_CORE_ID_1) { ctrl = core->wrapper_base + WRAPPER_VCODEC0_MMCC_POWER_CONTROL; stat = core->wrapper_base + WRAPPER_VCODEC0_MMCC_POWER_STATUS; } else {