From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm/exynos/dsi: simplify hotplug code Date: Thu, 6 Nov 2014 14:18:27 +0100 Message-ID: <20141106131824.GC12260@ulmo> References: <1415273748-26805-1-git-send-email-a.hajda@samsung.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1846802990==" Return-path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 4239C6EFC5 for ; Thu, 6 Nov 2014 05:18:31 -0800 (PST) Received: by mail-wi0-f171.google.com with SMTP id r20so1450315wiv.4 for ; Thu, 06 Nov 2014 05:18:30 -0800 (PST) In-Reply-To: <1415273748-26805-1-git-send-email-a.hajda@samsung.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Andrzej Hajda Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1846802990== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wULyF7TL5taEdwHz" Content-Disposition: inline --wULyF7TL5taEdwHz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 06, 2014 at 12:35:48PM +0100, Andrzej Hajda wrote: > Exynos DSI driver uses DSI bus attach/detach callbacks to implement > panel hotplug mechanism. The patch moves panel attachment code > from .detect callback to DSI bus callbacks. It makes the code > simpler and more straightforward. > The patch removes also redundant and lock unprotected dpms_off call > from unbind code. >=20 > Signed-off-by: Andrzej Hajda > --- > Hi, >=20 > This patch simplifies drm part of hotplug mechanism in dsi attach/detach = callbacks. > It also fixes minor bug with unprotected dpms_off call, which is unnecces= ary anyway. >=20 > But the main reason I have looked at this code again is to show that > we do not need zombie panels, we can kill panels properly if we have hot = plug/unplug > callbacks. And it is quite simple: we just need to take mode_config.mutex= locks > to synchronize dsi callbacks with drm, nothing more. > It works nicely because of two things: > - panel callbacks are called always under this lock, > - callbacks are installed after drmdev creation and deinstalled before dr= mdev destroy -=20 > this way we assure drmdev is always present in callbacks. Again, something like what you propose is going to work only for DSI devices. What we need is a solution that works for all other types of panels, too. This is even more important when we consider bridges because they are less likely to be on a DSI bus. Thierry --wULyF7TL5taEdwHz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUW3UgAAoJEN0jrNd/PrOhqSUP/1Kniyipc3KeyO4cOHoX0WJc sG/9bVBUcruJlbEF9PeRVuHXPAUB+4d6bf7+W+ojWRmz9wLCmbT/lHdywjVy4HDH nd+R3fqPSFqGD5nzq/QCppvlKLCcNQmx90yirHTJug+9rJWsrFaGbMAzv2aE+LGa EEM803v26wy6Exs2saq3XMCzG3rIOg1u/azfMcnQaN5i+sWfq/5zidTuafAs54uE fkrvG+mBLROCiDftiAxMnNDdBRQE+B49ADzAlBP4PLjVlDnPlAJryRAAHDn4YGDY HbrDcCLt60Fe1/cCZYYJvzs38netIcTuYPxBNzX5uLgPi0RU6Brd+nT1pLNV9qpG 4ZavQ0vsPPWxFYf1nquskuHQp6sopLeqjKYNyS/Fxv0Fp6tR5w7Vs2zaZssuVKFC ySDez1U7gBy6r4JdiFx9NgAGcgEPGZrNNi5hFQXobATLDvoYvlGYbYjLOwTRao9l O7ZIKDyy4cKYe1VnY5/vgh1ndLZq5ynmO3v1/Qm/LWDOefcoClF+GRp1C+7p8f92 To+wesvnpnR5yCtFmt/ncXJ9vGCoOBSFhLS0si6AL03wRBrdmZo+HpFGkuobj0MT QYXiGJTp1EmQpdpuqTN5fednR+wFNb4RBkmjYkrCz2cYdrlYDoC2N+wd8SRASZln 4U5RjxALqGWj752im4e6 =Yo+u -----END PGP SIGNATURE----- --wULyF7TL5taEdwHz-- --===============1846802990== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1846802990==--