diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-05-15 17:11:48 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-06-05 10:22:33 -0400 |
commit | b66d18ddb16603d1e1ec39cb2ff3abf3fd212180 (patch) | |
tree | 4328633189eae071e2e2a43a4406ecff477c3a90 /drivers/gpu/drm | |
parent | 42c2798b35b95c471877133e19ccc3cab00e9b65 (diff) |
drm/i915: avoid non-atomic sysrq execution
The sysrq functions are executed in hardirq context, so we shouldn't be
calling sleeping functions from them, like mutex_locks or memory
allocations.
Fix up the i915 sysrq handler to avoid this.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/intel_fb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index e4652dcdd9bb..7a66b91ccf42 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c | |||
@@ -857,9 +857,15 @@ void intelfb_restore(void) | |||
857 | drm_crtc_helper_set_config(&kernelfb_mode); | 857 | drm_crtc_helper_set_config(&kernelfb_mode); |
858 | } | 858 | } |
859 | 859 | ||
860 | static void intelfb_restore_work_fn(struct work_struct *ignored) | ||
861 | { | ||
862 | intelfb_restore(); | ||
863 | } | ||
864 | static DECLARE_WORK(intelfb_restore_work, intelfb_restore_work_fn); | ||
865 | |||
860 | static void intelfb_sysrq(int dummy1, struct tty_struct *dummy3) | 866 | static void intelfb_sysrq(int dummy1, struct tty_struct *dummy3) |
861 | { | 867 | { |
862 | intelfb_restore(); | 868 | schedule_work(&intelfb_restore_work); |
863 | } | 869 | } |
864 | 870 | ||
865 | static struct sysrq_key_op sysrq_intelfb_restore_op = { | 871 | static struct sysrq_key_op sysrq_intelfb_restore_op = { |