Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp817835lfv; Tue, 12 Apr 2022 06:07:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQaW9vI6AFQBNpW+WzjrfBjmj10RROTVcfskpHAd1FOY7fuBz83RrykkQeriXhPFVr+fbm X-Received: by 2002:a17:90a:d0c5:b0:1c9:ec78:18e5 with SMTP id y5-20020a17090ad0c500b001c9ec7818e5mr4918349pjw.53.1649768866221; Tue, 12 Apr 2022 06:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649768866; cv=none; d=google.com; s=arc-20160816; b=Wsu4Muhd9YEhf5u634RIvxzK+GSb8sNQ49+y3IdgLUuMoMuBk+q4U1fYa1H4Vwrf52 AX5JK9JRIRhV3JnWI1XH+PPtsSFCkhpGg99qseG7GwzhCUM1Tfi0krLJWwnARkzcts7k 982hs24BBasnQ9+qqzqp16nHny5JQM7Axu2Nr33zXiz47kufMfQ/z0iL+66w7gyLkj8J hhTAVzdvUwuw8840bQ6FucjRFqbLRp6t070GmESTMR4yIe9v2jRxWtUoZCfZeZIQLWnW wxpYKscsXT0ZQAc4jLwLJCpWdDrbN7n9o0ZxZyoRzAX1ZYCuvVCV50ovvijh1Pt9os9g mUuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hKeAd9Mr0PigPXy0tzq3X1NpRqwxAItO7Z7TSKVnWIc=; b=W1/OfJh4etKjJOyAU26tyAwg5x82nOfFk+zdWqpBUQxx2ajKLiknoKo233eUM70pE8 ZkqNAkdgh3sN0hBKuWcfYBnH6ezzmdOuYUrrelYcCKonuQ4VmD2Yj08uyE7KkOznofCC IRFaKbVSTMIoYsYK12+qc4Afa/2UPWeQrdUhUTgzi2QsvuiD0vkXALlJIZtdU/WXDYEP Bbhds6H0WCatqO0iGs4XrgM62n9yPSwI6UUf6DB2O7kUxN6fU7FW7Qj7jnN6V4hmWNRO Y/izQzS8+/DYTcXJo8O8IgrD8Xa9ta4sVGSnqBGkJFTyOW9tzQXMU3nX3D03t8poCz9S iHvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=neGNALJM; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 205-20020a6307d6000000b0039d8040d8e7si2638559pgh.826.2022.04.12.06.07.09; Tue, 12 Apr 2022 06:07:46 -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=neGNALJM; 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 S1349169AbiDKShG (ORCPT + 99 others); Mon, 11 Apr 2022 14:37:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231510AbiDKShE (ORCPT ); Mon, 11 Apr 2022 14:37:04 -0400 Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 031E915A07 for ; Mon, 11 Apr 2022 11:34:49 -0700 (PDT) Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-d6e29fb3d7so18211044fac.7 for ; Mon, 11 Apr 2022 11:34:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hKeAd9Mr0PigPXy0tzq3X1NpRqwxAItO7Z7TSKVnWIc=; b=neGNALJM8WTGbSOrE8u2cIBizinV/y8dw4/rzahCKVrxSS391UlvO10RAV489aL7VK +uaSATzf7rrAsblSH4qwFnmrQqxkMCpRjydaezPKjV+kjViHWLhEKXQ14A+0FJ+rvfl3 OJFn6IFRxFKP/nPDaBU/ouZXVDAKUx5Lv1/+q2aU2lA6EfOrBjvI13YW2sofZ/V1qYmv JBXkSd6n78ECU7T4m9W32gURxcsNdseoR5gPqtkX04eT0MNSWwMBGS72lImUGqzdSJ3l BtP+zbdI49z2A+Z+ZZYlUWrCYTRL/krBOT3yBb2SzP5DnPyuQW0RVLRk3fa83WCmbbVm LWVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hKeAd9Mr0PigPXy0tzq3X1NpRqwxAItO7Z7TSKVnWIc=; b=ucKDlsQlG3FjQ1Vs3L+y/T5QMOBd2eYpu/SZ07XAaAY3Iv33oPzCuaVNgzLRf4vmXT xkJi4eBRzoH2ie4HLCKbvFTClnEsmDE+et0JVszlEtFbj6nBCHPGa86S0XBKK5lU7kxc vW2zP3gdL+LshOI9wQ2G/2EN23u+C1JUC2FsTG9B6793FgDGUmWO7hF/21VkOc1MP1In B81YthOjKVOxr7kzDy7aIy1zV06+iJT8S/FnjJ0iVMa04G12UfZVbKNeYS5Ic+4F+GSz SA9I6f8Qb0L7v59EKhrcbsVAicpWclCC4Qpzb7iSOhs6vwd3sq5ZNM+P5v4kU4Z7JN6L wl8A== X-Gm-Message-State: AOAM531BGMlR3D/P3gbchzKaIaUE6hIvPNs7VbGCDrqF89QFfIyxCSoW uF/Fs4bW+3K5fmkZgYobyInGxMyY9ZpqiTI6cJI= X-Received: by 2002:a05:6870:311d:b0:de:9b6c:362b with SMTP id v29-20020a056870311d00b000de9b6c362bmr299181oaa.200.1649702088390; Mon, 11 Apr 2022 11:34:48 -0700 (PDT) MIME-Version: 1.0 References: <20220403132322.51c90903@darkstar.example.org> <20220404213940.09a56d15@darkstar.example.org> <20220409182831.185e5d92@darkstar.example.org> In-Reply-To: <20220409182831.185e5d92@darkstar.example.org> From: Alex Deucher Date: Mon, 11 Apr 2022 14:34:37 -0400 Message-ID: Subject: Re: AMDGPU: regression on 5.17.1 To: Michele Ballabio Cc: LKML , regressions@lists.linux.dev, Maling list - DRI developers , amd-gfx list Content-Type: multipart/mixed; boundary="000000000000f6e26505dc653287" 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,T_SCC_BODY_TEXT_LINE 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 --000000000000f6e26505dc653287 Content-Type: text/plain; charset="UTF-8" On Sat, Apr 9, 2022 at 12:28 PM Michele Ballabio wrote: > > On Tue, 5 Apr 2022 10:23:16 -0400 > Alex Deucher wrote: > > > On Mon, Apr 4, 2022 at 3:39 PM Michele Ballabio > > wrote: > > > > > > On Mon, 4 Apr 2022 13:03:41 -0400 > > > Alex Deucher wrote: > > > > > > > On Sun, Apr 3, 2022 at 10:19 AM Michele Ballabio > > > > wrote: > > > > > > > > > > Hi, > > > > > I've hit a regression on 5.17.1 (haven't tested 5.17.0, > > > > > but 5.16-stable didn't have this problem). > > > > > > > > > > The machine is a Ryzen 5 1600 with AMD graphics (RX 560). > > > > > > > > > > The regression I hit seems to trigger when the machine is left > > > > > idle at boot (I don't boot straight to X, I boot to a tty, login > > > > > and then start X). The machine after a while blanks the screen. > > > > > Usually, the screen unblanks as the keyboard is hit or the mouse > > > > > moves, but with kernel 5.17.1 the screen does not wake up. The > > > > > machine seems to run mostly fine: I can login from ssh, but I > > > > > cannot reboot or halt it: a sysrq sequence is needed for that. > > > > > Note that if the screen goes blank under X, it wakes up fine. > > > > > > > > > > Below a dmesg and two traces from syslog (they're quite > > > > > similar). > > > > > > > > Can you bisect? Does setting amdgpu.runpm=0 help? > > > > > > I can try to bisect, should I narrow the search to drivers/gpu/drm/ > > > ? > > > > I would just do a full bisect if possible in case the change happens > > to be outside of drm. > > > > > > > > Setting amdgpu.runpm=0 works, the display now unblanks without > > > problems. > > > > Hi, > I bisected this, and the first bad commit is > [087451f372bf76d971184caa258807b7c35aac8f] drm/amdgpu: use generic fb > helpers instead of setting up AMD own's. > > Let me know if you need some more testing. Thanks. Do the attached patches fix the issue? Thanks, Alex --000000000000f6e26505dc653287 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-drm-amdgpu-don-t-runtime-suspend-if-there-are-displa.patch" Content-Disposition: attachment; filename="0001-drm-amdgpu-don-t-runtime-suspend-if-there-are-displa.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l1v20q2o1 RnJvbSBiZTVjMjY4MGVkNGIzYjQxMjFhZjRmNjkyYzkwNWQ4OGQ3YjZjYzAwIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGV4IERldWNoZXIgPGFsZXhhbmRlci5kZXVjaGVyQGFtZC5j b20+CkRhdGU6IFR1ZSwgMjggRGVjIDIwMjEgMTc6MjY6MjQgLTA1MDAKU3ViamVjdDogW1BBVENI IDEvMl0gZHJtL2FtZGdwdTogZG9uJ3QgcnVudGltZSBzdXNwZW5kIGlmIHRoZXJlIGFyZSBkaXNw bGF5cwogYXR0YWNoZWQKCldlIG5vcm1hbGx5IHJ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GF0dXNfY29ubmVjdGVkKSB7CisJCQlyZXQgPSAtRUJV U1k7CisJCQlicmVhazsKKwkJfQorCX0KKwlkcm1fY29ubmVjdG9yX2xpc3RfaXRlcl9lbmQoJml0 ZXIpOworCW11dGV4X3VubG9jaygmZHJtX2Rldi0+bW9kZV9jb25maWcubXV0ZXgpOworCiAJaWYg KGFtZGdwdV9kZXZpY2VfaGFzX2RjX3N1cHBvcnQoYWRldikpIHsKIAkJc3RydWN0IGRybV9jcnRj ICpjcnRjOwogCkBAIC0yNTI3LDExICsyNTQ1LDcgQEAgc3RhdGljIGludCBhbWRncHVfcG1vcHNf cnVudGltZV9pZGxlKHN0cnVjdCBkZXZpY2UgKmRldikKIAkJCWlmIChyZXQgPCAwKQogCQkJCWJy ZWFrOwogCQl9Ci0KIAl9IGVsc2UgewotCQlzdHJ1Y3QgZHJtX2Nvbm5lY3RvciAqbGlzdF9jb25u ZWN0b3I7Ci0JCXN0cnVjdCBkcm1fY29ubmVjdG9yX2xpc3RfaXRlciBpdGVyOwotCiAJCW11dGV4 X2xvY2soJmRybV9kZXYtPm1vZGVfY29uZmlnLm11dGV4KTsKIAkJZHJtX21vZGVzZXRfbG9jaygm ZHJtX2Rldi0+bW9kZV9jb25maWcuY29ubmVjdGlvbl9tdXRleCwgTlVMTCk7CiAKLS0gCjIuMzUu MQoK --000000000000f6e26505dc653287 Content-Type: text/x-patch; charset="US-ASCII"; name="0002-drm-amdgpu-only-check-display-if-the-GPU-has-them-in.patch" Content-Disposition: attachment; filename="0002-drm-amdgpu-only-check-display-if-the-GPU-has-them-in.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l1v20q220 RnJvbSA0OTgzMTFhZGM4Y2UwNzQ2YzBjODcxMDk2MWU4ZjZkYmM5Nzc0MjYyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGV4IERldWNoZXIgPGFsZXhhbmRlci5kZXVjaGVyQGFtZC5j b20+CkRhdGU6IFR1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