From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030485AbcHaQnF (ORCPT ); Wed, 31 Aug 2016 12:43:05 -0400 Received: from down.free-electrons.com ([37.187.137.238]:42170 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030302AbcHaQnC (ORCPT ); Wed, 31 Aug 2016 12:43:02 -0400 Date: Wed, 31 Aug 2016 18:43:00 +0200 From: Maxime Ripard To: Chen-Yu Tsai , linux-arm-kernel , dri-devel , linux-kernel Subject: Re: [PATCH] drm/sun4i: Clear encoder->bridge if a bridge is not found Message-ID: <20160831164300.GA15402@lukather> References: <20160830122223.21377-1-wens@csie.org> <20160830125622.GF18605@lukather> <20160831154002.GC14379@lukather> <20160831162708.GD20761@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: <20160831162708.GD20761@phenom.ffwll.local> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 31, 2016 at 06:27:08PM +0200, Daniel Vetter wrote: > > > >> + if (IS_ERR(encoder->bridge)) > > > >> + encoder->bridge =3D NULL; > > > >> + > > > > > > > > And that could be the else condition of the if statement below. > > >=20 > > > That would be a bit confusing, changing it after calling drm_encoder_= init. > > > The code says it ok to do though. > >=20 > > The magic really happens only after the encoder has been attached to > > something, so it's really safe. >=20 > s/attached/registered using drm_dev_register(). Which should > happen _way_ later for all drivers which have gotten rid of their ->load > callback and implemented the recommend driver load sequence. My bad, thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --zhXaljGHf11kAtnf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXxwkUAAoJEBx+YmzsjxAgSUAP/3eVzETT7d2KmCWuJ9s8i2Mv ZKnVyEvWa2plnDoefd/g0vP9QKyUA9QNhscD/y7lRRt0VwNZ0W1CrC1cOeVsrdKI wC0gkVQOhXF+S4sC/ydsi+8ph3RH2LieNWRKcXCXv/nG+Incm0vb96jsF7pqE6uA dMkliQfLRFt58QnihshY6dzRtjURZVBnQw8y/FcJx/gwFfesTalcd+NYNtsIDVTC 0Pj8PxDNe+0+jKor7PRUbESNs2kiRbCG+olahqQY1sQC2Y78ROtsEF6ftG2ye1L7 w77NmkMJ5PQJNbU3ZCnsPanU7nKcxsO2s6rDurC7NLTCrsOtRZMZY+bFup1LD+5E lxlqicVa/sJ1R3VunIsGViasc1cpg+rbRQmZwTMEANxDzobEPCoZbmkboU7wV9ME A2fxDkl9iLB+28zTg75nZkkXexkTKvBswwcuDqbMbuMKEmoTUJt/2Aq7mcyRahGF CzzxiK0ErH028rc0UwRsOQZJHo2nwM3KbVh2icsZ9rRCs/uCDIrI0hPu1qEzB/T3 3D1prLnY2qFRU51FIMHgPv/Anx0zQBdF5U82XNkDVBYiqRnuWSaLIm1tRX5BIThN 47YiNlc3y4h5WMhwBF+TC1sFibgf/av9mfixJKBHk2lYLF2fvvjyzKUVjZ0FSQV+ d2KYaSAz8AAY9RTddBNe =Z/nJ -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxime.ripard@free-electrons.com (Maxime Ripard) Date: Wed, 31 Aug 2016 18:43:00 +0200 Subject: [PATCH] drm/sun4i: Clear encoder->bridge if a bridge is not found In-Reply-To: <20160831162708.GD20761@phenom.ffwll.local> References: <20160830122223.21377-1-wens@csie.org> <20160830125622.GF18605@lukather> <20160831154002.GC14379@lukather> <20160831162708.GD20761@phenom.ffwll.local> Message-ID: <20160831164300.GA15402@lukather> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Aug 31, 2016 at 06:27:08PM +0200, Daniel Vetter wrote: > > > >> + if (IS_ERR(encoder->bridge)) > > > >> + encoder->bridge = NULL; > > > >> + > > > > > > > > And that could be the else condition of the if statement below. > > > > > > That would be a bit confusing, changing it after calling drm_encoder_init. > > > The code says it ok to do though. > > > > The magic really happens only after the encoder has been attached to > > something, so it's really safe. > > s/attached/registered using drm_dev_register(). Which should > happen _way_ later for all drivers which have gotten rid of their ->load > callback and implemented the recommend driver load sequence. My bad, thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH] drm/sun4i: Clear encoder->bridge if a bridge is not found Date: Wed, 31 Aug 2016 18:43:00 +0200 Message-ID: <20160831164300.GA15402@lukather> References: <20160830122223.21377-1-wens@csie.org> <20160830125622.GF18605@lukather> <20160831154002.GC14379@lukather> <20160831162708.GD20761@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0110737044==" Return-path: Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E8666E7C4 for ; Wed, 31 Aug 2016 16:43:01 +0000 (UTC) In-Reply-To: <20160831162708.GD20761@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Chen-Yu Tsai , linux-arm-kernel , dri-devel , linux-kernel List-Id: dri-devel@lists.freedesktop.org --===============0110737044== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 31, 2016 at 06:27:08PM +0200, Daniel Vetter wrote: > > > >> + if (IS_ERR(encoder->bridge)) > > > >> + encoder->bridge =3D NULL; > > > >> + > > > > > > > > And that could be the else condition of the if statement below. > > >=20 > > > That would be a bit confusing, changing it after calling drm_encoder_= init. > > > The code says it ok to do though. > >=20 > > The magic really happens only after the encoder has been attached to > > something, so it's really safe. >=20 > s/attached/registered using drm_dev_register(). Which should > happen _way_ later for all drivers which have gotten rid of their ->load > callback and implemented the recommend driver load sequence. My bad, thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --zhXaljGHf11kAtnf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXxwkUAAoJEBx+YmzsjxAgSUAP/3eVzETT7d2KmCWuJ9s8i2Mv ZKnVyEvWa2plnDoefd/g0vP9QKyUA9QNhscD/y7lRRt0VwNZ0W1CrC1cOeVsrdKI wC0gkVQOhXF+S4sC/ydsi+8ph3RH2LieNWRKcXCXv/nG+Incm0vb96jsF7pqE6uA dMkliQfLRFt58QnihshY6dzRtjURZVBnQw8y/FcJx/gwFfesTalcd+NYNtsIDVTC 0Pj8PxDNe+0+jKor7PRUbESNs2kiRbCG+olahqQY1sQC2Y78ROtsEF6ftG2ye1L7 w77NmkMJ5PQJNbU3ZCnsPanU7nKcxsO2s6rDurC7NLTCrsOtRZMZY+bFup1LD+5E lxlqicVa/sJ1R3VunIsGViasc1cpg+rbRQmZwTMEANxDzobEPCoZbmkboU7wV9ME A2fxDkl9iLB+28zTg75nZkkXexkTKvBswwcuDqbMbuMKEmoTUJt/2Aq7mcyRahGF CzzxiK0ErH028rc0UwRsOQZJHo2nwM3KbVh2icsZ9rRCs/uCDIrI0hPu1qEzB/T3 3D1prLnY2qFRU51FIMHgPv/Anx0zQBdF5U82XNkDVBYiqRnuWSaLIm1tRX5BIThN 47YiNlc3y4h5WMhwBF+TC1sFibgf/av9mfixJKBHk2lYLF2fvvjyzKUVjZ0FSQV+ d2KYaSAz8AAY9RTddBNe =Z/nJ -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf-- --===============0110737044== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0110737044==--