android_kernel_xiaomi_sm8350/drivers/gpu/drm/i915
Linus Torvalds e6890f6f3d i915: disable interrupts before tearing down GEM state
Reinette Chatre reports a frozen system (with blinking keyboard LEDs)
when switching from graphics mode to the text console, or when
suspending (which does the same thing). With netconsole, the oops
turned out to be

	BUG: unable to handle kernel NULL pointer dereference at 0000000000000084
	IP: [<ffffffffa03ecaab>] i915_driver_irq_handler+0x26b/0xd20 [i915]

and it's due to the i915_gem.c code doing drm_irq_uninstall() after
having done i915_gem_idle(). And the i915_gem_idle() path will do

  i915_gem_idle() ->
    i915_gem_cleanup_ringbuffer() ->
      i915_gem_cleanup_hws() ->
        dev_priv->hw_status_page = NULL;

but if an i915 interrupt comes in after this stage, it may want to
access that hw_status_page, and gets the above NULL pointer dereference.

And since the NULL pointer dereference happens from within an interrupt,
and with the screen still in graphics mode, the common end result is
simply a silently hung machine.

Fix it by simply uninstalling the irq handler before idling rather than
after. Fixes

    http://bugzilla.kernel.org/show_bug.cgi?id=13819

Reported-and-tested-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-08 17:09:24 -07:00
..
dvo_ch7xxx.c drm/i915: Change I2C api to pass around i2c_adapters 2009-06-18 15:53:57 -07:00
dvo_ch7017.c drm/i915: Change I2C api to pass around i2c_adapters 2009-06-18 15:53:57 -07:00
dvo_ivch.c drm/i915: Change I2C api to pass around i2c_adapters 2009-06-18 15:53:57 -07:00
dvo_sil164.c drm/i915: Change I2C api to pass around i2c_adapters 2009-06-18 15:53:57 -07:00
dvo_tfp410.c drm/i915: Change I2C api to pass around i2c_adapters 2009-06-18 15:53:57 -07:00
dvo.h drm/i915: Change I2C api to pass around i2c_adapters 2009-06-18 15:53:57 -07:00
i915_dma.c drm/i915: Use our own workqueue to avoid wedging the system along with the GPU. 2009-08-05 11:20:53 -07:00
i915_drv.c drm/i915: Restore the KMS modeset for every activated CRTC 2009-07-10 12:36:11 -07:00
i915_drv.h drm/i915: Improve CRTDDC mapping by using VBT info 2009-08-29 18:23:40 -07:00
i915_gem_debug.c drm/i915: Catch up to obj_priv->page_list rename in disabled debug code. 2009-06-22 20:19:39 -07:00
i915_gem_debugfs.c drm/i915: refactor error detection & collection 2009-07-13 15:33:37 -07:00
i915_gem_tiling.c drm/i915: Zap the GTT mapping when transitioning from untiled to tiled. 2009-07-10 14:10:58 -07:00
i915_gem.c i915: disable interrupts before tearing down GEM state 2009-09-08 17:09:24 -07:00
i915_ioc32.c
i915_irq.c drm/i915: silence vblank warnings 2009-08-09 12:25:29 +10:00
i915_mem.c drm: Remove memory debugging infrastructure. 2009-06-18 13:00:33 -07:00
i915_opregion.c ACPI: Add the reference count to avoid unloading ACPI video bus twice 2009-06-23 23:38:41 -04:00
i915_reg.h drm/i915: Add eDP support on IGDNG mobile chip 2009-07-29 15:16:19 -07:00
i915_suspend.c drm/i915: Fix read outside array bounds in restoring the SWF10 range. 2009-08-05 11:21:29 -07:00
intel_bios.c drm/i915: Improve CRTDDC mapping by using VBT info 2009-08-29 18:23:40 -07:00
intel_bios.h drm/i915: Add eDP support on IGDNG mobile chip 2009-07-29 15:16:19 -07:00
intel_crt.c drm/i915: Improve CRTDDC mapping by using VBT info 2009-08-29 18:23:40 -07:00
intel_display.c drm/i915: increase default latency constant (v2 w/comment) 2009-09-02 10:33:01 -07:00
intel_dp_i2c.c drm/i915: Make driver less chatty 2009-07-01 18:13:34 -07:00
intel_dp.c drm/i915: fix mask bits setting 2009-09-08 10:16:20 -07:00
intel_dp.h drm/i915: Add Display Port support 2009-06-18 15:54:07 -07:00
intel_drv.h drm/i915: fix mask bits setting 2009-09-08 10:16:20 -07:00
intel_dvo.c drm/i915: Set crtc/clone mask in different output devices 2009-08-24 17:01:33 -07:00
intel_fb.c drm/i915: Make driver less chatty 2009-07-01 18:13:34 -07:00
intel_hdmi.c drm/i915: Set crtc/clone mask in different output devices 2009-08-24 17:01:33 -07:00
intel_i2c.c drm/i915: Change I2C api to pass around i2c_adapters 2009-06-18 15:53:57 -07:00
intel_lvds.c drm/i915: Set crtc/clone mask in different output devices 2009-08-24 17:01:33 -07:00
intel_modes.c drm/i915: Change I2C api to pass around i2c_adapters 2009-06-18 15:53:57 -07:00
intel_sdvo_regs.h drm/i915: enable sdvo lvds scaling function. 2009-07-01 11:44:45 -07:00
intel_sdvo.c drm/i915: Set crtc/clone mask in different output devices 2009-08-24 17:01:33 -07:00
intel_tv.c drm/i915: fix mask bits setting 2009-09-08 10:16:20 -07:00
Makefile drm/i915: Add Display Port support 2009-06-18 15:54:07 -07:00