Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp523222ioo; Thu, 26 May 2022 08:37:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfj7VuJwfAUTzXLm2f/fshm9VSGYNKnhr5IVr7xFRjq/29W9xn1f9UidsTNjS7HQkA2wRn X-Received: by 2002:a17:902:8644:b0:15a:3b4a:538a with SMTP id y4-20020a170902864400b0015a3b4a538amr38586030plt.146.1653579458982; Thu, 26 May 2022 08:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653579458; cv=none; d=google.com; s=arc-20160816; b=Mjf1a1sxumbEOZqMEfFpstfWF7BU9ZGM90TjeTswmp2pr1HArU6ili2rffXlPIzihr a8QIAd84CIXF4T0FxRTF/o//ZDyiFvcwt2MgcDh/MC8UyORpRa8xPufREwkBT2G6PvZW tuY3Lj06ATxevuulUzpExusj5Qg0bmTZLQeWbiFisUY4foeII8GZCQPWjI3IOfA9B0Dk sUHdf6JwsxZNX6iEfsPDbesZtezPA5DmMsHc7vbyh2Ny0yc47V9qSV1CZWZgxgyUA/JW iQyrZO7gFR3BsM0LsNEtoOlpS/8ht4WP4CdzW85AyQeMoTxnmI1tlqGg1lDJ4LqLXd6M j4zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2l1lE4/qK7KzzEk+opwRL/3MITqFdxUUQbgy/JqTQ+U=; b=I57pyzz8LuFXWlktrNB4gtj47EArYOsNuopzHKjHvQ1nJAo3S17w2ytW0HV4gy4s17 IZKA0SdynpAS4nsE0Ajsvovc6r/AxFIaQq2vg/o9eYs1gy2ZkmeZqSG5lcMOWxOpVCXt VdZb78LSEYrMrKBz6uTU1xCjQk3duu7eiRoVkuOU6ynvI2svvYHpsmpiem2hquYLUJ8b Ubl/UfYbVaVJU7ljpIE6v5QYnNGUyx3TRwUkD2kAmz77bDQUZSnpjWe0hzy9V+WmJ04K rNiKZVXQjJ4bibiH7UQcqQEjbEpoFVBAHoqlkSBTzC1MWJNrIt8gwWiKLMIKmAGM3UQ4 eG1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=O+8jb27A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oa16-20020a17090b1bd000b001dc1a41038fsi2778989pjb.88.2022.05.26.08.37.24; Thu, 26 May 2022 08:37:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=O+8jb27A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244991AbiEYO6d (ORCPT + 99 others); Wed, 25 May 2022 10:58:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244909AbiEYO6S (ORCPT ); Wed, 25 May 2022 10:58:18 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6416AEE34 for ; Wed, 25 May 2022 07:58:17 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: alyssa) with ESMTPSA id 94FAC1F450F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1653490696; bh=CcULeZxjY87ecxTA0HcUOCLHUV0rECEmqTrVAi386iI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O+8jb27A4B7maymABi5fpZFg6lIo5ElWSABs76c1Rpiu7SdK081CjQ8LLBXWiCdLk JMxh/+PXaQVaQZKA96R4ax6mQEifXfCP5wFVK0eVltFBkzkPhQp/iCBq9DjOLB+wTK ZC9bw8AzYkWK6Ti8ESxc86i8Jbl7haDYRjGHGOXXcE+qlt+GFIdK3VOzN9XnJ6jb05 twSkGZScijfVsNQh7Xy6cPUaa35HkUuhNkBjA8NobLfSkdehftBkuBBsKr9N2v9ej4 6MJFghYWq3Vv4+qhr+Y8YDadLKTmjgadj5xhK+ywt8MS/aSvD2RJe7POYGjxHc3JWH D/UzhOQuU34UA== From: Alyssa Rosenzweig To: dri-devel@lists.freedesktop.org Cc: Rob Herring , Tomeu Vizoso , Steven Price , Alyssa Rosenzweig , David Airlie , Daniel Vetter , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , AngeloGioacchino Del Regno , linux-kernel@vger.kernel.org Subject: [PATCH v2 4/9] drm/panfrost: Handle HW_ISSUE_TTRX_3076 Date: Wed, 25 May 2022 10:57:49 -0400 Message-Id: <20220525145754.25866-5-alyssa.rosenzweig@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220525145754.25866-1-alyssa.rosenzweig@collabora.com> References: <20220525145754.25866-1-alyssa.rosenzweig@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some Valhall GPUs require resets when encountering bus faults due to occlusion query writes. Add the issue bit for this and handle it. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_device.c | 9 +++++++-- drivers/gpu/drm/panfrost/panfrost_issues.h | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c index 7f51a4682ccb..ee612303f076 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.c +++ b/drivers/gpu/drm/panfrost/panfrost_device.c @@ -11,6 +11,7 @@ #include "panfrost_device.h" #include "panfrost_devfreq.h" #include "panfrost_features.h" +#include "panfrost_issues.h" #include "panfrost_gpu.h" #include "panfrost_job.h" #include "panfrost_mmu.h" @@ -380,9 +381,13 @@ const char *panfrost_exception_name(u32 exception_code) bool panfrost_exception_needs_reset(const struct panfrost_device *pfdev, u32 exception_code) { - /* Right now, none of the GPU we support need a reset, but this - * might change. + /* If an occlusion query write causes a bus fault on affected GPUs, + * future fragment jobs may hang. Reset to workaround. */ + if (exception_code == DRM_PANFROST_EXCEPTION_JOB_BUS_FAULT) + return panfrost_has_hw_issue(pfdev, HW_ISSUE_TTRX_3076); + + /* No other GPUs we support need a reset */ return false; } diff --git a/drivers/gpu/drm/panfrost/panfrost_issues.h b/drivers/gpu/drm/panfrost/panfrost_issues.h index 14670ee58ace..e35807e4b743 100644 --- a/drivers/gpu/drm/panfrost/panfrost_issues.h +++ b/drivers/gpu/drm/panfrost/panfrost_issues.h @@ -128,6 +128,10 @@ enum panfrost_hw_issue { /* Must set SC_VAR_ALGORITHM */ HW_ISSUE_TTRX_2968_TTRX_3162, + /* Bus fault from occlusion query write may cause future fragment jobs + * to hang */ + HW_ISSUE_TTRX_3076, + HW_ISSUE_END }; -- 2.35.1