From patchwork Mon Feb 22 16:02:47 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: 385802 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp1397116jap; Mon, 22 Feb 2021 08:05:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoFDkZp693+ciqAamk7y0z5PiNAjShDPOLX9OlAua3H+I4mBckKXwEWArjNAI9w4+89NuE X-Received: by 2002:a05:6402:1854:: with SMTP id v20mr22929886edy.56.1614009925319; Mon, 22 Feb 2021 08:05:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614009925; cv=none; d=google.com; s=arc-20160816; b=e7/QueGfHSKyoB9P4ydlNLIZrhCKHvwpSfZDHCQbsE1hNeYMcK56giuZNWQ5U4FRYg I6mL0kk5oIgy7UFfzu8P+ldP+0hn2h7RIVgwh8sv6r98aNwm/wNpLD+28Ni3+q9HCVqq UZlz4axezgY2obTvI9XB3L1n0WBOWJ5/8Y6J5V4aOsxEHmFWFxHDCDVjMW67wnlnBHDv y7P6PCJEpG1io4fRtooomZH6zmgbOUpGUYOdaEWL7JcnUf/LAA3CKuYXUUfAJXuSUZKC 7xBk95APx3UIKQkC/87POT937AFzYb8jLfTNR7Y6y6AIcvNpHPuFjM3+kNC+SeOeK8cj xr3g== 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=58IX7lQQO/xiRLO+o9gmDLJkWZs2hxFilBGny+gBS5k=; b=UnfbLnNdAWiLvyhkqxr28LK9bxyla/jASbSmUqXplQgbUa2YVvCJ567D6FQpLnJRSh +s3xcROrdWElYjCFq9qBPWOQwmNo/dgMtulPaQuGu1JOSU66TBroBMF9R1r/UdY8DpjW qQNGpmt1tmOpdoa50sx8cJ1L6xST14B4ClZbHSNikyxQwb1n9bxaVNiBYbSPz+85woKF iGauJnsX1+0Hxjlueml/ryPV7oJHYe44KcezWK4b+sEdv8ZirlzPXbrASigtnZwo1aCV WxSP1UQoqYbmBbk4hYyCbD0/3jRCYGxFXDv7eCbJjmGUmpyLUeJOsoqWIUvEvscB2ri0 kK+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dCXV9MBK; 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.05.25; Mon, 22 Feb 2021 08:05:25 -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=dCXV9MBK; 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 S231558AbhBVQFM (ORCPT + 16 others); Mon, 22 Feb 2021 11:05:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231430AbhBVQD6 (ORCPT ); Mon, 22 Feb 2021 11:03:58 -0500 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7101CC0611C3 for ; Mon, 22 Feb 2021 08:01:50 -0800 (PST) Received: by mail-wr1-x42e.google.com with SMTP id 7so19654280wrz.0 for ; Mon, 22 Feb 2021 08:01:50 -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=58IX7lQQO/xiRLO+o9gmDLJkWZs2hxFilBGny+gBS5k=; b=dCXV9MBKBXkYUWUJwg1xHXjAeTxsyctxvc7mtofyqO7tDNjTpafD1+tks6BoPREUis c+yzQsbe9NzCtES2knezsBp7FhjdhefWUOYZkTvuuAKKXVqH2HDGAw7Krlf8dQ2+DGtF LVRSaoe7Yc65/UyCZDRWkzb8EbSorwtKV+Q7iuP5j44EIgOz1Wkqscqr6ipREBiS3vDV dKmhQc555qjGwK4rS9lZ6i0lvtj+R1ZrBjn4yAvryvPvqUmL5kEH0ocDlZHn3gfu2+5F mIF1k3wG7K1dS2GZ4SOXHc16UMGI3nDwxNXxvb7pAS2ReznzcOeChYKDkmrS3fEb0bks Ee/w== 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=58IX7lQQO/xiRLO+o9gmDLJkWZs2hxFilBGny+gBS5k=; b=NbVZa7EHvhYvwcRawd1Uc2Am4ZZ3NCHVFwtOLVNM/8kcnZjYqyBogAluzd1nuAGlPW rPgpizPnVNSgeJyujd2dphlxPCdodDajOIutqPBowXhr5FI4RLp3s9nTBlqZW8pPefo6 2X+/oojjnZY5VinOcPMbZLMnebItBEy19Pw9Z+kqfsdDU/4F8BfzrnaFvJh1cWc7NjEh p1jpSIAu1GlQvo0SZ0YZHNio9MsO/c5wdOx8QGzBAwVQGjw/m9SBPLv3GK4fv9TDpjYr P80TARfJYI+yOwH15m3fSX3YITx4yxXioTj5K95oCKHKslN3iv6GktOW65VbFMaWeDy1 faUg== X-Gm-Message-State: AOAM530T9Kzyxb/PcheU6/QcEoUEF6v02e7fNrXoiEaIPtITrPiucwZ/ FZTHx/aaHWvtQbnksxdIqeOmYQ== X-Received: by 2002:a5d:448c:: with SMTP id j12mr22935221wrq.63.1614009709263; Mon, 22 Feb 2021 08:01:49 -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.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Feb 2021 08:01:48 -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 12/25] media: venus: core: Hook to V6 base registers when appropriate Date: Mon, 22 Feb 2021 16:02:47 +0000 Message-Id: <20210222160300.1811121-13-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 This commit points the IO base registers 6xx offsets when probing for 6xx hardware. Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/core.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) -- 2.29.2 diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index dad597617961..e398d3bda65b 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -209,13 +209,23 @@ static int venus_enumerate_codecs(struct venus_core *core, u32 type) static void venus_assign_register_offsets(struct venus_core *core) { - core->vbif_base = core->base + VBIF_BASE; - core->cpu_base = core->base + CPU_BASE; - core->cpu_cs_base = core->base + CPU_CS_BASE; - core->cpu_ic_base = core->base + CPU_IC_BASE; - core->wrapper_base = core->base + WRAPPER_BASE; - core->wrapper_tz_base = 0; - core->aon_base = 0; + if (IS_V6(core)) { + core->vbif_base = core->base + VBIF_BASE; + core->cpu_base = core->base + CPU_BASE_V6; + core->cpu_cs_base = core->base + CPU_CS_BASE_V6; + core->cpu_ic_base = core->base + CPU_IC_BASE_V6; + core->wrapper_base = core->base + WRAPPER_BASE_V6; + core->wrapper_tz_base = core->base + WRAPPER_TZ_BASE_V6; + core->aon_base = core->base + AON_BASE_V6; + } else { + core->vbif_base = core->base + VBIF_BASE; + core->cpu_base = core->base + CPU_BASE; + core->cpu_cs_base = core->base + CPU_CS_BASE; + core->cpu_ic_base = core->base + CPU_IC_BASE; + core->wrapper_base = core->base + WRAPPER_BASE; + core->wrapper_tz_base = 0; + core->aon_base = 0; + } } static int venus_probe(struct platform_device *pdev)