diff options
author | Christian König <christian.koenig@amd.com> | 2020-11-02 13:01:53 +0100 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2020-11-04 11:22:46 +0100 |
commit | 586052b0a6062e2fa98189d7f24d8cb9ccf4258b (patch) | |
tree | f5a670bbb0fe611e3b8aeebfb8efc7292e37adc7 /include/drm/ttm/ttm_bo_api.h | |
parent | d74252bb8f0e38194e7457f7b4e5a8a33514bc24 (diff) | |
download | linux-586052b0a6062e2fa98189d7f24d8cb9ccf4258b.tar.bz2 |
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 'include/drm/ttm/ttm_bo_api.h')
-rw-r--r-- | include/drm/ttm/ttm_bo_api.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 37102e45e496..4637357ba856 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h @@ -195,6 +195,7 @@ struct ttm_bo_kmap_obj { * * @interruptible: Sleep interruptible if sleeping. * @no_wait_gpu: Return immediately if the GPU is busy. + * @gfp_retry_mayfail: Set the __GFP_RETRY_MAYFAIL when allocation pages. * @resv: Reservation object to allow reserved evictions with. * @flags: Including the following flags * @@ -204,6 +205,7 @@ struct ttm_bo_kmap_obj { struct ttm_operation_ctx { bool interruptible; bool no_wait_gpu; + bool gfp_retry_mayfail; struct dma_resv *resv; uint64_t bytes_moved; uint32_t flags; |