Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2052384pxa; Mon, 24 Aug 2020 03:53:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv/NtLolGpu/e/mg3iv6oQcVAncNXQs5t+8dBo/owrXKV+d+7enbdA5G9o9TK14yKx5dKa X-Received: by 2002:a17:906:4356:: with SMTP id z22mr5142177ejm.414.1598266410647; Mon, 24 Aug 2020 03:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598266410; cv=none; d=google.com; s=arc-20160816; b=yPgk/8nvbwhLnw4rROs5a1FdewFms4rhB5PKMrvx3ijgXYT8Uvm4q+KJ5vA0EZPZN9 4pBDR/bPmut1Uf8qZBfThkMWeKF4VeWRwXmkXaQMfMyyN5j8VvXN4hcR9N/+/KrJsKFK 1sjR8Q244Q8pPnue0rZGPB1nOrtakae5q1k82+rnuEjwcV8zTSbhxx2uE9O0a8p1kngr yj5y5M9li7pdyRtFqkdSaiF/5lLKaMd6zgTmcC5EmbZm2El/Rvs0vb+W7LL1d1p6WVj+ 0ycA8JEZ4vaz2NY7YxXBb1tOaLGikMqaSz00doiKCZq+WkUK5vNNViPEgGcbOUYZb0Pt LofQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=kYgKgMRWvtkDUBfO4g70EHNM4aJwPgV7BoDhE5GjkyY=; b=mvetqXM0SNqAby/y4L+DTfrZQCOQn2FvbwnCBLzyUJQN1GtEo4g1QSd0T0wHhbm3zH 35gwhGfF6P5PYJ/YI2/rCOA7dxe+2Hw8e+KlDjHDOjILazGgnpVviYhgYJf83hfIzGQf ahetQjL3ho1pFMuiTs4uvD1yIupLE9pk2gNgH9eX1tR5PMKNbmDSKezovG1rRNsFtihl 1p5vUK0ZsxbCUkiMu3oDDBy0qo/zNdZwe/NMvbVD1sclsfPxOAAP89A4SqsX7MNLoFMG 4poSDA4jATiv+jewSf5lOf6LZ1lSLL0+OgWmXAOVRViGey7b4X+UFwszC3HiSievP3lf fp4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si6302384ejx.745.2020.08.24.03.53.07; Mon, 24 Aug 2020 03:53:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726995AbgHXKv7 (ORCPT + 99 others); Mon, 24 Aug 2020 06:51:59 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:56325 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725999AbgHXKv5 (ORCPT ); Mon, 24 Aug 2020 06:51:57 -0400 Received: from [2001:67c:670:201:5054:ff:fe8d:eefb] (helo=localhost) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAA4y-0007Go-OV; Mon, 24 Aug 2020 12:51:56 +0200 Message-ID: <588560659bdb00a99897eb1685d3b85e82d48164.camel@pengutronix.de> Subject: Re: [PATCH v2] drm/etnaviv: fix external abort seen on GC600 rev 0x19 From: Lucas Stach To: Christian Gmeiner , linux-kernel@vger.kernel.org Cc: josua.mayer@jm0.eu, stable@vger.kernel.org, Russell King , David Airlie , Daniel Vetter , etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Mon, 24 Aug 2020 12:51:15 +0200 In-Reply-To: <20200823190924.6437-1-christian.gmeiner@gmail.com> References: <20200823190924.6437-1-christian.gmeiner@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Sonntag, den 23.08.2020, 21:09 +0200 schrieb Christian Gmeiner: > It looks like that this GPU core triggers an abort when > reading VIVS_HI_CHIP_PRODUCT_ID and/or VIVS_HI_CHIP_ECO_ID. > > I looked at different versions of Vivante's kernel driver and did > not found anything about this issue or what feature flag can be > used. So go the simplest route and do not read these two registers > on the affected GPU core. > > Signed-off-by: Christian Gmeiner > Reported-by: Josua Mayer > Fixes: 815e45bbd4d3 ("drm/etnaviv: determine product, customer and eco id") > Cc: stable@vger.kernel.org > --- > Changelog: > > V2: > - use correct register for conditional reads. Thanks, I applied this patch to my etnaviv/fixes branch. Regards, Lucas > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > index d5a4cd85a0f6..c6404b8d067f 100644 > --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > @@ -337,9 +337,16 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu) > > gpu->identity.model = gpu_read(gpu, VIVS_HI_CHIP_MODEL); > gpu->identity.revision = gpu_read(gpu, VIVS_HI_CHIP_REV); > - gpu->identity.product_id = gpu_read(gpu, VIVS_HI_CHIP_PRODUCT_ID); > gpu->identity.customer_id = gpu_read(gpu, VIVS_HI_CHIP_CUSTOMER_ID); > - gpu->identity.eco_id = gpu_read(gpu, VIVS_HI_CHIP_ECO_ID); > + > + /* > + * Reading these two registers on GC600 rev 0x19 result in a > + * unhandled fault: external abort on non-linefetch > + */ > + if (!etnaviv_is_model_rev(gpu, GC600, 0x19)) { > + gpu->identity.product_id = gpu_read(gpu, VIVS_HI_CHIP_PRODUCT_ID); > + gpu->identity.eco_id = gpu_read(gpu, VIVS_HI_CHIP_ECO_ID); > + } > > /* > * !!!! HACK ALERT !!!!