From patchwork Tue Nov 1 22:33:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 996 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3248633wru; Tue, 1 Nov 2022 15:37:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5d3MXKDWhd5wao/G5+5d9Lxxmabs+9e+BKpfTYietyh8mOwU+8leAp0t8IePJ9GcjfB7mb X-Received: by 2002:a17:906:c291:b0:7ad:caae:449e with SMTP id r17-20020a170906c29100b007adcaae449emr13840031ejz.436.1667342236834; Tue, 01 Nov 2022 15:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667342236; cv=none; d=google.com; s=arc-20160816; b=E5KLuasm5ym8lsL4AqkowqaJpL2iw+VH1+A43tNBJuuLloWkVLpYKdDDk1QvscZYBS p7sxYPDtWdr+NGyOWz4YEotCao4bfDCOkz/SsPVFNvzCK++YH7n2CzjP7EDT6YLwL2R7 nx2tFHMP0bD7nOOLIHor8KfHsMRaj9UcoOK9Ie9lboNTiP7kvF4tMSNZzQ2VkARVhHuj z+uJLSMVTNyLwRS2WPBx84h57nzg8Uj5d2wKnRvXUdboSFV6zvabVB6piGwCyOV+sc9q q3Rj/hfnwRlCsGdVmTZKjpmHXiy/2s7a11Ec17gcw501Rr9L5NdTd+Hh5jOeLv2jwS+/ ZeZQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=jGENntLfOCR8ozrjU0gP3ahdz7LS9qRpY/T4IjONjfE=; b=AAnt7yJvw+S0rCESD+Bkg9zsKmbMbdBatNnZw1nh/LfFBT7Ahv2GHcumXs1Ord0wC/ T4nvIxXMX6Nb0HSjswemhsCSEYyx2fWBUJVBNDk8DJ+Z3ucY4j73qcwgO90FgYbCKue1 ikRB3/4qO3xTnUtBRXdkvgete0Pw5rCwZL6TmAIT2VN++R6KzTTfszrWmMjFiLM/0pGX Y78f8DIAKB/FqMr23CJOcY+LEQ50g+sBOx6hACvT0qZ/l8h4EkzE4oLQSBHC9mtG+H6y RHGuXHi9YfPRXeasGbXICZmSixr5UI1BULwEY2c48uYLbQG/G2zqfjCDrAq43bfzIHVe bXQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ePNbBYmM; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020aa7cb48000000b00462a87b0546si2314966edt.607.2022.11.01.15.36.53; Tue, 01 Nov 2022 15:37:16 -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=@gmail.com header.s=20210112 header.b=ePNbBYmM; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231341AbiKAWeg (ORCPT + 99 others); Tue, 1 Nov 2022 18:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231329AbiKAWdq (ORCPT ); Tue, 1 Nov 2022 18:33:46 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C338EEBE; Tue, 1 Nov 2022 15:33:45 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id v17so11870105plo.1; Tue, 01 Nov 2022 15:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jGENntLfOCR8ozrjU0gP3ahdz7LS9qRpY/T4IjONjfE=; b=ePNbBYmMrBWf14035Ml6F9See1fo11rsu5nojA/frdjk6+kB6ylOkz0WOOtInV2YUw k8uE+nlZiPdngARdYCJel4lYD1k+mFF16JBtSIQVlx4ueuc9jPQ32mrSme0y5RRIAxod MiZF7abfG/tVvGmF/f338+N2d2SQvzMqQsOtLT6bAAh9v4qcDeOrI5nHi4RkFEGcnWKz cf0KCti865++nvT9QL0QhYqqUQttK8NWlxZt0PRJC/ojNhtqDzjxIgR57Q4C+uSGJ4HE Z/Di7T9DiUE/eVPhAiyZ/rzyTvj7RlWXaXA06Lpsa3Ko91F2mXRuVPUD3ux/O7VKooUi VOBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=jGENntLfOCR8ozrjU0gP3ahdz7LS9qRpY/T4IjONjfE=; b=FYayfl4qZ7u/q6V+GPf3aUpFhVmQIXZE7kKYBxaHhjTQGflQ82isEroCsU+sDqkH+C NpJAtMTnrqn2TJPNdWQXv55nNuZsJqu52tAIwzU4a+vkkFW65d2EfbZ3GjC3NgcYd9l2 Pz2OKWm3FM8sP95QmP4SR+GHFYFQA8tHKe9B4UacWMqHrI9SiKRXA480rMA9C6rF0+c6 85a8h8d7UpRlPpKZ3Pw5Yk2Oq6ExSsYvI62Ut4LBuNFobpdvRFkCL7G8MAxmudo2e5Vo LehItGA8HVPKL+ZMMV/ViYDTJ0VcXoYpq0JvIE6r7ft6gpGk32k/xWRaN1J5C4cRo/Jg RJ4g== X-Gm-Message-State: ACrzQf16juoVJZ4S471QHSLDqKOedzUCkY4hUnqc0eESpBUebwEjOeL3 gOzajz6qPpxgFWLN45mnmvk= X-Received: by 2002:a17:902:e8c4:b0:186:6d63:7e with SMTP id v4-20020a170902e8c400b001866d63007emr22106758plg.122.1667342025099; Tue, 01 Nov 2022 15:33:45 -0700 (PDT) Received: from localhost ([2a00:79e1:abd:4a00:2703:3c72:eb1a:cffd]) by smtp.gmail.com with ESMTPSA id j4-20020a170902c3c400b001754064ac31sm6821074plj.280.2022.11.01.15.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 15:33:44 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Rob Clark , Akhil P Oommen , Chia-I Wu , Dmitry Baryshkov , Douglas Anderson , Konrad Dybcio , linux-kernel@vger.kernel.org (open list), Sean Paul , Vladimir Lypak Subject: [PATCH v2 0/2] drm/msm: Improved hang detection Date: Tue, 1 Nov 2022 15:33:08 -0700 Message-Id: <20221101223319.165493-1-robdclark@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748335053231620356?= X-GMAIL-MSGID: =?utf-8?q?1748335053231620356?= From: Rob Clark Try to detect when submit jobs are making forward progress and give them a bit more time. Rob Clark (2): drm/msm/adreno: Simplify read64/write64 helpers drm/msm: Hangcheck progress detection drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 3 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 43 +++++++++------ drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 4 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 58 +++++++++++++++------ drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 3 +- drivers/gpu/drm/msm/msm_drv.h | 8 ++- drivers/gpu/drm/msm/msm_gpu.c | 20 ++++++- drivers/gpu/drm/msm/msm_gpu.h | 17 +++--- drivers/gpu/drm/msm/msm_ringbuffer.h | 24 +++++++++ 9 files changed, 131 insertions(+), 49 deletions(-)