From owner-freebsd-current@freebsd.org Wed Dec 2 03:46:14 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29E11A3F5AA for ; Wed, 2 Dec 2015 03:46:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFE0E1263 for ; Wed, 2 Dec 2015 03:46:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 22909B946; Tue, 1 Dec 2015 22:46:12 -0500 (EST) From: John Baldwin To: freebsd-current@freebsd.org Cc: Joe Maloney , =?ISO-8859-1?Q?Jean=2DS=E9bastien_P=E9dron?= Subject: Re: EFI and i915kms questions Date: Tue, 01 Dec 2015 17:00:47 -0800 Message-ID: <1736392.rQjToYj3It@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <5BC149BC-8BA6-4089-A9E6-763E2494A30A@pcbsd.org> References: <54B18FFE-063F-4F62-9343-28FDE68EE358@pcbsd.org> <56505B3F.2070403@dumbbell.fr> <5BC149BC-8BA6-4089-A9E6-763E2494A30A@pcbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 01 Dec 2015 22:46:12 -0500 (EST) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 03:46:14 -0000 On Saturday, November 28, 2015 04:50:41 PM Joe Maloney wrote: > Thank you. For what it=E2=80=99s worth I was able to grab a dump aft= er setting that sysctl. It looks like this maybe the culprit? >=20 > panic: _sx_xlock_hard: recursed on non-recursive sx gmbus @ /usr/src/= sys/modules/drm2/i915kms/../../../dev/drm2/i915/intel_iic.c:362 >=20 > Since it is to large for posting here. I will include a link to the = entire dump on pastebin if anyone is interesting in looking at it. >=20 > http://pastebin.com/mzS5svy8 >=20 > In addition I did a little further testing to narrow down the issue. >=20 > 10.1-RELEASE WORKS > 10.2-RELEASE WORKS Hmm, the relevant file (intel_iic.c) hasn't changed since 10.2. Howeve= r, the code looks rather dubious. It seems that the function is recursing onto itself he= re: 465 =09 =09 =09 /* 466 =09 =09 =09 * Hardware may not support GMBUS over these p= ins? 467 =09 =09 =09 * Try GPIO bitbanging instead. 468 =09 =09 =09 */ 469 =09 =09 =09 sc->force_bit_dev =3D true; 470 =09dumbbell =09282199 =09 error =3D -IICBUS_TRANSFER(idev, m= sgs, nmsgs); 471 =09kib =09280369 =09 goto out; Note that at the top of the function it invokes IICBUS_TRANSFER on a di= fferent device when force_bit_dev is true: 370 =09 =09 =09 sx_xlock(&dev_priv->gmbus_sx); 371 =09 =09 =09 if (sc->force_bit_dev) { 372 =09dumbbell =09282199 =09 error =3D -IICBUS_TRANSFER= (dev_priv->bbbus[unit], msgs, nmsgs); 373 =09kib =09235783 =09 goto out; 374 =09 =09 =09 } Hmm, I would try changing the line at 470 to match the line at 372. They used to match, and then this change: https://svnweb.freebsd.org/base?view=3Drevision&revision=3D277487 converted direct calls to an iic routine to IICBUS_TRANSFER. However, = it also changed the first parameter of the IICBUS_TRANSFER() to idev at li= ne 470 when it was the longer expression in the previous diff. --=20 John Baldwin