summaryrefslogtreecommitdiff
path: root/include/drm/ttm/ttm_tt.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-09-15 04:42:30 +0300
committerDave Airlie <airlied@redhat.com>2020-09-16 02:35:47 +0300
commit3a4ab168a5df5c9532763ac26cde5c2ad06ca1e5 (patch)
tree061db5a5cf3b43865bf0ee80152754cacbe05f56 /include/drm/ttm/ttm_tt.h
parent9e9a153bdf2555a931fd37678a8e44d170a5d943 (diff)
downloadlinux-3a4ab168a5df5c9532763ac26cde5c2ad06ca1e5.tar.xz
drm/ttm: split bound/populated flags.
Move bound up into the bo object, and keep populated with the tt object. The ghost object handling needs to follow the flags at the bo level now instead of it being part of the ttm tt object. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-7-airlied@gmail.com
Diffstat (limited to 'include/drm/ttm/ttm_tt.h')
-rw-r--r--include/drm/ttm/ttm_tt.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
index 1ac56730d952..94e16238c93d 100644
--- a/include/drm/ttm/ttm_tt.h
+++ b/include/drm/ttm/ttm_tt.h
@@ -70,26 +70,22 @@ struct ttm_tt {
struct sg_table *sg; /* for SG objects via dma-buf */
struct file *swap_storage;
enum ttm_caching_state caching_state;
- enum {
- tt_bound,
- tt_unbound,
- tt_unpopulated,
- } _state;
+ bool populated;
};
static inline bool ttm_tt_is_populated(struct ttm_tt *tt)
{
- return tt->_state != tt_unpopulated;
+ return tt->populated;
}
static inline void ttm_tt_set_unpopulated(struct ttm_tt *tt)
{
- tt->_state = tt_unpopulated;
+ tt->populated = false;
}
static inline void ttm_tt_set_populated(struct ttm_tt *tt)
{
- tt->_state = tt_unbound;
+ tt->populated = true;
}
/**