From patchwork Thu Jun 15 23:36:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 693183 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 AF7FDEB64DC for ; Thu, 15 Jun 2023 23:37:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239485AbjFOXhE (ORCPT ); Thu, 15 Jun 2023 19:37:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239318AbjFOXhD (ORCPT ); Thu, 15 Jun 2023 19:37:03 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AF3B2948 for ; Thu, 15 Jun 2023 16:37:01 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-4f6370ddd27so19050e87.0 for ; Thu, 15 Jun 2023 16:37:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686872219; x=1689464219; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=gdJJ9+n9IRKzLwmspC95Y35DrYAR/DTBRoHRTZGhZyY=; b=avRMt4C2kPx7TE6eiY9u6yHoPok027p/AeOSqKP9Ru5H8PN5X1VGm2KxUvg0xp6ExH e1qPBkUf0psLZ+h/j4H2ZaZyxXuH+pBToTv64SrzTtZGNxOGXhAEULXcXCcGhgdpCqSV k1l41Fttq1Pi6Ffr766pG1DtIpX8tFw6C8wD2aiyaO7SSe3BiTovwL8gI0Vti10EOzgE PZkD2MpAcCqcYvI1F08z+k3PgAMWLDb+rR+01XKUZ4THqX+eAhbxzEPUAvnYu9xfc3SL j2nGictXtZwIj+9wnb+e+CErYrwq7StVzUTWTdVlZYgRL5ol1Vvx5KZ3IyAXZm9WP/n4 5tbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686872219; x=1689464219; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gdJJ9+n9IRKzLwmspC95Y35DrYAR/DTBRoHRTZGhZyY=; b=YpXOef+Bo4hqHFiLU5f/niTt8InNkTfhCPr20IM1XMItlKvcqtBZyPaVvPUMIA61zs lz6sfJmgSP3nP1dLaKUAhxnNYYKbcgYZHIaOKxb/hG1isnOUz+qoE4ScgoHu8cfz4Gkk jEioDKhn7In7RZC6YmgJLpvnNR8nW+BD9CJU1vV3uuZsC7pfAnlnv7vDZQq7f2Z3/gpI P432gQdYWqOVC6BRnBjErs9onxqirKChFiac3nrXY1R5D248HOHuMix88Dy4kOXhHlI8 w/uP/soO0fJkkg80vaAYokUIA90IpCjHCxJuB/Zk1f3628UMOUeyun3u7gpjJx/KQDr0 Tcag== X-Gm-Message-State: AC+VfDw2KMTwTEvydEQaYQTzyWTBAafueRF0HGjs8Mlvw8O+ZGD47xtW tpYVNcLrLzW/qw5xixA9Llh+3w== X-Google-Smtp-Source: ACHHUZ7DYmN/QRx0U9s1ok/upaVNmStFp3pK98PKKkmgqb1rLau3RN/FYfCMY//aCov1R//URRFlXQ== X-Received: by 2002:a05:6512:606:b0:4f4:c972:981f with SMTP id b6-20020a056512060600b004f4c972981fmr105872lfe.54.1686872219539; Thu, 15 Jun 2023 16:36:59 -0700 (PDT) Received: from [192.168.1.101] (abyj190.neoplus.adsl.tpnet.pl. [83.9.29.190]) by smtp.gmail.com with ESMTPSA id n25-20020ac24919000000b004f61ae50a7dsm2761423lfi.142.2023.06.15.16.36.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 16:36:59 -0700 (PDT) From: Konrad Dybcio Date: Fri, 16 Jun 2023 01:36:58 +0200 Subject: [PATCH] media: venus: core: Set up secure memory ranges for SC7180 MIME-Version: 1.0 Message-Id: <20230616-topic-sc7180_venus_lawp-v1-1-15a8f44d474e@linaro.org> X-B4-Tracking: v=1; b=H4sIAJmgi2QC/x2N0QqDMAwAf0XyvELrsLr9yhgSY5yBUksznSD+u 2WPd3DcAcpZWOFZHZB5E5UlFnC3CmjG+GEjY2GobX233nnzXZKQUWpdZ/uN46p9wF8yD99wM42 uoxah1AMqmyFjpLn0cQ2hyJR5kv2/e73P8wJmoSC5fgAAAA== To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab Cc: Marijn Suijten , Nikita Travkin , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1686872218; l=1142; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=SnxJxghJqJ9uhVZbjXUcGSZM2YFGDcZxmB3hYFB3gWM=; b=Cnh6syjdwDe950DfMtQqhOHmyL3ekvZwsm5d4D8wPap9mVlerIdV7VwLXR1w8qfSpUyt2i+mI Mz5NghdVn0yBnML617bZrIskyRxnu7EO87p8CDPCe1PX/pnbSZsY3xf X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Not all SC7180 devices ship with ChromeOS firmware. WoA devices use Android-like TZ, which uses 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 SC7180 devices. Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/core.c | 4 ++++ 1 file changed, 4 insertions(+) --- base-commit: 925294c9aa184801cc0a451b69a18dd0fe7d847d change-id: 20230616-topic-sc7180_venus_lawp-965e5fd18c7a Best regards, diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 2ae867cb4c48..bee1b4c98060 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -760,6 +760,10 @@ static const struct venus_resources sc7180_res = { .vmem_size = 0, .vmem_addr = 0, .dma_mask = 0xe0000000 - 1, + .cp_start = 0, + .cp_size = 0x70800000, + .cp_nonpixel_start = 0x1000000, + .cp_nonpixel_size = 0x24800000, .fwname = "qcom/venus-5.4/venus.mdt", };