From nobody Mon Jan 31 12:05:12 2022 X-Original-To: freebsd-current@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 F204C1997459 for ; Mon, 31 Jan 2022 12:05:21 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mail.blih.net [212.83.155.74]) (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 "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JnRb46SBHz3qWD; Mon, 31 Jan 2022 12:05:20 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1643630712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cmgpIRKhzruTPnYYW4mRPUNmf4+FnjHCjdtRsUqmC8c=; b=gvw/YKm5RXnye0xGwPU5b8jHt5Pl5wy8a/dbtn/F9n286Rc8swb3p/nuhiI5rJ7tKqTt9t O7oo4WKZxSdRIPk0j/o6SNl+amSHnRpXj328TAdq27TQHdw1vsWICHnlmr8Cwv8bEcrGCq T0jbTeGFj1N/Yj/+jW7SC46TB5fqD8I= Received: from amy (lfbn-idf2-1-1209-14.w90-92.abo.wanadoo.fr [90.92.34.14]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 60024440 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 31 Jan 2022 12:05:12 +0000 (UTC) Date: Mon, 31 Jan 2022 13:05:12 +0100 From: Emmanuel Vadot To: Vladimir Kondratyev Cc: freebsd-current@freebsd.org Subject: Re: Kernel changes causing AMDGPU / DRM to fail? i2c related? Message-Id: <20220131130512.ebc9efe4877db832e657af01@bidouilliste.com> In-Reply-To: <41f0a849-f2c9-75fe-e0ed-e60356ac4728@FreeBSD.org> References: <4611d16a-ef17-d8f3-c2c0-1b1091723646@FreeBSD.org> <41f0a849-f2c9-75fe-e0ed-e60356ac4728@FreeBSD.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4JnRb46SBHz3qWD X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b="gvw/YKm5"; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-1.58 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; FREEFALL_USER(0.00)[manu]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:212.83.155.74/32]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_MATCH_FROM(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.995]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-0.09)[-0.089]; MLMMJ_DEST(0.00)[freebsd-current]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Mon, 31 Jan 2022 14:19:53 +0300 Vladimir Kondratyev wrote: > On 30.01.2022 22:43, Stefan Esser wrote: > > Am 30.01.22 um 19:23 schrieb Vladimir Kondratyev: > >> On 30.01.2022 00:25, Stefan Esser wrote: > >>> After rebooting with freshly built world, kernel and the amdgpu driver > >>> my console stopped working. It goes blank and the display goes into a > >>> power save mode, as soon as the amdgpu driver is loaded. > >>> > >>> The GPU (a Radeon R7 250E) is correctly detected as before, but there > >>> is an error message "drmn0: [drm] Cannot find any crtc or sizes". > >>> > > [...] > >>> [drm] AMDGPU Display Connectors > >>> [drm] Connector 0: > >>> [drm]=A0=A0 DP-1 > >>> [drm]=A0=A0 HPD4 > >>> [drm]=A0=A0 DDC: 0x1950 0x1950 0x1951 0x1951 0x1952 0x1952 0x1953 0x1= 953 > >>> [drm]=A0=A0 Encoders: > >>> [drm]=A0=A0=A0=A0 DFP1: INTERNAL_UNIPHY2 > >>> [drm] Connector 1: > >>> [drm]=A0=A0 HDMI-A-1 > >>> [drm]=A0=A0 HPD1 > >>> [drm]=A0=A0 DDC: 0x195c 0x195c 0x195d 0x195d 0x195e 0x195e 0x195f 0x1= 95f > >>> [drm]=A0=A0 Encoders: > >>> [drm]=A0=A0=A0=A0 DFP2: INTERNAL_UNIPHY2 > >>> [drm] Connector 2: > >>> [drm]=A0=A0 DVI-I-1 > >>> [drm]=A0=A0 HPD2 > >>> [drm]=A0=A0 DDC: 0x1958 0x1958 0x1959 0x1959 0x195a 0x195a 0x195b 0x1= 95b > >>> [drm]=A0=A0 Encoders: > >>> [drm]=A0=A0=A0=A0 DFP3: INTERNAL_UNIPHY > >>> [drm]=A0=A0=A0=A0 CRT1: INTERNAL_KLDSCP_DAC1 > >>> drmn0: [drm] Cannot find any crtc or sizes > >>> drmn0: [drm] Cannot find any crtc or sizes > >>> drmn0: [drm] Cannot find any crtc or sizes > >>> [drm] Initialized amdgpu 3.37.0 20150101 for drmn0 on minor 0 > >>> > >>> A successful driver attach from a reboot a few days ago had ended in: > >>> > >>> [drm]=A0=A0=A0=A0 CRT1: INTERNAL_KLDSCP_DAC1 > >>> [drm] fb mappable at 0xE0503000 > >>> [drm] vram apper at 0xE0000000 > >>> [drm] size 33177600 > >>> [drm] fb depth is 24 > >>> [drm]=A0=A0=A0 pitch is 15360 > >>> [drm] Initialized amdgpu 3.36.0 20150101 for drmn0 on minor 0 > >>> > >>> Regards, STefan > >> > >> drm-kmod commit 534aa199c10d forced it to use i2c from base. > >=20 > > Hi Vladimir, > >=20 > > thank you for the information! I'm using drm-devel-kmod, and in fact fo= und > > that 5.5.19.g20211230 works, while 5.7.19.g20220126 (committed as 0c386= 74b389ad > > on 2022-01-26) causes the failure. > >=20 > >> You may try to checkout previous revision (444dc58f0247) to find out i= f in-base > >> i2c is guilty or not. > >=20 > > Assuming that the same change to use the system i2c code has been in th= e latest > > commit to the drm-devel-kmod port, this should be proven, now. ;-) > >=20 > > These is the list of in-kernel i2c modules on my system (a Ryzen 9 5950= on an > > ASUS mainboard with B550 chip-set): > >=20 > > $ kldstat -v | grep iic > > 68 iicsmb/smbus > > 67 iicbus/iicsmb > > 66 iichb/iicbus > > 65 iicbb/iicbus > > 64 iicbus/iic > > 63 iicbus/ic > > 213 lkpi_iicbb/iicbb > > 212 lkpi_iic/lkpi_iicbb > > 211 lkpi_iic/iicbus > > 210 drmn/lkpi_iic > > 56 iichid/hidbus > >=20 > > Can I help debug this issue? > >=20 > > I could re-install the latest version and boot with hw.dri.drm_debug or > > dev.drm.drm_debug set? > >=20 > > Or are there other settings to get a debug log from the i2c side? > >=20 > > Regards, STefan > >=20 > > PS: I'm keeping the CC to current@, since this might be an issue in the= i2c > > kernel code ... >=20 > There are no successful lkpi_iic attachments in your output. They look li= ke: >=20 > lkpi_iic0: on drmn0 >=20 > Please share your `devinfo -v` output. > Kldload output with verbose boot enabled can be helpful too. That's because this card is probably using the bitbang part. As stated in the commit this wasn't tested as I don't have compatible hardware. It's likely a timing issue in the bitbang part. That's the main reason it's only in master and 5.7 branch of drm-kmod, so people can debug/fix. --=20 Emmanuel Vadot