mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/ttm: nuke memory type flags
It's not supported to specify more than one of those flags. So it never made sense to make this a flag in the first place. Nuke the flags and specify directly which memory type to use. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/389826/?series=81551&rev=1
This commit is contained in:
@@ -33,49 +33,57 @@
|
||||
static const struct ttm_place vram_placement_flags = {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = TTM_PL_FLAG_VRAM | TTM_PL_FLAG_CACHED
|
||||
.mem_type = TTM_PL_VRAM,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
};
|
||||
|
||||
static const struct ttm_place vram_ne_placement_flags = {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = TTM_PL_FLAG_VRAM | TTM_PL_FLAG_CACHED | TTM_PL_FLAG_NO_EVICT
|
||||
.mem_type = TTM_PL_VRAM,
|
||||
.flags = TTM_PL_FLAG_CACHED | TTM_PL_FLAG_NO_EVICT
|
||||
};
|
||||
|
||||
static const struct ttm_place sys_placement_flags = {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED
|
||||
.mem_type = TTM_PL_SYSTEM,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
};
|
||||
|
||||
static const struct ttm_place sys_ne_placement_flags = {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED | TTM_PL_FLAG_NO_EVICT
|
||||
.mem_type = TTM_PL_SYSTEM,
|
||||
.flags = TTM_PL_FLAG_CACHED | TTM_PL_FLAG_NO_EVICT
|
||||
};
|
||||
|
||||
static const struct ttm_place gmr_placement_flags = {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = VMW_PL_FLAG_GMR | TTM_PL_FLAG_CACHED
|
||||
.mem_type = VMW_PL_GMR,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
};
|
||||
|
||||
static const struct ttm_place gmr_ne_placement_flags = {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = VMW_PL_FLAG_GMR | TTM_PL_FLAG_CACHED | TTM_PL_FLAG_NO_EVICT
|
||||
.mem_type = VMW_PL_GMR,
|
||||
.flags = TTM_PL_FLAG_CACHED | TTM_PL_FLAG_NO_EVICT
|
||||
};
|
||||
|
||||
static const struct ttm_place mob_placement_flags = {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = VMW_PL_FLAG_MOB | TTM_PL_FLAG_CACHED
|
||||
.mem_type = VMW_PL_MOB,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
};
|
||||
|
||||
static const struct ttm_place mob_ne_placement_flags = {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = VMW_PL_FLAG_MOB | TTM_PL_FLAG_CACHED | TTM_PL_FLAG_NO_EVICT
|
||||
.mem_type = VMW_PL_MOB,
|
||||
.flags = TTM_PL_FLAG_CACHED | TTM_PL_FLAG_NO_EVICT
|
||||
};
|
||||
|
||||
struct ttm_placement vmw_vram_placement = {
|
||||
@@ -89,11 +97,13 @@ static const struct ttm_place vram_gmr_placement_flags[] = {
|
||||
{
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = TTM_PL_FLAG_VRAM | TTM_PL_FLAG_CACHED
|
||||
.mem_type = TTM_PL_VRAM,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
}, {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = VMW_PL_FLAG_GMR | TTM_PL_FLAG_CACHED
|
||||
.mem_type = VMW_PL_GMR,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
}
|
||||
};
|
||||
|
||||
@@ -101,11 +111,13 @@ static const struct ttm_place gmr_vram_placement_flags[] = {
|
||||
{
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = VMW_PL_FLAG_GMR | TTM_PL_FLAG_CACHED
|
||||
.mem_type = VMW_PL_GMR,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
}, {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = TTM_PL_FLAG_VRAM | TTM_PL_FLAG_CACHED
|
||||
.mem_type = TTM_PL_VRAM,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
}
|
||||
};
|
||||
|
||||
@@ -120,12 +132,14 @@ static const struct ttm_place vram_gmr_ne_placement_flags[] = {
|
||||
{
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = TTM_PL_FLAG_VRAM | TTM_PL_FLAG_CACHED |
|
||||
.mem_type = TTM_PL_VRAM,
|
||||
.flags = TTM_PL_FLAG_CACHED |
|
||||
TTM_PL_FLAG_NO_EVICT
|
||||
}, {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = VMW_PL_FLAG_GMR | TTM_PL_FLAG_CACHED |
|
||||
.mem_type = VMW_PL_GMR,
|
||||
.flags = TTM_PL_FLAG_CACHED |
|
||||
TTM_PL_FLAG_NO_EVICT
|
||||
}
|
||||
};
|
||||
@@ -169,19 +183,23 @@ static const struct ttm_place evictable_placement_flags[] = {
|
||||
{
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED
|
||||
.mem_type = TTM_PL_SYSTEM,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
}, {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = TTM_PL_FLAG_VRAM | TTM_PL_FLAG_CACHED
|
||||
.mem_type = TTM_PL_VRAM,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
}, {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = VMW_PL_FLAG_GMR | TTM_PL_FLAG_CACHED
|
||||
.mem_type = VMW_PL_GMR,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
}, {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = VMW_PL_FLAG_MOB | TTM_PL_FLAG_CACHED
|
||||
.mem_type = VMW_PL_MOB,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
}
|
||||
};
|
||||
|
||||
@@ -189,15 +207,18 @@ static const struct ttm_place nonfixed_placement_flags[] = {
|
||||
{
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED
|
||||
.mem_type = TTM_PL_SYSTEM,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
}, {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = VMW_PL_FLAG_GMR | TTM_PL_FLAG_CACHED
|
||||
.mem_type = VMW_PL_GMR,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
}, {
|
||||
.fpfn = 0,
|
||||
.lpfn = 0,
|
||||
.flags = VMW_PL_FLAG_MOB | TTM_PL_FLAG_CACHED
|
||||
.mem_type = VMW_PL_MOB,
|
||||
.flags = TTM_PL_FLAG_CACHED
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user