summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm/ttm_pool.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2020-11-02 13:01:53 +0100
committerChristian König <christian.koenig@amd.com>2020-11-04 11:22:46 +0100
commit586052b0a6062e2fa98189d7f24d8cb9ccf4258b (patch)
treef5a670bbb0fe611e3b8aeebfb8efc7292e37adc7 /drivers/gpu/drm/ttm/ttm_pool.c
parentd74252bb8f0e38194e7457f7b4e5a8a33514bc24 (diff)
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/
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_pool.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index 1e50deefb5d5..44ec41aa78d6 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -367,7 +367,7 @@ int ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
if (tt->page_flags & TTM_PAGE_FLAG_ZERO_ALLOC)
gfp_flags |= __GFP_ZERO;
- if (tt->page_flags & TTM_PAGE_FLAG_NO_RETRY)
+ if (ctx->gfp_retry_mayfail)
gfp_flags |= __GFP_RETRY_MAYFAIL;
if (pool->use_dma32)