WSL2-Linux-Kernel/include/drm
Emily Deng 8ee3a52e3f drm/gpu-sched: fix force APP kill hang(v4)
issue:
there are VMC page fault occurred if force APP kill during
3dmark test, the cause is in entity_fini we manually signal
all those jobs in entity's queue which confuse the sync/dep
mechanism:

1)page fault occurred in sdma's clear job which operate on
shadow buffer, and shadow buffer's Gart table is cleaned by
ttm_bo_release since the fence in its reservation was fake signaled
by entity_fini() under the case of SIGKILL received.

2)page fault occurred in gfx' job because during the lifetime
of gfx job we manually fake signal all jobs from its entity
in entity_fini(), thus the unmapping/clear PTE job depend on those
result fence is satisfied and sdma start clearing the PTE and lead
to GFX page fault.

fix:
1)should at least wait all jobs already scheduled complete in entity_fini()
if SIGKILL is the case.

2)if a fence signaled and try to clear some entity's dependency, should
set this entity guilty to prevent its job really run since the dependency
is fake signaled.

v2:
splitting drm_sched_entity_fini() into two functions:
1)The first one is does the waiting, removes the entity from the
runqueue and returns an error when the process was killed.
2)The second one then goes over the entity, install it as
completion signal for the remaining jobs and signals all jobs
with an error code.

v3:
1)Replace the fini1 and fini2 with better name
2)Call the first part before the VM teardown in
amdgpu_driver_postclose_kms() and the second part
after the VM teardown
3)Keep the original function drm_sched_entity_fini to
refine the code.

v4:
1)Rename entity->finished to entity->last_scheduled;
2)Rename drm_sched_entity_fini_job_cb() to
drm_sched_entity_kill_jobs_cb();
3)Pass NULL to drm_sched_entity_fini_job_cb() if -ENOENT;
4)Replace the type of entity->fini_status with "int";
5)Remove the check about entity->finished.

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2018-05-15 13:43:17 -05:00
..
bridge
i2c
tinydrm
ttm drm/ttm: Export the ttm_k[un]map_atomic_prot API. 2018-03-22 11:10:06 +01:00
amd_asic_type.h
ati_pcigart.h
drmP.h
drm_agpsupport.h
drm_atomic.h
drm_atomic_helper.h
drm_auth.h
drm_blend.h
drm_bridge.h
drm_cache.h
drm_color_mgmt.h
drm_connector.h
drm_crtc.h
drm_crtc_helper.h
drm_debugfs.h
drm_debugfs_crc.h
drm_device.h
drm_displayid.h
drm_dp_dual_mode_helper.h
drm_dp_helper.h
drm_dp_mst_helper.h
drm_drv.h
drm_edid.h
drm_encoder.h
drm_encoder_slave.h
drm_fb_cma_helper.h
drm_fb_helper.h
drm_file.h
drm_fixed.h
drm_flip_work.h
drm_fourcc.h
drm_framebuffer.h
drm_gem.h
drm_gem_cma_helper.h
drm_gem_framebuffer_helper.h
drm_global.h
drm_hashtab.h
drm_hdcp.h
drm_ioctl.h
drm_irq.h
drm_lease.h
drm_legacy.h
drm_mipi_dsi.h
drm_mm.h
drm_mode_config.h
drm_mode_object.h
drm_modes.h
drm_modeset_helper.h
drm_modeset_helper_vtables.h
drm_modeset_lock.h
drm_of.h
drm_os_linux.h
drm_panel.h
drm_pci.h
drm_pciids.h
drm_plane.h
drm_plane_helper.h
drm_prime.h
drm_print.h
drm_property.h
drm_rect.h
drm_scdc_helper.h
drm_simple_kms_helper.h
drm_syncobj.h
drm_sysfs.h
drm_utils.h
drm_vblank.h
drm_vma_manager.h
gma_drm.h
gpu_scheduler.h drm/gpu-sched: fix force APP kill hang(v4) 2018-05-15 13:43:17 -05:00
i915_component.h
i915_drm.h
i915_pciids.h
intel-gtt.h
intel_lpe_audio.h
spsc_queue.h