Date: Sat, 14 Dec 2013 13:27:15 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Aleksandr Rybalko <ray@ddteam.net> Cc: svn-src-head@freebsd.org, Aleksandr Rybalko <ray@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r259261 - head/sys/dev/drm2 Message-ID: <20131214112715.GA59496@kib.kiev.ua> In-Reply-To: <a4422c01-4d23-472a-9f45-074fc70a5aa6@email.android.com> References: <201312121449.rBCEnRRQ045690@svn.freebsd.org> <20131212190230.GU59496@kib.kiev.ua> <a4422c01-4d23-472a-9f45-074fc70a5aa6@email.android.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--sXL3peJHel3veXWV Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 14, 2013 at 12:11:01AM +0200, Aleksandr Rybalko wrote: > Konstantin Belousov <kostikbel@gmail.com> =CE=C1=D0=C9=D3=C1=D7(=CC=C1): > >On Thu, Dec 12, 2013 at 02:49:27PM +0000, Aleksandr Rybalko wrote: > >> Author: ray > >> Date: Thu Dec 12 14:49:26 2013 > >> New Revision: 259261 > >> URL: http://svnweb.freebsd.org/changeset/base/259261 > >>=20 > >> Log: > >> Do not try to probe/attach if attempt to add fbd child are failed. > >> =20 > >> Sponsored by: The FreeBSD Foundation > >>=20 > >> Modified: > >> head/sys/dev/drm2/drm_fb_helper.c > >>=20 > >> Modified: head/sys/dev/drm2/drm_fb_helper.c > >> > >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > >> --- head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:37:25 > >2013 (r259260) > >> +++ head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:49:26 > >2013 (r259261) > >> @@ -1043,7 +1043,10 @@ int drm_fb_helper_single_fb_probe(struct > >> =20 > >> kdev =3D fb_helper->dev->device; > >> fbd =3D device_add_child(kdev, "fbd", device_get_unit(kdev)); > >> - ret =3D device_probe_and_attach(fbd); > >> + if (fbd !=3D NULL)=20 > >> + ret =3D device_probe_and_attach(fbd); > >> + else > >> + ret =3D ENODEV; > >This must be -ENODEV, since linux layer operates on negative values for > >error. The error is negated in the drm layer, which would result in > >non-existent errno returned to FreeBSD code. >=20 > It is not actually return code, but only value to show in error message f= ew lines later. ENODEV just value for case no device attached. > That error message appear only if kernel configuration include device vt.= (planning for syscons too, maybe). Ok. I looked around some more, and I think that the call to drm_fb_helper_set_par() is required to properly initialize crtc. See the #ifdef-ed Linux code. >=20 > > > >Also, the #ifdef __FreeBSD braces in the file are not useful, please > >remove them. > >> #ifdef DEV_VT > >> if (ret !=3D 0) > >> DRM_ERROR("Failed to attach fbd device: %d\n", ret); >=20 > Should we with Jean have to remove all #ifdef __FreeBSD and __Linux over = whole DRM2 code, to reduce differences with linux code? >=20 The #ifdefs should be removed. The removal would not reduce difference with the upstream, but this is not the point anyway. --sXL3peJHel3veXWV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSrECTAAoJEJDCuSvBvK1BkDsP/3lIek0TkT5/6knpoiTx4fBf jJkSPcNrdBCxVM8LYfTyOnkpVyiNCzKQyWrDmbu0r2mo547adv194vqD6bW0ENJB n91ZSuneCv6QS6RPSMU6MwPZDCPudTfwZSVMp9qeozvLsSvndWDXXMYHJ8PSVn6L VT+mMZ/pUgPhw9h8WKtnH8/e+OBj9sMuWdgLFfM7PwWho1uLd9Z/kcWbw8A6KeQo YDzHJzjPddq2IEpa3bBfqJTWEdsnkCW2BT9RF29ZMxfc+y9wMZbeKuwmnsEJDqka /pP77/K47JefiufEtG7alYII7tVqOaY7aeU1cnTmpePsoGhxz9178529AQ/DxzNS owRaKkOtCyWU5w+jSZq0kPQOoyR5aiJDJKvUa0mNW334iH0lKSWhBUI1T24eUI9r VORfqcLha4zvAUj7m5USRc5xTMcjMxLFZVroJ3or3QIBO4GnlQUU9Ki1ig5HGFfs 55wmXrteM9qhT/TGHODR9U50B7V01ihrh5I754ptJlXbh9jSlhECIS3cxNg4D0xN L+XEpmqi7yuoOWYgLEfkCQoo+NYxpe6qaJdRHffYA+4WgewN2YV5vkTZSKbSvct5 CL3nxtLgIcEJry/5BgFBowFLjM/8wpSIb4E/zXVpUYEvpkzF2eyEfm/lq4cPXKcP ShVFAbv5PcS+fz6Yup5G =4J5O -----END PGP SIGNATURE----- --sXL3peJHel3veXWV--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131214112715.GA59496>