linux-sg2042/drivers/gpu/drm/rockchip
Jeffy Chen 0fa375e6bc drm/rockchip: Fix suspend crash when drm is not bound
Currently we are allocating drm_device in rockchip_drm_bind, so if the
suspend/resume code access it when drm is not bound, we would hit this
crash:

[  253.402836] Unable to handle kernel NULL pointer dereference at virtual address 00000028
[  253.402837] pgd = ffffffc06c9b0000
[  253.402841] [00000028] *pgd=0000000000000000, *pud=0000000000000000
[  253.402844] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[  253.402859] Modules linked in: btusb btrtl btbcm btintel bluetooth ath10k_pci ath10k_core ar10k_ath ar10k_mac80211 cfg80211 ip6table_filter asix usbnet mii
[  253.402864] CPU: 4 PID: 1331 Comm: cat Not tainted 4.4.70 #15
[  253.402865] Hardware name: Google Scarlet (DT)
[  253.402867] task: ffffffc076c0ce00 ti: ffffffc06c2c8000 task.ti: ffffffc06c2c8000
[  253.402871] PC is at rockchip_drm_sys_suspend+0x20/0x5c

Add sanity checks to prevent that.

Reported-by: Brian Norris <briannorris@chromium.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.kernel.org/patch/9890297/
2017-08-09 13:59:25 -04:00
..
Kconfig drm/rockchip: fix Kconfig dependencies 2017-07-24 09:53:09 +08:00
Makefile drm/rockchip: Refactor the component match logic. 2017-03-24 14:48:58 -04:00
analogix_dp-rockchip.c Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
cdn-dp-core.c drm/rockchip: fix NULL check on devm_kzalloc() return value 2017-07-10 14:13:00 -04:00
cdn-dp-core.h drm/rockchip: cdn-dp: retry to check sink count 2017-02-05 16:30:04 +08:00
cdn-dp-reg.c drm/rockchip: cdn-dp: add more log for video config 2017-03-13 15:59:35 -04:00
cdn-dp-reg.h drm/rockchip: cdn-dp: Correct PHY register address 2017-03-13 15:59:26 -04:00
dw-mipi-dsi.c drm/rockchip/dsi: correct the grf_switch_reg name 2017-03-24 14:48:58 -04:00
dw_hdmi-rockchip.c drm/bridge/synopsys: dw-hdmi: Use bridge->mode_valid() callback 2017-06-05 12:09:50 +05:30
inno_hdmi.c drm/rockchip: Refactor the component match logic. 2017-03-24 14:48:58 -04:00
inno_hdmi.h drm/rockchip: hdmi: add Innosilicon HDMI support 2016-02-18 13:56:43 +08:00
rockchip_drm_drv.c drm/rockchip: Fix suspend crash when drm is not bound 2017-08-09 13:59:25 -04:00
rockchip_drm_drv.h Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next-fixes 2017-06-20 11:50:41 -04:00
rockchip_drm_fb.c Merge airlied/drm-next into drm-misc-next 2017-02-26 21:34:42 +01:00
rockchip_drm_fb.h drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
rockchip_drm_fbdev.c drm/fb-helper: Automatically clean up fb_info 2017-02-07 21:36:28 +01:00
rockchip_drm_fbdev.h drm/rockchip: respect CONFIG_DRM_FBDEV_EMULATION 2016-01-22 08:45:31 +08:00
rockchip_drm_gem.c drm/rockchip: gem: add the lacks lock and trivial changes 2017-06-01 14:48:22 +08:00
rockchip_drm_gem.h drm/rockchip: Do not use DMA mapping API if attached to IOMMU domain 2017-02-15 08:52:13 +08:00
rockchip_drm_psr.c drm/rockchip: Fix up bug in psr state machine 2016-09-21 06:55:49 -07:00
rockchip_drm_psr.h drm/rockchip: Don't key off vblank for psr 2016-09-21 06:55:47 -07:00
rockchip_drm_vop.c drm/rockchip: vop: report error when check resource error 2017-08-04 15:39:32 +08:00
rockchip_drm_vop.h drm/rockchip: vop: fix NV12 video display error 2017-08-04 15:39:10 +08:00
rockchip_vop_reg.c drm/rockchip: Correct vop out_mode configure 2017-05-31 11:13:34 +08:00
rockchip_vop_reg.h drm/rockchip: vop: add rk3399 vop support 2016-08-23 11:44:29 -04:00