Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Dec 2015 17:00:47 -0800
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        Joe Maloney <jmaloney@pcbsd.org>, =?ISO-8859-1?Q?Jean=2DS=E9bastien_P=E9dron?= <jean-sebastien.pedron@dumbbell.fr>
Subject:   Re: EFI and i915kms questions
Message-ID:  <1736392.rQjToYj3It@ralph.baldwin.cx>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1736392.rQjToYj3It>