Skip to contentSkip to conversation

drm/i915: Sync the hotplug work when device suspending

PATCH In review Chuansheng Liu 3 participants 5 messages Jul 27, 2013 – Aug 6, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Sync the hotplug work when device suspending

It is possible that during i915 device suspending with one pending hotplug work, one of cases is the device resume/suspend quickly.

At this case, the hotplug work will be executed even after device is OFF, in Intel Android platform, it will cause system hang.

Here we need sync the hotplug work in function i915_drm_freeze().

---
 drivers/gpu/drm/i915/i915_drv.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +2 -0
index 45b3c03..95c6956 100644
@@ -562,6 +562,8 @@ static int i915_drm_freeze(struct drm_device *dev)
 
 		drm_irq_uninstall(dev);
 		dev_priv->enable_hotplug_processing = false;
+		cancel_work_sync(&dev_priv->hotplug_work);
+
 		/*
 		 * Disable CRTCs directly since we want to preserve sw state
 		 * for _thaw.
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 6 lines · Chuansheng Liu

It is possible that during i915 device suspending with one pending hotplug work, one of cases is the device resume/suspend quickly.

At this case, the hotplug work will be executed even after device is OFF, in Intel Android platform, it will cause system hang.

See

[email protected]
http://lists.freedesktop.org/archives/intel-gfx/2012-July/019144.html

which is in response to the bug raised here

s5hlilr4s9h.wl%[email protected]
http://lists.freedesktop.org/archives/intel-gfx/2012-April/016738.html
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#2 lore raw
Quoted 16 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Saturday, July 27, 2013 5:40 PM
To: Liu, Chuansheng
Cc: [email protected]; [email protected]; [email protected]; Li, Fei; [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Sync the hotplug work when device suspending

Quoted 4 lines · Chuansheng Liu

It is possible that during i915 device suspending with one pending hotplug work, one of cases is the device resume/suspend quickly.

Quoted 7 lines
Quoted 2 lines

At this case, the hotplug work will be executed even after device is OFF, in Intel Android platform, it will cause system hang.

See

[email protected]
http://lists.freedesktop.org/archives/intel-gfx/2012-July/019144.html

Sorry to not know this thread before, and it seems it did not be included into upstream. Moreover, in current upstream code the rps_work has been synced in intel_disable_gt_powersave().

So, is it possible to consider my patch based on current upstream code? Thanks.

Quoted 9 lines

which is in response to the bug raised here

s5hlilr4s9h.wl%[email protected]
http://lists.freedesktop.org/archives/intel-gfx/2012-April/016738.html
-Chris

--
Chris Wilson, Intel Open Source Technology Centre

#3 lore raw
In reply to Chris Wilson
Quoted 10 lines · Chris Wilson
Quoted 6 lines · Chuansheng Liu

It is possible that during i915 device suspending with one pending hotplug work, one of cases is the device resume/suspend quickly.

At this case, the hotplug work will be executed even after device is OFF, in Intel Android platform, it will cause system hang.

See

Quoted 7 lines

[email protected]
http://lists.freedesktop.org/archives/intel-gfx/2012-July/019144.html

which is in response to the bug raised here

s5hlilr4s9h.wl%[email protected]
http://lists.freedesktop.org/archives/intel-gfx/2012-April/016738.html

Oops, I fail. And since your patch also has the required flush_scheduled_work (this will annoy Jesse since we flush system-wide, but alas) and is older ... can you please resubmit with References: for this new thread and the above two added and Chuanshen Lui cc'ed?

Thanks, Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#4 lore raw
Quoted 26 lines

-----Original Message-----
From: Daniel Vetter [mailto:[email protected]] On Behalf Of Daniel Vetter
Sent: Monday, August 05, 2013 1:42 PM
To: Chris Wilson; Liu, Chuansheng; [email protected]; [email protected]; [email protected]; Li, Fei; [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Sync the hotplug work when device suspending

Quoted 15 lines · Chris Wilson
Quoted 6 lines · Chuansheng Liu

It is possible that during i915 device suspending with one pending hotplug work, one of cases is the device resume/suspend quickly.

At this case, the hotplug work will be executed even after device is OFF, in Intel Android platform, it will cause system hang.

See

[email protected]
http://lists.freedesktop.org/archives/intel-gfx/2012-July/019144.html

which is in response to the bug raised here

Quoted 7 lines
Quoted 2 lines

s5hlilr4s9h.wl%[email protected]
http://lists.freedesktop.org/archives/intel-gfx/2012-April/016738.html

Oops, I fail. And since your patch also has the required flush_scheduled_work (this will annoy Jesse since we flush system-wide, but alas) and is older ... can you please resubmit with References: for this new thread and the above two added and Chuanshen Lui cc'ed?

Yes, we really need this fix otherwise will cause some system hanging issue. Thanks.

Quoted 6 lines

Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch