From patchwork Sun Jan 12 19:53:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 11329333 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 02A41139A for ; Sun, 12 Jan 2020 19:54:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D57A2214AF for ; Sun, 12 Jan 2020 19:54:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bsysWW+x" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733212AbgALTyR (ORCPT ); Sun, 12 Jan 2020 14:54:17 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:55136 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732957AbgALTyQ (ORCPT ); Sun, 12 Jan 2020 14:54:16 -0500 Received: by mail-pj1-f65.google.com with SMTP id kx11so3236110pjb.4; Sun, 12 Jan 2020 11:54:15 -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=pYiyrxSsqumcvpzwZTQHLIKdGxUGHFSQS+ACeQLRkd4=; b=bsysWW+xSYtCy6JFgc4b/mT28AWSCu1Fly7PqqM89EZ+2n6SigyyY8UQZ2TN1I+nxf SXYC27/QCOdyWXtYSTMKX8eIS//8LJ67bGWbswIsNLT4pg/4Dy+pTmAG+tTONYDTMuF2 D+5CEVNsDH9K7fOLMHQZb73e5pENtrwXZU4MFmEiNCQTFN5QrR5Y2swaXUeYl5U6qstP l3BeHuH+y1abGA3hxlYraoehR1bRpCIqkwZ4hgDpUAVaOUKfRjrfOCdkWElzXr9dtvgx EGkA4gufgH1PVb5NvETFnRXVVWOZjPvP6peAUqWXJw8Fj0z6ioSaPT3LNOq0p7J0UFhJ LR2A== 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=pYiyrxSsqumcvpzwZTQHLIKdGxUGHFSQS+ACeQLRkd4=; b=t5fQFc1Yz1/BnTNbT1ydcFIwdsWP9M4rXohJRbmOPg7TSDivtrr2OFBaZNAzQMkboL T2T1XsjC0jmXUzkCicJ+IQQps9UZ6vFSlWJ/UPRR9NwtXWDD9VblXm+GsD7V7AQ4func AB8dadqoo6a4tl2OpFZIKiryCO0Bm+L0JsGqifd1AX8G6+GHbqpBfrm4h4u6BonOtWhl 1DQonuTYvef7iWpLz7+XnPFS/F8i3vXbK+veQKZ4fRLyZXSJb7ouL6A34cI24ZpFTGnq lwfXJt0tya1YXX5cFJie3mwJ+88Z6ngw3ekpEUnxYfn7+qEWZBpvlKFeLtcUWNiDmeTp dd0Q== X-Gm-Message-State: APjAAAUgxEYMrEpA58S5WCrlh1sjc7cVTCV5nC2aClmglKKpFyojFXrv REq8MkmeFK519In2huFewNM= X-Google-Smtp-Source: APXvYqyIfIaZyY/HMtFTotO+OF76VyqFC1eZb41+BkHfihd10BTHs7UaVYxIQFSzLafrZFeSghHMsw== X-Received: by 2002:a17:90a:36af:: with SMTP id t44mr18335650pjb.25.1578858855425; Sun, 12 Jan 2020 11:54:15 -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 f81sm11341209pfa.118.2020.01.12.11.54.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2020 11:54:14 -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 , Brian Masney , Douglas Anderson , Fabio Estevam , Thomas Gleixner , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 1/4] drm/msm: support firmware-name for zap fw (v2) Date: Sun, 12 Jan 2020 11:53:57 -0800 Message-Id: <20200112195405.1132288-2-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 Since zap firmware can be device specific, allow for a firmware-name property in the zap node to specify which firmware to load, similarly to the scheme used for dsp/wifi/etc. v2: only need a single error msg when we can't load from firmware-name specified path, and fix comment [Bjorn A.] Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 30 ++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index 112e8b8a261e..456bb5af1717 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -26,6 +26,7 @@ static int zap_shader_load_mdt(struct msm_gpu *gpu, const char *fwname, { struct device *dev = &gpu->pdev->dev; const struct firmware *fw; + const char *signed_fwname = NULL; struct device_node *np, *mem_np; struct resource r; phys_addr_t mem_phys; @@ -58,8 +59,31 @@ static int zap_shader_load_mdt(struct msm_gpu *gpu, const char *fwname, mem_phys = r.start; - /* Request the MDT file for the firmware */ - fw = adreno_request_fw(to_adreno_gpu(gpu), fwname); + /* + * Check for a firmware-name property. This is the new scheme + * to handle firmware that may be signed with device specific + * keys, allowing us to have a different zap fw path for different + * devices. + * + * If the firmware-name property is found, we bypass the + * adreno_request_fw() mechanism, because we don't need to handle + * the /lib/firmware/qcom/* vs /lib/firmware/* case. + * + * If the firmware-name property is not found, for backwards + * compatibility we fall back to the fwname from the gpulist + * table. + */ + of_property_read_string_index(np, "firmware-name", 0, &signed_fwname); + if (signed_fwname) { + fwname = signed_fwname; + ret = request_firmware_direct(&fw, fwname, gpu->dev->dev); + if (ret) + fw = ERR_PTR(ret); + } else { + /* Request the MDT file from the default location: */ + fw = adreno_request_fw(to_adreno_gpu(gpu), fwname); + } + if (IS_ERR(fw)) { DRM_DEV_ERROR(dev, "Unable to load %s\n", fwname); return PTR_ERR(fw); @@ -95,7 +119,7 @@ static int zap_shader_load_mdt(struct msm_gpu *gpu, const char *fwname, * not. But since we've already gotten through adreno_request_fw() * we know which of the two cases it is: */ - if (to_adreno_gpu(gpu)->fwloc == FW_LOCATION_LEGACY) { + if (signed_fwname || (to_adreno_gpu(gpu)->fwloc == FW_LOCATION_LEGACY)) { ret = qcom_mdt_load(dev, fw, fwname, pasid, mem_region, mem_phys, mem_size, NULL); } else { 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: 11329337 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E7E1392A for ; Sun, 12 Jan 2020 19:54:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C64002053B 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 Reviewed-by: Bjorn Andersson --- 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: 11329347 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DDB8F139A 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 BB4FE214AF 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" }; }; }; From patchwork Sun Jan 12 19:54:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 11329345 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B27AE109A 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 868072253D 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="GTq8olhq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387395AbgALTy2 (ORCPT ); Sun, 12 Jan 2020 14:54:28 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:42435 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387413AbgALTyX (ORCPT ); Sun, 12 Jan 2020 14:54:23 -0500 Received: by mail-pf1-f194.google.com with SMTP id 4so3815042pfz.9; Sun, 12 Jan 2020 11:54:23 -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=9M3dlkPvAA74ZA3Dz07VUPHZPdx7oFweuiEOAHoWN1M=; b=GTq8olhq3p+o5nwwODwkds2g5yTd6UB+6v/XDM8BPwRZeMADFiH8YZ1Ni44TcURnBj VvRlqpR+kB20Ux7C7kDIkqObcxLq4ib2T5CkIgL4wVHMOefExmqIdzW4vfevzhzNJ1HQ iw8CudWouK/PM5OBRvSOya7XbJRj/CUOgKshFFrvreQt0cUxiKDcK3CpRovxgDlZ37h7 hEsFT/1OTxgZsSZswWeTz9pBqI+wBig1Kt6JZQNjzO54UA9kUY0OchqgIZyJuqHCDJKc Cvm1jF3yy5DMjMDzQcqVodvcUqqjprYeoO/zsu3PBKe/o78N2NZYIrqnRYeyxN7TsfJb +ePQ== 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=9M3dlkPvAA74ZA3Dz07VUPHZPdx7oFweuiEOAHoWN1M=; b=DMnztNyvwGZ9aqie5YXFj3bydX0Sk8p0j/zQX10uU7xFzBEQU1LBtcSSyeOqf8guoE o1fG7nuvjki6VkHHW+3YIZUSD7ylmisk5ZuT6nI/A5dvozbL7zLR1VUEPxb7yC1Va3Ta yLedO6r7WV5jDOfnLUm8SFWQEX4YMrGnBBi9vPj0x2ithjqy13MSbr8QfXwVLQNZrtte NTfjRRJLAgYWt2Kxx1/vcN4L/AdHhlFcDMS8EmnwTSOaaNDhGosPEXqPluAycGUeqZ6g zyys2va1CQ+vv6URDxZSd49Tq9ihFlgO+gAC/46BTmUlWA80tmrqYxhBFCuv7ELjqXG9 bKfg== X-Gm-Message-State: APjAAAUl7YhwlYaNAOU6uL2kGW+tVGGmcCzPiOY+VVTAr/t8D7TjKRJv mrtK/hSjmRaYxlU+DfSDJ/s= X-Google-Smtp-Source: APXvYqxgtDha2wIIkYQ0s11XiURON/vwog3S3qZJcZWdKW6/HnjDdywO8lijSbdzd2JcnS/+b7qgug== X-Received: by 2002:a63:4a0e:: with SMTP id x14mr17052016pga.360.1578858862865; Sun, 12 Jan 2020 11:54:22 -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 n24sm11082138pff.12.2020.01.12.11.54.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2020 11:54:22 -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 , Andy Gross , 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 4/4] arm64: dts: sdm845: move gpu zap nodes to per-device dts Date: Sun, 12 Jan 2020 11:54:00 -0800 Message-Id: <20200112195405.1132288-5-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 We want to specify per-device firmware-name, so move the zap node into the .dts file for individual boards/devices. This lets us get rid of the /delete-node/ for cheza, which does not use zap. Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- v2: use 'sdm845' for subdir for devices that use test-key signed fw arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 1 - arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 7 +++++++ arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 7 +++++++ arch/arm64/boot/dts/qcom/sdm845.dtsi | 6 +----- arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 7 +++++++ 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi index 9a4ff57fc877..2db79c1ecdac 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi @@ -165,7 +165,6 @@ panel_in_edp: endpoint { /delete-node/ &venus_mem; /delete-node/ &cdsp_mem; /delete-node/ &cdsp_pas; -/delete-node/ &zap_shader; /delete-node/ &gpu_mem; /* Increase the size from 120 MB to 128 MB */ diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts index d100f46791a6..6cd9201ffbbd 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -352,6 +352,13 @@ &gcc { ; }; +&gpu { + zap-shader { + memory-region = <&gpu_mem>; + firmware-name = "qcom/sdm845/a630_zap.mbn"; + }; +}; + &pm8998_gpio { vol_up_pin_a: vol-up-active { pins = "gpio6"; diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts index c57548b7b250..09ad37b0dd71 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts @@ -360,6 +360,13 @@ &gcc { ; }; +&gpu { + zap-shader { + memory-region = <&gpu_mem>; + firmware-name = "qcom/sdm845/a630_zap.mbn"; + }; +}; + &i2c10 { status = "okay"; clock-frequency = <400000>; diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index ddb1f23c936f..601c57cc9b6d 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2804,7 +2804,7 @@ dsi1_phy: dsi-phy@ae96400 { }; }; - gpu@5000000 { + gpu: gpu@5000000 { compatible = "qcom,adreno-630.2", "qcom,adreno"; #stream-id-cells = <16>; @@ -2824,10 +2824,6 @@ gpu@5000000 { qcom,gmu = <&gmu>; - zap_shader: zap-shader { - memory-region = <&gpu_mem>; - }; - gpu_opp_table: opp-table { compatible = "operating-points-v2"; diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts index 13dc619687f3..b255be3a4a0a 100644 --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts @@ -245,6 +245,13 @@ &gcc { ; }; +&gpu { + zap-shader { + memory-region = <&gpu_mem>; + firmware-name = "qcom/LENOVO/81JL/qcdxkmsuc850.mbn"; + }; +}; + &i2c1 { status = "okay"; clock-frequency = <400000>;