From nobody Sun Dec 18 16:55:09 2022 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NZpqY15SNz1GQhV for ; Sun, 18 Dec 2022 16:55:21 +0000 (UTC) (envelope-from jgibbons@protogate.com) Received: from gateway.protogate.com (gw.protogate.com [104.51.32.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "jag6.cmr.protogate.com", Issuer "jag6.cmr.protogate.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NZpqX3P9rz4CmS; Sun, 18 Dec 2022 16:55:20 +0000 (UTC) (envelope-from jgibbons@protogate.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jgibbons@protogate.com designates 104.51.32.137 as permitted sender) smtp.mailfrom=jgibbons@protogate.com; dmarc=none Received-SPF: pass (gateway.protogate.com: domain of jgibbons@gateway.protogate.com designates 127.0.0.1 as permitted sender) receiver=gateway.protogate.com; client-ip=127.0.0.1; helo=gateway.protogate.com; envelope-from=jgibbons@gateway.protogate.com; x-software=spfmilter 2.001 http://www.acme.com/software/spfmilter/ with libspf2-1.2.10; Received: from gateway.protogate.com (localhost [127.0.0.1]) by gateway.protogate.com (8.16.1/8.16.1) with ESMTPS id 2BIGtCXl033549 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 18 Dec 2022 08:55:13 -0800 (PST) (envelope-from jgibbons@gateway.protogate.com) Received: (from jgibbons@localhost) by gateway.protogate.com (8.16.1/8.16.1/Submit) id 2BIGt9xt033547; Sun, 18 Dec 2022 08:55:09 -0800 (PST) (envelope-from jgibbons) Date: Sun, 18 Dec 2022 08:55:09 -0800 From: Jeff Gibbons To: freebsd-stable@freebsd.org Cc: manu@bidouilliste.com, unkadoug@gmail.com, dougm@freebsd.org, Jonathan Vasquez , jgibbons@protogate.com Subject: Re: stable/13 - amdgpu broken with n253286-d8a88ec38149 Message-ID: Mail-Followup-To: Jeff Gibbons , freebsd-stable@freebsd.org, manu@bidouilliste.com, unkadoug@gmail.com, dougm@freebsd.org, Jonathan Vasquez List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: clamav-milter 0.104.2 at gateway.protogate.com X-Virus-Status: Clean X-Spamd-Result: default: False [-2.30 / 15.00]; FAKE_REPLY(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+mx:c]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_MATCH_FROMTLD(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-stable@freebsd.org]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; ASN(0.00)[asn:7018, ipnet:104.48.0.0/12, country:US]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[protogate.com]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_CC(0.00)[bidouilliste.com,gmail.com,freebsd.org,xyinn.org,protogate.com] X-Rspamd-Queue-Id: 4NZpqX3P9rz4CmS X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N I see exactly the same thing Jonathan does, but in my case with i915kms.ko (which also comes from the /usr/ports/graphics/drm-510-kmod/ port, like his amdgpu.ko does). My video device is Intel's 'WhiskeyLake-U GT2 [UHD Graphics 620]'. This bug report may be related: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267421 After I upgraded my Lenovo Thinkpad T490s laptop with yesterday's /usr/src/, my laptop hung completely every time I tried to load /boot/modules/i915kms.ko, requiring a power-off/power-on. It hung when loading i915kms even after I rebuilt and reinstalled /usr/ports/graphics/drm-510-kmod/ . I tried many things, including rebuilding several different recent versions of /usr/ports/graphics/drm-510-kmod/, but nothing cured it. After seeing Jonathan's email to this list, I tried reverting my /usr/src/ to Friday before that commit date that he gave, and after rebuilding my system and then rebuilding/installing /usr/ports/graphics/drm-510-kmod/ again (drm-510-kmod-5.10.113_8), I can now kldload i915kms again without crashing, and everything works. It behaves as if something around the time of that commit that Jonathan pointed to: commit d8a88ec381498f5942403088d28ee325b92e9a78 (Date: Fri Dec 16 03:15:28 2022 -0600) is preventing FreeBSD from working with /usr/ports/graphics/drm-510-kmod/ Jeff -- Jeff Gibbons =46rom: Jonathan Vasquez Date: Sat, 17 Dec 2022 16:43:15 UTC I redid another clean install of latest stable/13 and latest ports for drm-= kmod / drm-510-kmod/ and gpu-firmware-amd-kmod FLAVOR=3Dsienna_cichlid and = the same thing arises. The system locks up immediately when loading the amd= gpu driver. current src commit: commit a3c07a933d5cb71a6d58cc9f0ecb5385a5e0ea29 (HEAD -> stable/13, origin/= stable/13) Author: Rick Macklem Date: Sun Nov 13 12:16:06 2022 -0800 rpcb_clnt.c: Do not force use of UDP current ports commit: commit 414eb4d80eb56f154435a5749ec08811bf192a83 (HEAD -> main, origin/main,= origin/HEAD) Author: Jan Beich Date: Sat Dec 17 16:14:16 2022 +0000 emulators/yuzu: requires C++20 after 7b88749b5e69 https://github.com/yuzu-emu/yuzu/commit/07632ad82508 root@leslie:/usr/src # pkg info drm-kmod drm-kmod-20220907_1 Name : drm-kmod Version : 20220907_1Installed on : Sat Dec 17 11:32:01 2022 EST root@leslie:/usr/src # pkg info drm-510-kmod drm-510-kmod-5.10.113_8 Name : drm-510-kmod Version : 5.10.113_8Installed on : Sat Dec 17 11:32:01 2022 EST Installing sienna_cichlid as usual gives the correct information: make install clean FLAVOR=3Dsienna_cichlid Installing gpu-firmware-amd-kmod-sienna-cichlid-20221207_1... =3D=3D=3D> Cleaning for gpu-firmware-amd-kmod-sienna-cichlid-20221207_1 Although using pkg info says verde, I think that info is wrong even though = sienna_cichlid is in fact being used (but that's probably a separate issue): gpu-firmware-amd-kmod-verde-20221207_1 Name : gpu-firmware-amd-kmod-verde Version : 20221207_1 Installed on : Sat Dec 17 09:39:52 2022 EST Origin : graphics/gpu-firmware-amd-kmod Architecture : FreeBSD:13:amd64 Prefix : /usr/local Categories : kld graphics Licenses : AMD Maintainer : x11@FreeBSD.org WWW : https://github.com/freebsd/drm-kmod-firmware Comment : Firmware modules for verde AMD GPUs Annotations : FreeBSD_version: 1301510 flavor : verde Jonathan Vasquez PGP: 34DA 858C 1447 509E C77A D49F FB85 90B7 C4CA 5279 Sent with ProtonMail Secure Email ------- Original Message ------- On Saturday, December 17th, 2022 at 08:52, Jonathan Vasquez = wrote: > Hey Emmanuel, > > What do you recommend then? As part of my testing yesterday (and what I d= escribed) was that I pulled down latest stable/13 and latest ports. Cleanly= recompiled world, kernel, and drm-510-kmod but the system freezes when loa= ding the amdgpu module. From my understanding drm-kmod is just meta port wh= ich will bring in drm-510-kmod so recompiling drm-kmod itself won't make s = difference if I already recompiled drm-510-kmod. > > Jonathan Vasquez > PGP: 34DA 858C 1447 509E C77A D49F FB85 90B7 C4CA 5279 > Sent with ProtonMail Secure Email > > Sent from Proton Mail mobile > > -------- Original Message -------- > On Dec 17, 2022, 03:51, Emmanuel Vadot < manu@bidouilliste.com> wrote: > >> Hello Jonathan, On Sat, 17 Dec 2022 02:42:42 +0000 Jonathan Vasquez wrot= e: > Oh, I think I understand a bit better what you meant. Yup, after I fou= nd which stable/13 commit was problematic, I compiled HEAD~1 which still wo= rks, then I recompiled drm-510-kmod and it's working now. But I still wante= d to report it since I'm guessing there will need to be some tweaks made to= drm-510-kmod so that it works again with the latest stable/13. There is no= tweaks to be done for drm-kmod. In fact in the last two days to commits wh= o broke KBI between 13.1 and stable/13 were taken care of (one I've reverte= d and the other one being the one Doug fixed). Yes it's a bit unfortunate f= or stable/13 users that we broke KBI a few times and that you needed to rec= ompile drm-kmod for it to work but what I want is when 13.2 is released use= rs don't have to recompile the ports and can safely upgrade their machines = (as the drm-510-kmod port will be compiled on 13.1 for 3 months). Cheers, >= Jonathan Vasquez > PGP: 34DA 858C 1447 509E C77A D49F FB85 90B7 C4CA 5279 = > Sent with ProtonMail Secure Email > > ------- Original Message ------- > = On Friday, December 16th, 2022 at 21:31, Jonathan Vasquez wrote: > > > Hey = Doug, > > > > Not a problem. I actually did clean rebuilds of everything, i= ncluding pulling the latest ports and cleanly reinstalling drm-510-kmod and= gpu-firmware-amd-kmod. But it still failed. > > > > Jonathan Vasquez > > P= GP: 34DA 858C 1447 509E C77A D49F FB85 90B7 C4CA 5279 > > Sent with ProtonM= ail Secure Email > > > > Sent from Proton Mail mobile > > > > -------- Orig= inal Message -------- > > On Dec 16, 2022, 21:05, Doug Moore < unkadoug@gma= il.com> wrote: > > > >> Short answer - try rebuilding kmod from scratch. > = >> > >> Long answer - I moved into stable/13 changes from main that changed= some binary-level representations. One who found that the kmod he built be= fore those changes no longer worked pointed out my error. So I made a chang= e to stable/13 recently to restore the original representations, and satisf= ied that person?s complaint. But, someone who built kmod recently will find= things broken, the way the original fellow did. I can only apologize and a= sk you to rebuild non-kernel stuff based on the stable/13 of more than a da= y ago. I hadn?t considered the impact of my changes on non-kernel code. > >= > Doug > >> > >> Sent from my iPad > >> > >>> On Dec 16, 2022, at 6:50 PM, = Jonathan Vasquez wrote: > >> > >>> ? > >>> Hey all, > >>> > >>> it seems th= at my AMD Radeon 6900 XT doesn't load the amdgpu properly anymore. The mach= ine will crash immediately upon load. After a bisect, I found the posted co= mmit. This card uses the sienna_cichlid? flavor for gpu-firmware-amd-kmod. = > >>> > >>> commit d8a88ec381498f5942403088d28ee325b92e9a78 > >>> Author: D= oug Moore > >>> Date: Fri Dec 16 03:15:28 2022 -0600 > >>> > >>> rb_tree: r= estore binary compat w/ 13 > >>> > >>> A change to RB_COLOR_INSERT, when me= rged into stable/13, broke binary > >>> compatibility. For 13, call the new= function RB_DO_COLOR_INSERT, and > >>> restore the old function with the o= riginal name and parameters. Define > >>> RB_COLOR_INSERT in tree.h, and re= move changes to the linux rbtree > >>> header. > >>> > >>> Another change a= ltered the order of pointers in the RB_ENTRY struct. > >>> For 13, restore = the original order. > >>> > >>> Reported by: manu > >>> Reviewed by: hselas= ky > >>> Tested by: manu > >>> Differential Revision: https://reviews.freeb= sd.org/D37716 > >>> > >>> sys/compat/linuxkpi/common/include/linux/rbtree.h= | 11 ++---- > >>> sys/sys/tree.h | 46 ++++++++++++++++------- > >>> > >>> = Jonathan Vasquez > >>> PGP: 34DA 858C 1447 509E C77A D49F FB85 90B7 C4CA 52= 79 > >>> Sent with ProtonMail Secure Email -- Emmanuel Vadot