From patchwork Mon Oct 2 14:20:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 13406281 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB324E784B3 for ; Mon, 2 Oct 2023 14:20:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237755AbjJBOUj (ORCPT ); Mon, 2 Oct 2023 10:20:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237743AbjJBOUh (ORCPT ); Mon, 2 Oct 2023 10:20:37 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9CEAD3 for ; Mon, 2 Oct 2023 07:20:32 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-533d31a8523so19340587a12.1 for ; Mon, 02 Oct 2023 07:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1696256431; x=1696861231; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=P1hZYPziDEWmtdRiUaFpSGZqLrCtBE6eM/yrVSmM+ac=; b=zHyiXBuX02GTWjhbEMuVda/7vb0nTmIEluWBJOJWDh2BNkmlDQBkhd21LlSqSRB6IQ g8YwPujM654dlXByMzho0iNUYZkt3AbpzyTlX9YYEBtOsF7FULUwHWsvF4xBr8vbC33m 6NKDX016MSIA6YTit/C1QUxfWEJ1z1nqDPoD3o18aiCOagFA57zqH4YFo5bhnJN8mgCA EmzeElY+M7gA2wglSjZMquE28BrGGXkJZv1Tii3E0rWyFatyK0+/JG6fYfmeHVNmEIz0 Dyul+Gn6xAFOYE8qY+To6TFUdcODa7XrvJszfpPXKDOaRjJC//NdRckE2rtH/oxcISp9 WNiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696256431; x=1696861231; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P1hZYPziDEWmtdRiUaFpSGZqLrCtBE6eM/yrVSmM+ac=; b=OyBwuGIUdI9DaGftnKehMf5lWaJ4Zbi97aUPRlMCyCtPrvtE0KDW2lpEk6xn0GTgqv 7tJ7gru1N5W+MSeTpkWasUdwja4H0aSbV5w6zXumlZ5+7AwbfkNu1dhw7wSHGWZOyVKq vP+6TzXRKIfs9DfX72YnXwlnf+cWqCYGtjJ7Ot4oCWHvft4L7sUleDR/2Ljo0s5WU5uz uraG+66yGYzpdaMcZnqp2hlySq3hImXHy8F8w+Brd9YSMeKM7FBm44c3oHOE9n/VpHId fpH7wnKV1tk8IBK9vS8Hk6NH033iWxkjJ+zEPpXvM7Zkl3fTuCoc54QzaPsvOi55V1wJ MKDQ== X-Gm-Message-State: AOJu0YxKdLxwDhhUQPmWU4D1fHNl76VNQ8YVHMxePKsXSOwKF/ew4BOU HuNHA9UwxYScQCH3nTveaop4Qw== X-Google-Smtp-Source: AGHT+IHS8qXn+yYgV2nDhPjPMgXw9/Id9Vs7YQjL3WRjgJE3pFeEWP9RTn1o1Ihd/bOo2hngzdHi/g== X-Received: by 2002:a50:ee1a:0:b0:523:3e23:15ab with SMTP id g26-20020a50ee1a000000b005233e2315abmr2670995eds.26.1696256431036; Mon, 02 Oct 2023 07:20:31 -0700 (PDT) Received: from otso.luca.vpn.lucaweiss.eu (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id w10-20020aa7dcca000000b005309eb7544fsm15583356edu.45.2023.10.02.07.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 07:20:30 -0700 (PDT) From: Luca Weiss Date: Mon, 02 Oct 2023 16:20:29 +0200 Subject: [PATCH v2 1/3] media: venus: core: Set up secure memory ranges for SC7280 MIME-Version: 1.0 Message-Id: <20231002-sc7280-venus-pas-v2-1-bd2408891317@fairphone.com> References: <20231002-sc7280-venus-pas-v2-0-bd2408891317@fairphone.com> In-Reply-To: <20231002-sc7280-venus-pas-v2-0-bd2408891317@fairphone.com> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , cros-qcom-dts-watchers@chromium.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Not all SC7280 devices ship with ChromeOS firmware. Other devices need PAS for image authentication. That requires the predefined virtual address ranges to be passed via scm calls. Define them to enable Venus on non-CrOS SC7280 devices. Reviewed-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue Signed-off-by: Luca Weiss Reviewed-by: Vikash Garodia --- drivers/media/platform/qcom/venus/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 054b8e74ba4f..5c6baa0f4d45 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -881,6 +881,10 @@ static const struct venus_resources sc7280_res = { .vmem_size = 0, .vmem_addr = 0, .dma_mask = 0xe0000000 - 1, + .cp_start = 0, + .cp_size = 0x25800000, + .cp_nonpixel_start = 0x1000000, + .cp_nonpixel_size = 0x24800000, .fwname = "qcom/vpu-2.0/venus.mbn", };