From owner-svn-src-all@FreeBSD.ORG Sat Dec 14 11:27:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AED6D11; Sat, 14 Dec 2013 11:27:22 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0A30B1AEF; Sat, 14 Dec 2013 11:27:21 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rBEBRGpk017902; Sat, 14 Dec 2013 13:27:16 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rBEBRGpk017902 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rBEBRF6d017901; Sat, 14 Dec 2013 13:27:15 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 14 Dec 2013 13:27:15 +0200 From: Konstantin Belousov To: Aleksandr Rybalko Subject: Re: svn commit: r259261 - head/sys/dev/drm2 Message-ID: <20131214112715.GA59496@kib.kiev.ua> References: <201312121449.rBCEnRRQ045690@svn.freebsd.org> <20131212190230.GU59496@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sXL3peJHel3veXWV" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Dec 2013 11:27:22 -0000 --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 =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--