From patchwork Fri Apr 2 10:06:37 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: 414338 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285040jai; Fri, 2 Apr 2021 03:07:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/cWDRZrOmXCV18JxqDY8UGw1J15BldEvGlWuKjNHwsKo23N7a7pw7sZznNTztT4kRwaZr X-Received: by 2002:a05:6e02:85:: with SMTP id l5mr11147830ilm.182.1617358064349; Fri, 02 Apr 2021 03:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358064; cv=none; d=google.com; s=arc-20160816; b=ICWv2L09Jyr4GEX6R/+CHQFq+v/doWzXYiOztxqCrcgXCBwnqKFX0xVX9PA9tYhEGU 7130NDZvGq2NSWhK/vMkjsgpi5nh5uOH66Yp7iqmdXjj6U6qE6t8Mx+rAXCApC2SLf6P J+ZxwibLib4PB4bo6Z5zSuitbhsSYyWhfxSPImAC0f09UXYu0CpZyqhOBCHbJJRh4Zyg QMJCAfYWBEU1Lj4t97rehHcPjKBWNyYpKnWB1M941BDYJArmeEKz5v9s/0FfbaiyYHVB IBKNLjwJ6E+DGPS4dsCNWjP3lXZ2exa+fH3lsEt7ulhoSSkSKt04UYJjm/elI7unHwDG EiPw== 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=TpEdR2IV3OYZgpVzePZ+eNmYK6P9QMXJzc4TaX/ELQk=; b=VSJtfvjqjPPmcK0xtdvambGO3/6zSJHy6Aa8+20ja3aLqso+vIL3Gy/rysKACIFLd2 FRv7XLj3frJLx6vopIlTJDdfebFougjVQKmQWyk7QSwAAg8Hf5x2Qar2iogHwitO6AFa jxKXysI9nYhesmHTXb/+ch0nRJXMyBnrVW0qrFabQFeZKG+LZvD/srk4cBPA8S0ydUnD JSLFrFfgp6dkQleH9tKNYvdz/Oco/NQs5/myDa9q2jFItgPhH25Ms4sJGuxheOOq+pfK R+mmH9RTB4gc5/BtD5iXaRV7zt06bzJeto/fQOSdHu2XZCIy+/yuIEWzkJpCwW03WY5J KJrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X0DWWLLK; 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 g2si6942838ile.30.2021.04.02.03.07.34; Fri, 02 Apr 2021 03:07:44 -0700 (PDT) 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=X0DWWLLK; 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 S234779AbhDBKFk (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234868AbhDBKFf (ORCPT ); Fri, 2 Apr 2021 06:05:35 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76594C061794 for ; Fri, 2 Apr 2021 03:05:32 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id b9so4302747wrt.8 for ; Fri, 02 Apr 2021 03:05:32 -0700 (PDT) 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=TpEdR2IV3OYZgpVzePZ+eNmYK6P9QMXJzc4TaX/ELQk=; b=X0DWWLLKc2F+bRVX6HmEEm/ze5bEgsc0OnnHssty+AIW/Hj/0PYJ85KH1rKj2yT5nr ulUkv96arIo7iFiaFyEULoYYdv2DocrCqtskMfMYCbxS5lUMmnM9Gzd9WXlT8tby62y0 MWpNgUCpW1SlcqRRvHxQxgQLhGF6XBeuSH0AhEz6YJatct80WoHVAg6I90C5mDPY01DR OmhpROsubbAZnV8n+YmtUrh1nnE6k97/rEF+GFSMhtEozpZ6RPe1DRA8SCqwusowCqJK 0bDsl6Ia/1EYu1ZUmdwuguYO47TKhYtRvI+bXCaZUfyCdmKOa1a22Iu+MDEsEX85pupq +xug== 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=TpEdR2IV3OYZgpVzePZ+eNmYK6P9QMXJzc4TaX/ELQk=; b=dmhA1UMcOBKn3tKcibejZxOSKfFKQRLWfUBL8rJBlH/288z3P6EVuis6G/xBS6DtQs Dw36bQfb/gC1nS7AMiy2Ti/8WemXIXMbHhvG8hhtlEH4r56gfsp1aU+wqJn5cDpjV6sc 17/n7PnrG16t33rrYY7SOoE7+JZHR8wItB1YPNmefxlJp3wAsq6yci2ogUzEmvYdHlku PXxIYG1VVvkMmd+T+mAWGhhUJ6X1NvnXdmbIZxF9lqT4+LGpLLL+3LTy1ipkVmzBCXmz oraIXl9sd0IhcF2OiHmal7sRBVUrc/IVtl82gPnBjnhDWyILmr5EpNTyRWgNq6JnVznW NlgQ== X-Gm-Message-State: AOAM530AcUoFsHEQxK+n9Y6TxJhA7J9YceY+QbO2YakifPr6iZFslLn9 bXNeEaUhF/6RjwyDJ0l8GRhEDA== X-Received: by 2002:a5d:58ce:: with SMTP id o14mr14743393wrf.4.1617357931225; Fri, 02 Apr 2021 03:05:31 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:30 -0700 (PDT) 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 v3 14/25] media: venus: hfi: Read WRAPPER_TZ_CPU_STATUS_V6 on 6xx Date: Fri, 2 Apr 2021 11:06:37 +0100 Message-Id: <20210402100648.1815854-15-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 6xx we should read wrapper cpu status from the wrapper TZ register set. Co-developed-by: Jonathan Marek Signed-off-by: Jonathan Marek Co-developed-by: Dikshita Agarwal Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_venus.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 09fc81da0645..dabff8654f97 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -1472,10 +1472,14 @@ static int venus_suspend_1xx(struct venus_core *core) static bool venus_cpu_and_video_core_idle(struct venus_hfi_device *hdev) { void __iomem *wrapper_base = hdev->core->wrapper_base; + void __iomem *wrapper_tz_base = hdev->core->wrapper_tz_base; void __iomem *cpu_cs_base = hdev->core->cpu_cs_base; u32 ctrl_status, cpu_status; - cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS); + if (IS_V6(hdev->core)) + cpu_status = readl(wrapper_tz_base + WRAPPER_TZ_CPU_STATUS_V6); + else + cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS); ctrl_status = readl(cpu_cs_base + CPU_CS_SCIACMDARG0); if (cpu_status & WRAPPER_CPU_STATUS_WFI && @@ -1488,10 +1492,14 @@ static bool venus_cpu_and_video_core_idle(struct venus_hfi_device *hdev) static bool venus_cpu_idle_and_pc_ready(struct venus_hfi_device *hdev) { void __iomem *wrapper_base = hdev->core->wrapper_base; + void __iomem *wrapper_tz_base = hdev->core->wrapper_tz_base; void __iomem *cpu_cs_base = hdev->core->cpu_cs_base; u32 ctrl_status, cpu_status; - cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS); + if (IS_V6(hdev->core)) + cpu_status = readl(wrapper_tz_base + WRAPPER_TZ_CPU_STATUS_V6); + else + cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS); ctrl_status = readl(cpu_cs_base + CPU_CS_SCIACMDARG0); if (cpu_status & WRAPPER_CPU_STATUS_WFI &&