Commit 95f8138d authored by Thomas Hellström's avatar Thomas Hellström

drm/ttm: Use the BIT macro for the TTM_TT_FLAGs

New code is recommended to use the BIT macro instead of the explicit
shifts. Change the older defines so that we can keep the style consistent
with upcoming changes.

v2:
- Also change the value of the _PRIV_POPULATED bit (Christian König)
Signed-off-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230307144621.10748-4-thomas.hellstrom@linux.intel.com
parent 66ab5757
...@@ -83,12 +83,12 @@ struct ttm_tt { ...@@ -83,12 +83,12 @@ struct ttm_tt {
* set by TTM after ttm_tt_populate() has successfully returned, and is * set by TTM after ttm_tt_populate() has successfully returned, and is
* then unset when TTM calls ttm_tt_unpopulate(). * then unset when TTM calls ttm_tt_unpopulate().
*/ */
#define TTM_TT_FLAG_SWAPPED (1 << 0) #define TTM_TT_FLAG_SWAPPED BIT(0)
#define TTM_TT_FLAG_ZERO_ALLOC (1 << 1) #define TTM_TT_FLAG_ZERO_ALLOC BIT(1)
#define TTM_TT_FLAG_EXTERNAL (1 << 2) #define TTM_TT_FLAG_EXTERNAL BIT(2)
#define TTM_TT_FLAG_EXTERNAL_MAPPABLE (1 << 3) #define TTM_TT_FLAG_EXTERNAL_MAPPABLE BIT(3)
#define TTM_TT_FLAG_PRIV_POPULATED (1U << 31) #define TTM_TT_FLAG_PRIV_POPULATED BIT(4)
uint32_t page_flags; uint32_t page_flags;
/** @num_pages: Number of pages in the page array. */ /** @num_pages: Number of pages in the page array. */
uint32_t num_pages; uint32_t num_pages;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment