Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp867471rdb; Tue, 23 Jan 2024 19:00:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1Rc5IZkPMjiJLnH0w6l54sbkh+8tpKstHH3ptaGtsArgNAY1UFaUf2rrwPo647pnruPej X-Received: by 2002:a05:620a:1d83:b0:781:990e:4a79 with SMTP id pj3-20020a05620a1d8300b00781990e4a79mr8204040qkn.134.1706065244394; Tue, 23 Jan 2024 19:00:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706065244; cv=pass; d=google.com; s=arc-20160816; b=yz+Ld1Tp+dcXzqx3JeWcEOlPhMbjAoMR9JLfoFrNwv0t7DS7pR62IKa6jpOcIz5TB6 1YUVjrwFAY1LU67EQbnRU5IYnLFgaIYA4ZiLL8vpp2FsMME7+xrS898qlCl5vy/R0lR6 k+7GVXcDKVkhtfNYuH3Cm8v1mNdQr3UsoA1OwSLfQ5CS1nznVCrroVOOxkCH4S6h9mwI iZmWy2E+quFyLH+mr1YJscBWwsfzS+V+LfPrwjQde0YbKbEEStQcdhrV/mTXDJpSVAyP gr/JrAtKbgotdvALtNyiC3BcxPdi3mjUsXsFUHFbRro5fbXFGUs1vcwPSKzlU5jTusvV ZGCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=C1360rsVcUfkyEFKvnwoRZUEjTgSXHZgyaxAgVpcjy0=; fh=ZATWbw1ckX/b/NMeD3w5zBmTW7Tllx597BFkkpq0f/4=; b=y2ZRPzZv6CUGpqsOvr/9m8T6W208mp0Asu6x4rZiComr/je5K1RxMicjl5nuMIWqeq yLgbzCOvQLp4uary6MNiPcuiWQP6d3PR89h/jGnR4SSuG0S9pMYSPtbGkGLuR7dbKdo3 I1ElQaO8ZluaW+D2P0rEA+dz1OlTJdk1Z+YBl5adFnzD8w2zyySuc9yxyNbCzuP31hsV gSxKhp5KUxoELk0+8S+6FZ9ZpHOVXScxIvtZsXKtAOWxIJLWwsqVFfnTjWGUvwUwSShS UncDYBUXKY3ZmFe1rKCEusUOL6PrQoqEcvpgYkxJuWNV0b2YnT95I96c05QLIpM4r3Tt RNvQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZSot2sfZ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-36369-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36369-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a9-20020a05620a102900b00783909d4c13si9130203qkk.114.2024.01.23.19.00.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 19:00:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36369-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZSot2sfZ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-36369-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36369-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4ADC91C2384A for ; Wed, 24 Jan 2024 03:00:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C45755253; Wed, 24 Jan 2024 03:00:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZSot2sfZ" Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B32B5244 for ; Wed, 24 Jan 2024 03:00:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706065212; cv=none; b=SWftObUa7ZRiQy16wyaRfLnWFI2bVoSr20K0bKD9fmHQNIU9cWNC0lduq2YgYttqs3y+0V4E1NqVEIeohkDdUz+uw3FoMiJ3sh6pVSHsMdqX85Ok3xDqa0XAIQTGHk3noDIv4XT6RtLVXk9UThufeowzDKaxAVoumkrV7CsSvQ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706065212; c=relaxed/simple; bh=0DGzwexjLclMIj2G+51Iqdi2yzqVqG67+wo+Tos3BnQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=gzvq5oAwrmkXbyR9xc9qS5oRIoQm8MMkqlk/cU7UBCAGWei29tALC4xp1kCgCg3Ar2QW/DyfNCI0guYj3iZXOh/gpxIGn+ESmZnMVoUPpb/54lhewSbyrHRH4AjwBcyWIPr8UjDyjxM3sAKSw6/nDAiMr6Npt9mUM9Q9i7A/+10= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZSot2sfZ; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-337d90030bfso4362984f8f.2 for ; Tue, 23 Jan 2024 19:00:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706065208; x=1706670008; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=C1360rsVcUfkyEFKvnwoRZUEjTgSXHZgyaxAgVpcjy0=; b=ZSot2sfZpY5GhcEETJzg9zh3WDBofy3CPBnFgLV0lKYea+DsNtja5SRiAOJtL5+FwQ BerBo+TDuh8Svi3vQfLR4D7DeAHeHheyBz9DyJozPEuGku926a8JL1UvZyHyRV103aHC GYU3zh/vhbrxYNx9UWhcitiAIzRqNln1sXqntUN2ioxd0FcUZ7J6nlH3G31NobufcOtl fGWmWOtptlnJFurBaxRU2FeqFE2uP/X/TRJ7XckVBH7lOOW0Fl/8Hq+E4lZPI51g3Nqo WnQtql2qd6197UP0FV3UIQ0Zx5eTOygcxU7fBs61Hj1r++V7qsBgn/GA5s0hE+f5Dlm+ KHoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706065208; x=1706670008; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=C1360rsVcUfkyEFKvnwoRZUEjTgSXHZgyaxAgVpcjy0=; b=TGW1I6x0PDf5Y48iz2/n1YogdVjnKqutlz2ZGNU+IyZwNY18W8mBE/u3VN/LqaXbvv unvwvB+tEdQEhXKbaYT2w6nFoOhe5gt8dJVBr2T3aVkhxhO7Bk+UaAQyo7dkzDinNJ7i Z9jXs9vCwE7IDfSHfsfjSjvBlWycvFw5aK13UZCafr5podsn2+zyeEjCN77orOuF+7YJ xroakIm6DHnqKyyqXbPNUo/fgYAk2pCFfg+/lLq2XWK6Nzvn2cOg64kdT89auot7zKCn STQI5cvkweyOxU0f4zbKl25X5mAk8QqiRuN1Knhv4EXhr3oAlWpz4FhQvuEpHvPoJRvP 8Oxg== X-Gm-Message-State: AOJu0Yytxjo3kziOVhEyRTQaJVRx0k+8uJRfdlH69Vv7wkHMmdjOokE4 k2sJNzLu2aiBf7Ib+yRW+zNgCkGD+ZgD/EUWVUA7znZLkLYqNKVP X-Received: by 2002:a7b:c350:0:b0:40e:88b1:95be with SMTP id l16-20020a7bc350000000b0040e88b195bemr603402wmj.304.1706065208438; Tue, 23 Jan 2024 19:00:08 -0800 (PST) Received: from mosaic.enunes.eu (ip-78-45-66-209.bb.vodafone.cz. [78.45.66.209]) by smtp.gmail.com with ESMTPSA id dj17-20020a05640231b100b00559bb146ecbsm9637914edb.6.2024.01.23.19.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 19:00:07 -0800 (PST) From: Erico Nunes To: Qiang Yu , anarsoul@gmail.com, christian.koenig@amd.com, dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Sumit Semwal , linux-kernel@vger.kernel.org, Erico Nunes Subject: [PATCH v2 0/8] drm/lima: fixes and improvements to error recovery Date: Wed, 24 Jan 2024 03:59:39 +0100 Message-ID: <20240124025947.2110659-1-nunes.erico@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v1 reference: https://patchwork.kernel.org/project/dri-devel/cover/20240117031212.1104034-1-nunes.erico@gmail.com/ Changes v1 -> v2: - Dropped patch 1 which aimed to fix https://gitlab.freedesktop.org/mesa/mesa/-/issues/8415 . That will require more testing and an actual fix to the irq/timeout handler race. It can be solved separately so I am deferring it to a followup patch and keeping that issue open. - Added patches 2 and 4 to cover "reset time out" and bus stop bit to hard reset in gp as well. - Added handling of all processors in synchronize_irq in patch 5 to cover multiple pp. Dropped unnecessary duplicate fence in patch 5. - Added patch 7 in v2. After some discussion in patch 4 (v1), it seems to be reasonable to bump our timeout value so that we further decrease the chance of users actually hitting any of these timeouts by default. - Reworked patch 8 in v2. Since I broadened the work to not only focus in pp anymore, I also included the change to the other blocks as well. - Collected some reviews and acks in unmodified patches. Erico Nunes (8): drm/lima: reset async_reset on pp hard reset drm/lima: reset async_reset on gp hard reset drm/lima: set pp bus_stop bit before hard reset drm/lima: set gp bus_stop bit before hard reset drm/lima: handle spurious timeouts due to high irq latency drm/lima: remove guilty drm_sched context handling drm/lima: increase default job timeout to 10s drm/lima: standardize debug messages by ip name drivers/gpu/drm/lima/lima_ctx.c | 2 +- drivers/gpu/drm/lima/lima_ctx.h | 1 - drivers/gpu/drm/lima/lima_gp.c | 39 +++++++++++++++++++++------- drivers/gpu/drm/lima/lima_l2_cache.c | 6 +++-- drivers/gpu/drm/lima/lima_mmu.c | 18 ++++++------- drivers/gpu/drm/lima/lima_pmu.c | 3 ++- drivers/gpu/drm/lima/lima_pp.c | 37 ++++++++++++++++++++------ drivers/gpu/drm/lima/lima_sched.c | 38 ++++++++++++++++++++++----- drivers/gpu/drm/lima/lima_sched.h | 3 +-- 9 files changed, 107 insertions(+), 40 deletions(-) -- 2.43.0