From: Thierry Reding <thierry.reding@gmail.com>
To: "Cheng, Yao" <yao.cheng@intel.com>
Cc: "daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"emil.l.velikov@gmail.com" <emil.l.velikov@gmail.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"Chehab, John" <john.chehab@intel.com>,
"Jiang, Fei" <fei.jiang@intel.com>
Subject: Re: [RFC PATCH v3 4/4] tests/drv_module_reload: add ipvr support
Date: Thu, 18 Dec 2014 11:04:27 +0100 [thread overview]
Message-ID: <20141218100426.GC24383@ulmo> (raw)
In-Reply-To: <8FF7D634BEE4C2428EFFAB6B7E919E4B0184ECCF@shsmsx102.ccr.corp.intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 1882 bytes --]
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; Chehab,
> > John; emil.l.velikov@gmail.com; Jiang, Fei
> > Subject: Re: [RFC PATCH v3 4/4] tests/drv_module_reload: add ipvr support
>
> Thanks Thiery for the suggestion, pls see my inline comments
>
> >
> > > 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").
> >
> > Which module? ipvr or i915?
>
> The ipvr module still exist by checking "lsmod" after rmmod i915
>
> >
> > > This causes issue when I modprobe i915 and ipvr again later.
> >
> > What issue are you seeing? If your driver can't deal with a situation where it's
> > probed again after being removed then you have a bug.
> >
>
> I double checked the symptom and found it was a deadlock on drm_global_mutex.
> When i915_driver_load() registers the platform device while ipvr module is in the system, ipvr's probe() function tries to lock drm_global_mutex which was already held by i915.
> I think either of the following 2 actions need to be moved to a bottom half e.g. a work queue:
> platform_device_add () call in i915_ved.c (called during i915_driver_load())
> drm_dev_register() call during ipvr's probe()
> Which one makes more sense? pls kindly advise (I personally prefer the former 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
[-- Attachment #1.2: Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-12-18 10:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-21 19:10 [RFC PATCH v3 4/4] tests/drv_module_reload: add ipvr support Yao Cheng
2014-11-21 20:27 ` Thierry Reding
2014-11-21 20:36 ` Daniel Vetter
2014-11-24 9:55 ` Thierry Reding
2014-11-24 13:14 ` Daniel Vetter
2014-12-01 3:06 ` Cheng, Yao
2014-12-17 8:13 ` Thierry Reding
2014-12-18 5:44 ` Cheng, Yao
2014-12-18 10:04 ` Thierry Reding [this message]
2014-12-18 11:21 ` Daniel Vetter
2014-12-21 14:40 ` Cheng, Yao
2015-01-05 8:39 ` Daniel Vetter
2015-01-06 14:14 ` Cheng, Yao
2015-01-07 7:33 ` Daniel Vetter
2014-12-17 8:02 ` Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141218100426.GC24383@ulmo \
--to=thierry.reding@gmail.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=fei.jiang@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=john.chehab@intel.com \
--cc=yao.cheng@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox