diff options
author | Christian König <christian.koenig@amd.com> | 2016-09-08 16:40:38 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-14 22:10:43 +0300 |
commit | 7c732ea64993b9f37daff9bd95b552576304b6d9 (patch) | |
tree | b9db4a7462e31bda9697308c27cb7ff59544b397 /include/drm/ttm/ttm_placement.h | |
parent | 08614da7041eb59baf729bdcf07c2dbd3d80c63e (diff) | |
download | linux-7c732ea64993b9f37daff9bd95b552576304b6d9.tar.xz |
drm/ttm: move placement structures into ttm_placement.h
Makes more sense to keep that together.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/drm/ttm/ttm_placement.h')
-rw-r--r-- | include/drm/ttm/ttm_placement.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_placement.h b/include/drm/ttm/ttm_placement.h index 764158268f26..932be0c8086e 100644 --- a/include/drm/ttm/ttm_placement.h +++ b/include/drm/ttm/ttm_placement.h @@ -30,6 +30,9 @@ #ifndef _TTM_PLACEMENT_H_ #define _TTM_PLACEMENT_H_ + +#include <linux/types.h> + /* * Memory regions for data placement. */ @@ -69,4 +72,36 @@ #define TTM_PL_MASK_MEMTYPE (TTM_PL_MASK_MEM | TTM_PL_MASK_CACHING) +/** + * struct ttm_place + * + * @fpfn: first valid page frame number to put the object + * @lpfn: last valid page frame number to put the object + * @flags: memory domain and caching flags for the object + * + * Structure indicating a possible place to put an object. + */ +struct ttm_place { + unsigned fpfn; + unsigned lpfn; + uint32_t flags; +}; + +/** + * struct ttm_placement + * + * @num_placement: number of preferred placements + * @placement: preferred placements + * @num_busy_placement: number of preferred placements when need to evict buffer + * @busy_placement: preferred placements when need to evict buffer + * + * Structure indicating the placement you request for an object. + */ +struct ttm_placement { + unsigned num_placement; + const struct ttm_place *placement; + unsigned num_busy_placement; + const struct ttm_place *busy_placement; +}; + #endif |