2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-03 11:13:56 +08:00
linux-next/drivers/gpu/drm
Chris Wilson c84c9029d7 drm/i915/ringbuffer: EMIT_INVALIDATE *before* switch context
Despite what I think the prm recommends, commit f2253bd985
("drm/i915/ringbuffer: EMIT_INVALIDATE after switch context") turned out
to be a huge mistake when enabling Ironlake contexts as the GPU would
hang on either a MI_FLUSH or PIPE_CONTROL immediately following the
MI_SET_CONTEXT of an active mesa context (more vanilla contexts, e.g.
simple rendercopies with igt, do not suffer).

Ville found the following clue,

  "[DevCTG+]: For the invalidate operation of the pipe control, the
   following pointers are affected. The
   invalidate operation affects the restore of these packets. If the pipe
   control invalidate operation is completed
   before the context save, the indirect pointers will not be restored from
   memory.
   1. Pipeline State Pointer
   2. Media State Pointer
   3. Constant Buffer Packet"

which suggests by us emitting the INVALIDATE prior to the MI_SET_CONTEXT,
we prevent the context-restore from chasing the dangling pointers within
the image, and explains why this likely prevents the GPU hang.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190419111749.3910-1-chris@chris-wilson.co.uk
(cherry picked from commit 928f8f4231 in drm-intel-next)
Cc: stable@vger.kernel.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111014
Fixes: f2253bd985 ("drm/i915/ringbuffer: EMIT_INVALIDATE after switch context")
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-07-02 14:46:29 +02:00
..
amd drm/amdgpu: return 0 by default in amdgpu_pm_load_smu_firmware 2019-06-12 20:39:49 -05:00
arc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
arm SPDX update for 5.2-rc4 2019-06-08 12:52:42 -07:00
armada treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
aspeed treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ast treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
atmel-hlcdc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
bochs treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
bridge treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cirrus treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 377 2019-06-05 17:37:10 +02:00
etnaviv treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
exynos treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fsl-dcu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
gma500 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
hisilicon treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
i2c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
i810 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
i915 drm/i915/ringbuffer: EMIT_INVALIDATE *before* switch context 2019-07-02 14:46:29 +02:00
imx drm/imx: ipuv3-plane: fix atomic update status query for non-plus i.MX6Q 2019-05-27 15:13:57 +02:00
lib
lima drm/lima: Make lima_sched_ops static 2019-04-17 20:56:40 +08:00
mediatek Merge branch 'mediatek-drm-fixes-5.2' of https://github.com/ckhu-mediatek/linux.git-tags into drm-fixes 2019-06-12 18:22:28 +02:00
meson meson: A few G12A fixes across the driver (Neil) 2019-06-14 11:36:30 +02:00
mga treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mgag200 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 377 2019-06-05 17:37:10 +02:00
msm treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
mxsfb treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
nouveau Merge branch 'linux-5.2' of git://github.com/skeggsb/linux into drm-fixes 2019-06-07 17:16:00 +10:00
omapdrm treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
panel treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
panfrost drm/panfrost: Make sure a BO is only unmapped when appropriate 2019-06-18 09:26:28 -06:00
pl111 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
qxl qxl: Drop WARN when u/s tries to mmap a prime buffer (Gerd) 2019-05-30 10:51:19 +10:00
r128 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
radeon treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 191 2019-05-30 11:29:21 -07:00
rcar-du drm: rcar-du: lvds: Set LVEN and LVRES bits together on D3 2019-03-28 06:12:42 +02:00
rockchip treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
savage treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
scheduler drm/sched: Fix description of drm_sched_stop 2019-04-23 11:15:38 -05:00
selftests treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
shmobile video: backlight: Remove useless BACKLIGHT_LCD_SUPPORT kernel symbol 2019-04-03 11:15:57 +01:00
sis treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
sti treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
stm treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
sun4i treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
tdfx treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
tegra treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tilcdc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tinydrm treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ttm drm pull request for 5.2 2019-05-08 21:35:19 -07:00
tve200 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 443 2019-06-05 17:37:17 +02:00
udl treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 262 2019-06-05 17:30:28 +02:00
v3d treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
vboxvideo drm pull request for 5.2 2019-05-08 21:35:19 -07:00
vc4 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vgem treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
via treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
virtio drm/virtio: move drm_connector_update_edid_property() call 2019-06-26 11:05:05 +02:00
vkms treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
vmwgfx drm/vmwgfx: fix a warning due to missing dma_parms 2019-06-11 17:00:53 +02:00
xen treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
zte treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c drm: don't block fb changes for async plane updates 2019-06-04 10:15:29 +02:00
drm_atomic_state_helper.c
drm_atomic_uapi.c drm/atomic: -EACCESS for lease-denied crtc lookup 2019-04-24 11:31:17 +02:00
drm_atomic.c drm: Add drm_atomic_get_old/new_private_obj_state 2019-04-29 12:35:56 +01:00
drm_auth.c - fb_helper: Fix NULL deref in legacy drivers (Noralf) 2019-04-26 11:35:44 +10:00
drm_blend.c
drm_bridge.c
drm_bufs.c drm: return -EFAULT if copy_to_user() fails 2019-06-18 13:08:48 -04:00
drm_cache.c
drm_client.c drm/client: Rename drm_client_add() to drm_client_register() 2019-04-11 16:14:49 +02:00
drm_color_mgmt.c
drm_connector.c drm: Fix timestamp docs for variable refresh properties. 2019-05-07 10:39:14 -05:00
drm_context.c
drm_crtc_helper_internal.h
drm_crtc_helper.c
drm_crtc_internal.h drm/atomic: Wire file_priv through for property changes 2019-04-24 11:30:52 +02:00
drm_crtc.c drm/lease: Make sure implicit planes are leased 2019-04-24 11:30:32 +02:00
drm_damage_helper.c
drm_debugfs_crc.c
drm_debugfs.c
drm_dma.c
drm_dp_aux_dev.c
drm_dp_cec.c
drm_dp_dual_mode_helper.c
drm_dp_helper.c
drm_dp_mst_topology.c
drm_drv.c drm/legacy: move init/destroy of struct members into legacy file 2019-04-24 12:32:18 +10:00
drm_dsc.c
drm_dumb_buffers.c
drm_edid_load.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 102 2019-05-24 17:39:00 +02:00
drm_edid.c drm: add fallback override/firmware EDID modes workaround 2019-06-12 13:26:25 +03:00
drm_encoder_slave.c
drm_encoder.c
drm_fb_cma_helper.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
drm_fb_helper.c drm/fb-helper: Fix drm_fb_helper_firmware_config() NULL pointer deref 2019-04-24 15:57:43 +02:00
drm_file.c drm/legacy: remove some legacy lock struct members 2019-04-24 12:36:32 +10:00
drm_flip_work.c
drm_format_helper.c drm: add drm_format_helper.c to kerneldoc 2019-04-17 09:39:22 +02:00
drm_fourcc.c drm/fourcc: Fix conflicting Y41x definitions 2019-03-21 09:49:04 +01:00
drm_framebuffer.c
drm_gem_cma_helper.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
drm_gem_framebuffer_helper.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
drm_gem_shmem_helper.c drm/gem_shmem: Use a writecombine mapping for ->vaddr 2019-06-10 09:14:01 -06:00
drm_gem.c drm/gem: Fix sphinx warnings 2019-04-25 10:02:10 -04:00
drm_hashtab.c
drm_internal.h drm: allow removal of legacy codepaths (v4.1) 2019-04-24 12:33:15 +10:00
drm_ioc32.c drm: return -EFAULT if copy_to_user() fails 2019-06-18 13:08:48 -04:00
drm_ioctl.c drm: introduce a capability flag for syncobj timeline support 2019-05-02 12:36:47 +10:00
drm_irq.c drm: allow removal of legacy codepaths (v4.1) 2019-04-24 12:33:15 +10:00
drm_kms_helper_common.c
drm_lease.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
drm_legacy_misc.c drm/legacy: remove some legacy lock struct members 2019-04-24 12:36:32 +10:00
drm_legacy.h drm/legacy: remove some legacy lock struct members 2019-04-24 12:36:32 +10:00
drm_lock.c drm/legacy: move lock cleanup for master into lock file (v2) 2019-04-24 12:32:15 +10:00
drm_memory.c drm: fallback to dma_alloc_coherent when memory encryption is active 2019-04-01 11:43:42 +02:00
drm_mipi_dsi.c
drm_mm.c drm: Simplify stacktrace handling 2019-04-29 12:37:53 +02:00
drm_mode_config.c drm: Expose "FB_DAMAGE_CLIPS" property to atomic aware user-space only 2019-04-16 15:13:23 -07:00
drm_mode_object.c drm/atomic: Wire file_priv through for property changes 2019-04-24 11:30:52 +02:00
drm_modes.c
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Add quirk for GPD MicroPC 2019-06-08 15:07:06 +02:00
drm_panel.c
drm_pci.c
drm_plane_helper.c
drm_plane.c drm/lease: Make sure implicit planes are leased 2019-04-24 11:30:32 +02:00
drm_prime.c
drm_print.c drm: Add a helper function for printing a debugfs_regset32. 2019-04-01 10:44:34 -07:00
drm_probe_helper.c drm: add fallback override/firmware EDID modes workaround 2019-06-12 13:26:25 +03:00
drm_property.c
drm_rect.c
drm_scatter.c
drm_scdc_helper.c
drm_simple_kms_helper.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
drm_syncobj.c drm pull request for 5.2 2019-05-08 21:35:19 -07:00
drm_sysfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428 2019-06-05 17:37:16 +02:00
drm_trace_points.c
drm_trace.h
drm_vblank.c
drm_vm.c drm: allow removal of legacy codepaths (v4.1) 2019-04-24 12:33:15 +10:00
drm_vma_manager.c
drm_writeback.c
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile Merge branch 'drm-legacy-cleanup' of git://people.freedesktop.org/~airlied/linux into drm-next 2019-04-24 10:36:22 +02:00