drm/ttm: rework no_retry handling v2
authorChristian König <christian.koenig@amd.com>
Mon, 2 Nov 2020 12:01:53 +0000 (13:01 +0100)
committerChristian König <christian.koenig@amd.com>
Wed, 4 Nov 2020 10:22:46 +0000 (11:22 +0100)
commit586052b0a6062e2fa98189d7f24d8cb9ccf4258b
treef5a670bbb0fe611e3b8aeebfb8efc7292e37adc7
parentd74252bb8f0e38194e7457f7b4e5a8a33514bc24
drm/ttm: rework no_retry handling v2

During eviction we do want to trigger the OOM killer.

Only while doing new allocations we should try to avoid that and
return -ENOMEM to the application.

v2: rename the flag to gfp_retry_mayfail.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/398685/
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/ttm/ttm_pool.c
drivers/gpu/drm/ttm/ttm_tt.c
include/drm/ttm/ttm_bo_api.h
include/drm/ttm/ttm_bo_driver.h