From patchwork Mon Feb 22 16:02:54 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: 385798 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp1396665jap; Mon, 22 Feb 2021 08:04:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxBdQ1UfgaGvcel8JAiAEkFSKy46IGAR74ChXjFRRyP4BNafBrSQgMh2dLDs5MA2rixIMK3 X-Received: by 2002:a17:907:7252:: with SMTP id ds18mr21857792ejc.239.1614009897436; Mon, 22 Feb 2021 08:04:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614009897; cv=none; d=google.com; s=arc-20160816; b=ecEg4JwgvNSqr6KhsHMWEYTGslw/G2wr4EF/05IXfJemjE94gqv4/rdYqHIbkjZTYV MYbGmNZaKcCGVED9xqAHiqL+SegB0Czspn3AUPpDtEh81HL37iRhbAZhfXw/p3xBadLX tIkAebZKchLyIoWH/9mKLf3a4sALXiHMv6U/pvPB87Ez1UtjyEg8hNFI3HKsTm+EQ2jM fiyrNc4iJh1A/SmEwt1wvSxpb4x7UBklsus3kUFsz6FcS3pmb9x//R8m6NndbLuVYkOe 5Lkb3RYUjznu00AxeN0OWswi7IcSr0yj15oF6iT4GMrg++lC1RNzmqiRxUVEvamj7XKb lZ4A== 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=bpo0//4chUUR1mhPO3iw62PhjsjchQwUrKOO/MLsUwc=; b=IOV/Dt69GbcdYLjuwRdQelwRrTcjC3s68pt+uEmVQtkFh6Wyxj9GNyXEmXRp1zAUuJ UonwkRbGZB6lIb8RljwC7emm3PSzlaDcBE0R/fCaO7nXJlwQvwfqvQ2P3RE04ubcNM+Q 8JDaxDpAT5fulW+adU7E1mTwgV+cWd6YxfLcrtsaOIgzuJ1OiIXHsIDH+gxe6pGQDGnu QZvmE5sHmGKbPD8pd4mKkdp58W0E3KeqOjbEmqLKBKAp2MI9usweRUd3JxBOorCmW8X6 7vjF2kIMUnyy4hIWANSfBtSZWckqMp3T/rWX5ljQsJUkx0rn5srlpwVWl4GJvMrbkKyS 0NTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MVWjFI+S; 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 s13si12459169edj.330.2021.02.22.08.04.57; Mon, 22 Feb 2021 08:04:57 -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=MVWjFI+S; 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 S230411AbhBVQEc (ORCPT + 16 others); Mon, 22 Feb 2021 11:04:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231339AbhBVQDk (ORCPT ); Mon, 22 Feb 2021 11:03:40 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82C8AC061A32 for ; Mon, 22 Feb 2021 08:01:57 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id n10so14875298wmq.0 for ; Mon, 22 Feb 2021 08:01:57 -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=bpo0//4chUUR1mhPO3iw62PhjsjchQwUrKOO/MLsUwc=; b=MVWjFI+Sfit+bMcvmbseAz4TacHVWZSxgdYfAkMX5Hu089gKmKBb8G/z5vMOT/ctVb /F6P6CdLeQEXQ2e9k6GLASmB35q7TPxFwYmX2NihGtHFSzZjlQlN5YXcgPEn6H62mqmq +PxZkm2UEUYF4F3D6H3rJFlFFiWbcjCBelJphqn4pRVX3h84jT+tG1zA+7TQc5MrUaRo 4bH8i1PYY7Gy8NwHr/IJ7KeJ9qAyGwAgftN7MK/ICjbudOXJCe3591HryeQ8IRAUBi3B mC9UPTkCrx4bKG2ikO/N3TMucV6JPtGKbdX/EiltIZPmgxJ4Nmq1zMUb4iY9PNVWxTDJ 6B7g== 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=bpo0//4chUUR1mhPO3iw62PhjsjchQwUrKOO/MLsUwc=; b=efJmrGwIajxbIdWKOwjeDfApNKb4uviuDdCDx+9yTn7e6wuwbxGHZJ2bejEOSl5eVB 8Uz/qHTzR9EslLHlQvBXDvz2R6aBbL8KuDQ9dOuVFGJzEiFhBFsVhy0tS/isWBVZ7J85 Lavy7VZl45wWhb1Ek0FDnlTBU8IeZF0mheXYIhMaoO9fBCepNr1aA/OpW9w62pjD8H9f 3ApG6JHT28ljFo9+PnZKZvxmF4tkTQqA+WVCi7njEEZwFx+Xvz14gAoKg8qDW3FxQta4 UdVdAizlHxgYy1WSBV7bZ5PysisOmnJfLujK8drMl3N+kakDqNZ8VCHDUkT5saph/XKh NO6Q== X-Gm-Message-State: AOAM533b7sNefBCbKMwUb3JmbWvwfC1IBBmr9XsI2mwzR7g68f0K9y7R ArcINiT0hfgO2phmzdEJTlQTbA== X-Received: by 2002:a1c:f409:: with SMTP id z9mr110111wma.141.1614009716353; Mon, 22 Feb 2021 08:01:56 -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 c3sm7373697wrw.80.2021.02.22.08.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Feb 2021 08:01:55 -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 19/25] media: venus: pm: Toggle 6xx wrapper power in vcodec_control Date: Mon, 22 Feb 2021 16:02:54 +0000 Message-Id: <20210222160300.1811121-20-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210222160300.1811121-1-bryan.odonoghue@linaro.org> References: <20210222160300.1811121-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.29.2 diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index f163526c3f83..9ca90632c60e 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -397,7 +397,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 {