linux-stable/drivers/gpu/drm
Dave Gordon 4d75787b87 drm/i915/guc: (re)initialise doorbell h/w when enabling GuC submission
During a hibernate/resume cycle, the whole system is reset, including
the GuC and the doorbell hardware. Then the system is booted up, drivers
are loaded, etc -- the GuC firmware may be loaded and set running at
this point. But then, the booted kernel is replaced by the hibernated
image, and this resumed kernel will also try to reload the GuC firmware
(which will fail). To recover, we reset the GuC and try again (which
should work). But this GuC reset doesn't also reset the doorbell
hardware, so it can be left in a state inconsistent with that assumed
by the driver and/or the newly-loaded GuC firmware.

It would be better if the GuC reset also cleared all doorbell state,
but that's not how the hardware currently works; also, the driver cannot
directly reprogram the doorbell hardware (only the GuC can do that).

So this patch cycles through all doorbells, assigning and releasing each
in turn, so that all the doorbell hardware is left in a consistent
state, no matter how it was programmed by the previously-running kernel
and/or GuC firmware.

v2: don't use kmap_atomic() now that client page 0 is kept mapped.

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1465837054-16245-2-git-send-email-david.s.gordon@intel.com
2016-06-14 15:04:08 +01:00
..
amd Merge branch 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux into drm-next 2016-05-27 16:03:48 +10:00
arc
arm drm/hlcd: Use lockless gem BO free callback 2016-05-31 13:28:36 +02:00
armada drm: Nuke ->vblank_disable_allowed 2016-05-21 07:03:31 +10:00
ast drm: Remove unused drm_device from drm_gem_object_lookup() 2016-05-17 08:47:30 +02:00
atmel-hlcdc drm: Drop crtc argument from __drm_atomic_helper_crtc_destroy_state 2016-05-17 08:56:41 +02:00
bochs drm: Remove unused drm_device from drm_gem_object_lookup() 2016-05-17 08:47:30 +02:00
bridge drm/bridge: Add Analogix anx78xx support 2016-05-12 11:32:14 +02:00
cirrus drm/cirrus: Drop redundnant gamma size check 2016-05-31 15:26:32 +02:00
etnaviv Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2016-05-23 11:48:48 -07:00
exynos drm: Nuke ->vblank_disable_allowed 2016-05-21 07:03:31 +10:00
fsl-dcu drm: Nuke ->vblank_disable_allowed 2016-05-21 07:03:31 +10:00
gma500 drm: Initialize a linear gamma table by default 2016-05-31 16:56:44 +02:00
hisilicon drm/hisilicon: Use lockless gem BO free callback 2016-05-31 13:28:58 +02:00
i2c
i810
i915 drm/i915/guc: (re)initialise doorbell h/w when enabling GuC submission 2016-06-14 15:04:08 +01:00
imx imx-drm probing fix 2016-05-25 12:36:20 +10:00
mediatek drm/mediatek: Use lockless gem BO free callback 2016-05-31 13:29:20 +02:00
mga
mgag200 drm: Remove unused drm_device from drm_gem_object_lookup() 2016-05-17 08:47:30 +02:00
msm Merge tag 'topic/drm-misc-2016-06-01' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-06-02 07:50:23 +10:00
nouveau vga_switcheroo: Add helper for deferred probing 2016-05-31 13:15:57 +02:00
omapdrm drm: Drop plane argument from __drm_atomic_helper_plane_destroy_state 2016-05-17 08:56:55 +02:00
panel drm/panel: simple: Add support for TPK U.S.A. LLC Fusion 7" and 10.1" panels 2016-05-12 11:32:14 +02:00
qxl drm/qxl: Don't set a gamma table size 2016-05-31 15:26:57 +02:00
r128
radeon Merge tag 'topic/drm-misc-2016-06-01' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-06-02 07:50:23 +10:00
rcar-du drm: Drop plane argument from __drm_atomic_helper_plane_destroy_state 2016-05-17 08:56:55 +02:00
rockchip drm: Nuke ->vblank_disable_allowed 2016-05-21 07:03:31 +10:00
savage
shmobile
sis
sti remove lots of IS_ERR_VALUE abuses 2016-05-27 15:26:11 -07:00
sun4i
tdfx
tegra Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2016-05-23 11:48:48 -07:00
tilcdc remove lots of IS_ERR_VALUE abuses 2016-05-27 15:26:11 -07:00
ttm Linux 4.6-rc7 2016-05-09 13:49:56 +10:00
udl drm: Remove unused drm_device from drm_gem_object_lookup() 2016-05-17 08:47:30 +02:00
vc4 Merge tag 'topic/drm-misc-2016-06-01' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-06-02 07:50:23 +10:00
vgem drm/vgem: Use lockless gem BO free callback 2016-05-31 15:28:10 +02:00
via
virtio virtio-gpu: fix output lookup 2016-05-31 09:30:37 +02:00
vmwgfx drm/vmwgfx: Report vmwgfx version to vmware.log 2016-05-20 17:40:07 +02:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic.c drm: Avoid connector reference imbalance on error path 2016-05-18 10:42:01 +02:00
drm_atomic_helper.c drm/atomic-helper: Do not call ->mode_fixup for CRTC which will be disabled 2016-05-30 10:44:15 +02:00
drm_auth.c
drm_bridge.c
drm_bufs.c
drm_cache.c
drm_context.c
drm_crtc.c drm: Initialize a linear gamma table by default 2016-05-31 16:56:44 +02:00
drm_crtc_helper.c drm: Make drm_encoder_helper_funcs optional 2016-05-10 08:54:09 +02:00
drm_crtc_internal.h
drm_debugfs.c
drm_dma.c
drm_dp_aux_dev.c
drm_dp_dual_mode_helper.c drm: Add helper for DP++ adaptors 2016-05-23 11:10:46 +03:00
drm_dp_helper.c
drm_dp_mst_topology.c Linux 4.6-rc7 2016-05-09 13:49:56 +10:00
drm_drv.c
drm_edid.c drm/edid: add displayid detailed 1 timings to the modelist. (v1.1) 2016-05-23 11:35:31 +10:00
drm_edid_load.c Fix annoyingly awkward typo in drm_edid_load.c 2016-05-30 09:59:28 +02:00
drm_encoder_slave.c
drm_fb_cma_helper.c drm/fb-cma-helper: Add function drm_fb_cma_create_with_funcs() 2016-05-17 09:08:32 +02:00
drm_fb_helper.c drm/fb-helper: Remove dead code in setcolreg 2016-05-31 15:24:58 +02:00
drm_flip_work.c
drm_fops.c
drm_gem.c drm: Remove unused drm_device from drm_gem_object_lookup() 2016-05-17 08:47:30 +02:00
drm_gem_cma_helper.c drm: Remove unused drm_device from drm_gem_object_lookup() 2016-05-17 08:47:30 +02:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c
drm_irq.c Merge branch 'drm-intel-next' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-06-02 07:58:36 +10:00
drm_kms_helper_common.c
drm_legacy.h
drm_lock.c
drm_memory.c
drm_mipi_dsi.c
drm_mm.c drm/mm: avoid possible null pointer dereference 2016-05-23 14:56:11 +02:00
drm_modes.c
drm_modeset_lock.c drm/doc: Unify KMS Locking docs 2016-05-30 11:18:26 +02:00
drm_of.c
drm_panel.c drm/panel: Flesh out kerneldoc 2016-05-06 16:04:48 +02:00
drm_pci.c
drm_plane_helper.c
drm_platform.c
drm_prime.c drm: Remove unused drm_device from drm_gem_object_lookup() 2016-05-17 08:47:30 +02:00
drm_probe_helper.c
drm_rect.c
drm_scatter.c
drm_sysfs.c
drm_trace.h
drm_trace_points.c
drm_vm.c
drm_vma_manager.c
Kconfig drm/mediatek: Add DRM Driver for Mediatek SoC MT8173. 2016-05-06 17:47:35 +02:00
Makefile Merge tag 'drm-intel-next-fixes-2016-05-25' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-05-27 16:08:38 +10:00