diff options
| author | Nirmoy Das <[email protected]> | 2024-08-16 15:51:53 +0200 |
|---|---|---|
| committer | Nirmoy Das <[email protected]> | 2024-08-19 17:49:00 +0200 |
| commit | decbfaf06db05fa1f9b33149ebb3c145b44e878f (patch) | |
| tree | eb2d280c10b5dd65790062c0f117a0173b8e83e1 /include | |
| parent | 6841a26e2c6715dc52a1cdd888e958dd2a92a5bc (diff) | |
drm/ttm: Add a flag to allow drivers to skip clear-on-free
Add TTM_TT_FLAG_CLEARED_ON_FREE, which DRM drivers can set before
releasing backing stores if they want to skip clear-on-free.
Cc: Matthew Auld <[email protected]>
Cc: Thomas Hellström <[email protected]>
Suggested-by: Christian König <[email protected]>
Reviewed-by: Christian König <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Nirmoy Das <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/ttm/ttm_tt.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h index 2b9d856ff388..cfaf49de2419 100644 --- a/include/drm/ttm/ttm_tt.h +++ b/include/drm/ttm/ttm_tt.h @@ -85,6 +85,9 @@ struct ttm_tt { * fault handling abuses the DMA api a bit and dma_map_attrs can't be * used to assure pgprot always matches. * + * TTM_TT_FLAG_CLEARED_ON_FREE: Set this if a drm driver handles + * clearing backing store + * * TTM_TT_FLAG_PRIV_POPULATED: TTM internal only. DO NOT USE. This is * set by TTM after ttm_tt_populate() has successfully returned, and is * then unset when TTM calls ttm_tt_unpopulate(). @@ -94,8 +97,9 @@ struct ttm_tt { #define TTM_TT_FLAG_EXTERNAL BIT(2) #define TTM_TT_FLAG_EXTERNAL_MAPPABLE BIT(3) #define TTM_TT_FLAG_DECRYPTED BIT(4) +#define TTM_TT_FLAG_CLEARED_ON_FREE BIT(5) -#define TTM_TT_FLAG_PRIV_POPULATED BIT(5) +#define TTM_TT_FLAG_PRIV_POPULATED BIT(6) uint32_t page_flags; /** @num_pages: Number of pages in the page array. */ uint32_t num_pages; |