From patchwork Fri Sep 13 05:50:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Gmeiner X-Patchwork-Id: 11143957 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 8236416C1 for ; Fri, 13 Sep 2019 05:51:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 693F920830 for ; Fri, 13 Sep 2019 05:51:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 693F920830 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 208266EE7A; Fri, 13 Sep 2019 05:51:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4DF3E6E96F; Fri, 13 Sep 2019 05:50:59 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id q14so30709147wrm.9; Thu, 12 Sep 2019 22:50:59 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=Phaw5vbTT2faE0N3gJYnU+Jk+6mkAT8/6QLIHkDqelw=; b=WZygozYOOHfKPV3WhhwdpkCoJ6eq6YhDzFApyjaBKTuqHpAhPuLW9AwznVkHq2V0St wmMuriNbu+7f7Kr4XUyC4Cc8/kAypS+7XVh8n38gEk2U7vZ9Saw8hVq3H3adlYhHMkEh PEcMsx5yidVwu9CEPL4Akd6Pm7VPk5bNsHTNN1YcyiQydaTxbjBaPexnKUhO8X2B0VNi YCrZJBtXmbDaUCuTXWpajKWkE5bzB7S5TWJHt96RuUzGcVKrSET0oL6xAYTENYE9x9w/ 41sObL84vy+Equ46NAvplVVaCGFM1kRimez7x89Ywo7kPXJXRhGc94tDq4H1ebuH/7gU awbA== X-Gm-Message-State: APjAAAU3aoxO3vtkqBnH3V6vqUF2YhR645Hjlg18C2sxD6xWlGBRWmja Iyaiq/UOMuhTOC6tnm0M55c= X-Google-Smtp-Source: APXvYqxD+ywAwmLzUEqqo3xtMGt3wUdwMno0tLYEvxObOX4qB9I3z8Lk53z/BkFdH6spnuGDE8Qo0A== X-Received: by 2002:a05:6000:11cb:: with SMTP id i11mr2611823wrx.171.1568353857634; Thu, 12 Sep 2019 22:50:57 -0700 (PDT) Received: from localhost.localdomain ([62.178.82.229]) by smtp.gmail.com with ESMTPSA id h125sm2429279wmf.31.2019.09.12.22.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2019 22:50:56 -0700 (PDT) From: Christian Gmeiner To: linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] drm/etnaviv: update hardware headers from rnndb Date: Fri, 13 Sep 2019 07:50:36 +0200 Message-Id: <20190913055052.25599-1-christian.gmeiner@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Phaw5vbTT2faE0N3gJYnU+Jk+6mkAT8/6QLIHkDqelw=; b=n1Junbl+PAAZAQDIPZK5uCYARN4Il+YCpwChpr2oNQQ/fP6+kYqUaUmkGkk70Y0tja Q5hx+8kvb7FdV3kaQYo4PdOCoywynD4zVtl24jnqxOVHta064PTIy1KZZvCuCWIRlwUi bwmJ0jVW10DKFf/IqA67ybeyPxW6EQYIPAv6ivjUDpecnj6EyRTfH8ufY+vcLQ2oijC/ Jzm9TJKV1lJe21DUh/wWh/gpOaYNePyjCtNBXWaORspnGSwCM7+Uigo4px77MrZ17ZNv n0Z+2il/JAMxWNZzJTwoUG5nHMBFD6kJW5xUgNdSYMEcZMhR5EdK/qyQpjXhe0gqSQhc pyHg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Russell King Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Update the state HI header from rnndb commit a04283591a8a (rnndb: update MMU exception causes). Changes in V2: - Only update state_hi.xml as suggested by Lucas Stach. Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/etnaviv/state_hi.xml.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/state_hi.xml.h b/drivers/gpu/drm/etnaviv/state_hi.xml.h index 41d8da2b6f4f..0f93dbbbaaeb 100644 --- a/drivers/gpu/drm/etnaviv/state_hi.xml.h +++ b/drivers/gpu/drm/etnaviv/state_hi.xml.h @@ -8,17 +8,17 @@ This file was generated by the rules-ng-ng headergen tool in this git repository git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: -- state.xml ( 26087 bytes, from 2017-12-18 16:51:59) -- common.xml ( 35468 bytes, from 2018-01-22 13:48:54) -- common_3d.xml ( 14615 bytes, from 2017-12-18 16:51:59) -- state_hi.xml ( 30232 bytes, from 2018-02-15 15:48:01) -- copyright.xml ( 1597 bytes, from 2016-12-08 16:37:56) -- state_2d.xml ( 51552 bytes, from 2016-12-08 16:37:56) -- state_3d.xml ( 79992 bytes, from 2017-12-18 16:51:59) -- state_blt.xml ( 13405 bytes, from 2017-12-18 16:51:59) -- state_vg.xml ( 5975 bytes, from 2016-12-08 16:37:56) - -Copyright (C) 2012-2018 by the following authors: +- state.xml ( 26666 bytes, from 2019-08-13 11:26:49) +- common.xml ( 35468 bytes, from 2018-02-10 13:09:26) +- common_3d.xml ( 14322 bytes, from 2019-08-20 20:31:50) +- state_hi.xml ( 30396 bytes, from 2019-08-20 20:34:03) +- copyright.xml ( 1597 bytes, from 2018-02-10 13:09:26) +- state_2d.xml ( 51552 bytes, from 2018-02-10 13:09:26) +- state_3d.xml ( 83505 bytes, from 2019-09-06 09:32:54) +- state_blt.xml ( 14252 bytes, from 2019-08-13 20:00:42) +- state_vg.xml ( 5975 bytes, from 2018-02-10 13:09:26) + +Copyright (C) 2012-2019 by the following authors: - Wladimir J. van der Laan - Christian Gmeiner - Lucas Stach @@ -48,6 +48,9 @@ DEALINGS IN THE SOFTWARE. #define MMU_EXCEPTION_SLAVE_NOT_PRESENT 0x00000001 #define MMU_EXCEPTION_PAGE_NOT_PRESENT 0x00000002 #define MMU_EXCEPTION_WRITE_VIOLATION 0x00000003 +#define MMU_EXCEPTION_OUT_OF_BOUND 0x00000004 +#define MMU_EXCEPTION_READ_SECURITY_VIOLATION 0x00000005 +#define MMU_EXCEPTION_WRITE_SECURITY_VIOLATION 0x00000006 #define VIVS_HI 0x00000000 #define VIVS_HI_CLOCK_CONTROL 0x00000000 From patchwork Fri Sep 13 05:50:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Gmeiner X-Patchwork-Id: 11143959 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 2AA4C76 for ; Fri, 13 Sep 2019 05:51:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 132A120830 for ; Fri, 13 Sep 2019 05:51:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 132A120830 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 206A06EE7E; Fri, 13 Sep 2019 05:51:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id 21D716E96F; Fri, 13 Sep 2019 05:51:21 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id g207so1281851wmg.5; Thu, 12 Sep 2019 22:51:21 -0700 (PDT) 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=jXC2JSeYDwfRzTDWTmvulHeraPlQ3lge32wRaYjTBZI=; b=VR7WnU3FT3B9Imkdj/cYpCiEbQ/Qh4anjpuxhDtA7NwZK+tUb8czvLWNzr92LBwR9p P6J/cJVElg61QYTROrITvz22Q8YwR9PtOU2x+useZv9LPJa003xfhNFBhc8RhnURDEQ/ K8ocSwWRQnM6zU70WDsEbeB9+YigswPKgqeSLfYktJcw4TZVTfsYAnouDoLmX47uLCAL jr44hCYIZQok0szs/rVxEGqCZZ+rHJmikfp/W6TTlZgGrB76KVwjEshS35oIREsTwGWN pPQhAN6xrwmWZ1O1dtb5zwiLl1hNkiXZgUaQ8t1kh60JLXNuPHVCwx1pUMgfHZwfLf0/ 1aYw== X-Gm-Message-State: APjAAAUtihKRUNnNUI3qanryMjmzumIpTaCItpU9yw6UhbkUpKWX9f51 VCS7Xz3RM7us/usYP9hVRLU= X-Google-Smtp-Source: APXvYqyPuytCs7qgPT8aDxXS0ADHQ+Ao/igSxMfV2CjGE2qnx7wAaeoyMX0W1A8Z/HLqtS4yG8snFA== X-Received: by 2002:a1c:f913:: with SMTP id x19mr1751035wmh.2.1568353879564; Thu, 12 Sep 2019 22:51:19 -0700 (PDT) Received: from localhost.localdomain ([62.178.82.229]) by smtp.gmail.com with ESMTPSA id h125sm2429279wmf.31.2019.09.12.22.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2019 22:51:18 -0700 (PDT) From: Christian Gmeiner To: linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] drm/etnaviv: print MMU exception cause Date: Fri, 13 Sep 2019 07:50:37 +0200 Message-Id: <20190913055052.25599-2-christian.gmeiner@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190913055052.25599-1-christian.gmeiner@gmail.com> References: <20190913055052.25599-1-christian.gmeiner@gmail.com> MIME-Version: 1.0 X-Mailman-Original-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=jXC2JSeYDwfRzTDWTmvulHeraPlQ3lge32wRaYjTBZI=; b=pAMsPgBcYtBzJAqYVIgj1LP8nysURYvTGbxAXtyPU4cqugH9uJT1fgMdCaKcf6wrcv JkT2w42BprXACBM/JShBo/c0CgiThyWdqM35FSKY5pUoEpxFqsTjEqqxLsggPrx4fkgV 0cx+8EMqqUL40BkxCgOKSDPAu0ErLvO/CR5IzsqotQVUSYMyVN27g+o/gHIhWvEvOozz YOfc3g8exQWaOLRnCrRgy8fVnQs/CesWfvBN+whWJzIzwlYvhrhyZn+hm2/DpMpo4A6/ axvvWeXlF8at7OsBUlDh11dX3igTLwuWDv64I5FlNg6Zdr4QdlymDHmuS5gVnueKq6zy gxFA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Russell King Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Might be useful when debugging MMU exceptions. Changes in V2: - Use a static array of string for error message as suggested by Lucas Stach. Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index d47d1a8e0219..b8cd85153fe0 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -1351,6 +1351,15 @@ static void sync_point_worker(struct work_struct *work) static void dump_mmu_fault(struct etnaviv_gpu *gpu) { + static const char *errors[] = { + "slave not present", + "page not present", + "write violation", + "out of bound", + "read security violation", + "write security violation", + }; + u32 status_reg, status; int i; @@ -1364,10 +1373,16 @@ static void dump_mmu_fault(struct etnaviv_gpu *gpu) for (i = 0; i < 4; i++) { u32 address_reg; + const char *error = "unknown state"; if (!(status & (VIVS_MMUv2_STATUS_EXCEPTION0__MASK << (i * 4)))) continue; + if (status < ARRAY_SIZE(errors)) + error = errors[status]; + + dev_err_ratelimited(gpu->dev, "MMU %d %s\n", i, error); + if (gpu->sec_mode == ETNA_SEC_NONE) address_reg = VIVS_MMUv2_EXCEPTION_ADDR(i); else