From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [RFC PATCH v3 4/4] tests/drv_module_reload: add ipvr support Date: Thu, 18 Dec 2014 11:04:27 +0100 Message-ID: <20141218100426.GC24383@ulmo> References: <1416597001-6097-1-git-send-email-yao.cheng@intel.com> <20141121202702.GA10379@mithrandir> <20141121203633.GB25711@phenom.ffwll.local> <20141124095544.GA25912@ulmo.nvidia.com> <20141124131448.GP25711@phenom.ffwll.local> <8FF7D634BEE4C2428EFFAB6B7E919E4B01835053@shsmsx102.ccr.corp.intel.com> <20141217081304.GB3303@ulmo> <8FF7D634BEE4C2428EFFAB6B7E919E4B0184ECCF@shsmsx102.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0108181177==" Return-path: In-Reply-To: <8FF7D634BEE4C2428EFFAB6B7E919E4B0184ECCF@shsmsx102.ccr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Cheng, Yao" Cc: "daniel.vetter@ffwll.ch" , "intel-gfx@lists.freedesktop.org" , "emil.l.velikov@gmail.com" , "dri-devel@lists.freedesktop.org" , "Chehab, John" , "Jiang, Fei" List-Id: dri-devel@lists.freedesktop.org --===============0108181177== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0/kgSOzhNoDC5T3a" Content-Disposition: inline --0/kgSOzhNoDC5T3a Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 18, 2014 at 05:44:37AM +0000, Cheng, Yao wrote: > > -----Original Message----- > > From: Thierry Reding [mailto:thierry.reding@gmail.com] > > Sent: Wednesday, December 17, 2014 16:13 > > To: Cheng, Yao > > Cc: Daniel Vetter; intel-gfx@lists.freedesktop.org; dri- > > devel@lists.freedesktop.org; daniel.vetter@ffwll.ch; Kelley, Sean V; Ch= ehab, > > John; emil.l.velikov@gmail.com; Jiang, Fei > > Subject: Re: [RFC PATCH v3 4/4] tests/drv_module_reload: add ipvr suppo= rt >=20 > Thanks Thiery for the suggestion, pls see my inline comments >=20 > >=20 > > > Thierry/Daniel, the actual symptom is, after "rmmod i915", though > > > drm_drv_release() is also called on the child device "ipvr", I still > > > see the module exist in the system (check it by "lsmod"). > >=20 > > Which module? ipvr or i915? >=20 > The ipvr module still exist by checking "lsmod" after rmmod i915 >=20 > >=20 > > > This causes issue when I modprobe i915 and ipvr again later. > >=20 > > What issue are you seeing? If your driver can't deal with a situation w= here it's > > probed again after being removed then you have a bug. > > >=20 > I double checked the symptom and found it was a deadlock on drm_global_mu= tex. > When i915_driver_load() registers the platform device while ipvr module i= s in the system, ipvr's probe() function tries to lock drm_global_mutex whi= ch was already held by i915. > I think either of the following 2 actions need to be moved to a bottom ha= lf e.g. a work queue: > platform_device_add () call in i915_ved.c (called during i915_driver_loa= d()) > drm_dev_register() call during ipvr's probe() > Which one makes more sense? pls kindly advise (I personally prefer the fo= rmer one.). Yes, that's somewhat ugly, but I don't see a way around that. I'd also think that moving platform_device_add() to a workqueue would be the best option here. Thierry --0/kgSOzhNoDC5T3a Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUkqaqAAoJEN0jrNd/PrOhp9AP/2k87DklX+wkfyOVmdFH6oK3 VVHBHL0SrkdaPFwEBELITe9Et2fA1jkLv0Qhgeq6/qxvYhmlvw3vl9v5ti5OmD6x Z3gq0RtPMfJt8MG0vYzSmfq9n9VyPRdqtXr/0nVs3ee3gZag3d+pjOV+6L2q4NT5 xlXkWfvKTV5IyE0XjRswwlt/wKtiumpRTcSlWLQmpiDw+ItT2gqAeuScAi0KJ1Pu R/JCCLmNvXpf5HA9ZSgPZz1gOm3izwkuKKT8YTT+BKM3aM7LRWm1MkA6M0h9q/E7 /f1YlxgZY6zSyGg6671zRPXkgwPQAewjzz57EFuzlFYDA7USltlCbQQiNZb1MI0l wO8AMu5fYdqKZ69sDCZQZ3OeOeSqLZXHI0YTVYZ14sPyhouPE98XniifJ5Rq5N5n JhC/I+LBY5PNLztogye+RqDPzth1HtTyFbsB8+BnYVHE+cycdBbqQp7BkSMlujsx akZGYCGM3iyWw7uVdAsEJW8q8eRyoFRiMaksJOmRtPnd2BHBdHv1MSErOHS3kLY9 PGfPM+ZOH09akEidpfxicTcQzVSBwMswrq1AhJsbBgfUkzXWKjEiYZHCwdUmuk81 wu8kzMGt1ekuFKswAjjR5vCAZTuBr+sFBsC7GebMZ+ny01O+A0KSb4R6Fxl3FLXY XQIKhLSv1mpFxIKxXeNn =Obxd -----END PGP SIGNATURE----- --0/kgSOzhNoDC5T3a-- --===============0108181177== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9pbnRlbC1nZngK --===============0108181177==--