From patchwork Sun Jan 12 19:53:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 190695 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 010AAC33CA2 for ; Sun, 12 Jan 2020 19:54:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D27022253D for ; Sun, 12 Jan 2020 19:54:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hlMWNnSt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387396AbgALTyW (ORCPT ); Sun, 12 Jan 2020 14:54:22 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:41586 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732957AbgALTyU (ORCPT ); Sun, 12 Jan 2020 14:54:20 -0500 Received: by mail-pf1-f195.google.com with SMTP id w62so3819838pfw.8; Sun, 12 Jan 2020 11:54:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WSVqYNJUUS8Cz3ud3WlLWDQz1ieCxDDqWx8hZG4FPuM=; b=hlMWNnStz5gAnwaf/V6EMtEo7MjCQteKxKAJZfSQAPcf5p9JvFf3n1xjwJfXsd48yT pkLov7ZLYKS36FOc85Qrcls0iFvaiGGwbcHkf1grhXekPo+u/fECXDBKz0K+bp63Cped lAGjn6YJngWi9wcOptKyu9iVc/l2nT18dGrLeh7OzKeRBiu11mOUtift32WdzRKdeDlN kS5vbVPkCgUmkd94FqvSRayv2xMv8bB9V50hCgnaxOQn7M4BpIYmQxLe90YDGDhjD4IW xN/xOANiP9JFhsbin98ornwbxLDhljnfSQBORBYajis2LNUIXK1o2MyMQZ2Cu/MPV9GG DQTA== 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=WSVqYNJUUS8Cz3ud3WlLWDQz1ieCxDDqWx8hZG4FPuM=; b=ic/CApTvgFBdteWrC/igu1kSIJQTcNwBpY/1QxDJbnnTkBode6NC9Hz47ykQYSi+IZ /xtyL5ZuoStn/ZqbgQfvcsKkyEnDUt2CkeuJa8Hz8FPH/6RQA74mZAmnu4zghKhO2TYB V948beHcZxmngBibfgLU6jzQCR1IkB6udS7XhBg2dK/qI18uGDA5S5sTs/XY5k4rSLwm YuspOd3QEyS29IMQ3lRDTSa7TsKQ4ZsYEQyERh83322UHNlTdf/znxdzawhrWXIK7V3n 1P3p58gvqwZknJDI57UT8dPpPf99FSCYTSPq+whaOXEW4SKrNR13m3UhryQ6etupBIWQ +dBA== X-Gm-Message-State: APjAAAVUDVfZiuEPWevHHS2CYNxbZNLErV49Uut2P40bGgrch+rJujBu oSkfLV4S0A5Ew5Lg6m0eL9I= X-Google-Smtp-Source: APXvYqxqydVI8GozbDEUMd8efHH3OugcN/BFlYVdHRgY1xAKs9qkPMBBK5A8WNsg2suQai/ZbDr/8Q== X-Received: by 2002:a63:9d85:: with SMTP id i127mr16526507pgd.186.1578858858941; Sun, 12 Jan 2020 11:54:18 -0800 (PST) Received: from localhost (c-73-25-156-94.hsd1.or.comcast.net. [73.25.156.94]) by smtp.gmail.com with ESMTPSA id o134sm11416105pfg.137.2020.01.12.11.54.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2020 11:54:18 -0800 (PST) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Jordan Crouse , Sharat Masetty , Bjorn Andersson , Rob Clark , Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Jeffrey Hugo , Brian Masney , Greg Kroah-Hartman , Thomas Gleixner , Fabio Estevam , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 2/4] drm/msm: allow zapfw to not be specified in gpulist Date: Sun, 12 Jan 2020 11:53:58 -0800 Message-Id: <20200112195405.1132288-3-robdclark@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200112195405.1132288-1-robdclark@gmail.com> References: <20200112195405.1132288-1-robdclark@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Rob Clark For newer devices we want to require the path to come from the firmware-name property in the zap-shader dt node. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index 456bb5af1717..c146c3b8f52b 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -79,9 +79,21 @@ static int zap_shader_load_mdt(struct msm_gpu *gpu, const char *fwname, ret = request_firmware_direct(&fw, fwname, gpu->dev->dev); if (ret) fw = ERR_PTR(ret); - } else { + } else if (fwname) { /* Request the MDT file from the default location: */ fw = adreno_request_fw(to_adreno_gpu(gpu), fwname); + } else { + /* + * For new targets, we require the firmware-name property, + * if a zap-shader is required, rather than falling back + * to a firmware name specified in gpulist. + * + * Because the firmware is signed with a (potentially) + * device specific key, having the name come from gpulist + * was a bad idea, and is only provided for backwards + * compatibility for older targets. + */ + return -ENODEV; } if (IS_ERR(fw)) { @@ -170,14 +182,6 @@ int adreno_zap_shader_load(struct msm_gpu *gpu, u32 pasid) return -EPROBE_DEFER; } - /* Each GPU has a target specific zap shader firmware name to use */ - if (!adreno_gpu->info->zapfw) { - zap_available = false; - DRM_DEV_ERROR(&pdev->dev, - "Zap shader firmware file not specified for this target\n"); - return -ENODEV; - } - return zap_shader_load_mdt(gpu, adreno_gpu->info->zapfw, pasid); } From patchwork Sun Jan 12 19:53:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 190694 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFB87C3F68F for ; Sun, 12 Jan 2020 19:54:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BC65E24679 for ; Sun, 12 Jan 2020 19:54:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tkhxotQz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387404AbgALTyW (ORCPT ); Sun, 12 Jan 2020 14:54:22 -0500 Received: from mail-pj1-f66.google.com ([209.85.216.66]:51552 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387395AbgALTyV (ORCPT ); Sun, 12 Jan 2020 14:54:21 -0500 Received: by mail-pj1-f66.google.com with SMTP id d15so1881460pjw.1; Sun, 12 Jan 2020 11:54:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WAKFhdZyK7HD40XoPNoJKm5mL4rsXQP3NWhrKWK0Lv8=; b=tkhxotQzMNS/84e+1iIUXadR/8wu+V1vzYgRh2Ofqgjn0UiFS8RtohOkSahN1x2BnB Ezl3uybClY4/hFIRyNf0sBbVgHCuNzXtXJe55THmPY/prpnj3t3FvDAae+TTzydQKw+F V0dlsni7YyKNdyiVKNvHvxbkh4VsGhEhktieKL5kqh5IxFfdFlFU8ZWJwRWwiFVNzhlv pdvzWv4Yk55XFad7bMaX0qHn93hXvzxCM4diIFhfXz7YwWngfwBrPt37tej9vLRyEygs TL0j5d9fmp2SzjsXIR61s9sUu3iuu5uFpEiDaUG2iBfBz99AhBekKJeHDFSi/270qNmo OdnQ== 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=WAKFhdZyK7HD40XoPNoJKm5mL4rsXQP3NWhrKWK0Lv8=; b=e8iIV8XOVgCBFSPWsNTChSVV2C9jvItTSbsz7G7aK32sy2hgZwmjZHevP49m5LEBro baZsBYyxuu9EOTlYrSJJ4WhhlYzXs8PmgLI7kESFqqshLJRCgiH9CfkGJWAyVfVL39dO ZmCPPRA3k9l4v80/giK/FYzLf7VMSSBczBxDVcdvBBt8CZojWBR4twFQBrF31FS6Eigd 4TASZPN/Bp1WgrvCjtzn13+6oVIE56P3sexKbEOpiMPybx4CXHYEUkjwkln/oBkHHv3E 0baUu2iiOEiSA2846CLS+dtxfgTthJv31khRAj506aZNbNRtPAJkvfJZlzCb6mpjwIT/ jUeA== X-Gm-Message-State: APjAAAW1mltg0SioLrGjPCaQfcoXUOx/iJZUfPxF0c00Lukl7wZmLdnN UGozGATxNkUQfLGKpZTQdeE= X-Google-Smtp-Source: APXvYqwTHGhndNZNsQKYW9nTAcuiFTj1LSY80cI+G9OpcouT/PjQ1Ca1QJlhYXRZmaQOV1+0IG/iHw== X-Received: by 2002:a17:902:426:: with SMTP id 35mr10638467ple.302.1578858860792; Sun, 12 Jan 2020 11:54:20 -0800 (PST) Received: from localhost (c-73-25-156-94.hsd1.or.comcast.net. [73.25.156.94]) by smtp.gmail.com with ESMTPSA id 17sm11391924pfv.142.2020.01.12.11.54.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2020 11:54:20 -0800 (PST) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Jordan Crouse , Sharat Masetty , Bjorn Andersson , Rob Clark , Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 3/4] dt-bindings: drm/msm/gpu: Document firmware-name Date: Sun, 12 Jan 2020 11:53:59 -0800 Message-Id: <20200112195405.1132288-4-robdclark@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200112195405.1132288-1-robdclark@gmail.com> References: <20200112195405.1132288-1-robdclark@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Rob Clark The firmware-name property in the zap node can be used to specify a device specific zap firmware. Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- Documentation/devicetree/bindings/display/msm/gpu.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/display/msm/gpu.txt b/Documentation/devicetree/bindings/display/msm/gpu.txt index 3e6cd3f64a78..7edc298a15f2 100644 --- a/Documentation/devicetree/bindings/display/msm/gpu.txt +++ b/Documentation/devicetree/bindings/display/msm/gpu.txt @@ -33,6 +33,8 @@ Required properties: - zap-shader: For a5xx and a6xx devices this node contains a memory-region that points to reserved memory to store the zap shader that can be used to help bring the GPU out of secure mode. +- firmware-name: optional property of the 'zap-shader' node, listing the + relative path of the device specific zap firmware. Example 3xx/4xx/a5xx: @@ -85,6 +87,7 @@ Example a6xx (with GMU): zap-shader { memory-region = <&zap_shader_region>; + firmware-name = "qcom/LENOVO/81JL/qcdxkmsuc850.mbn" }; }; };