drm/amdgpu: set snooped flags only on system addresses v2
Subsystems (2)
PATCH 1/1 drm/amdgpu: set snooped flags only on system addresses v2
From: Christian König <[email protected]>
Not necessary for VRAM.
v2: no need to check if ttm is NULL.
Signed-off-by Christian König <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +4 -3
@@ -801,11 +801,12 @@ uint32_t amdgpu_ttm_tt_pte_flags(struct amdgpu_device *adev, struct ttm_tt *ttm,if (mem && mem->mem_type !=TTM_PL_SYSTEM ) flags |=AMDGPU_PTE_VALID ; -if (mem && mem->mem_type ==TTM_PL_TT ) +if (mem && mem->mem_type ==TTM_PL_TT ) { flags |=AMDGPU_PTE_SYSTEM ; -if (!ttm || ttm->caching_state == tt_cached) - flags |=AMDGPU_PTE_SNOOPED ; +if (ttm->caching_state == tt_cached) + flags |=AMDGPU_PTE_SNOOPED ; + }if (adev->asic_type >=CHIP_TOPAZ ) flags |=AMDGPU_PTE_EXECUTABLE ;
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Alex Deucher
AppliedQuoted 7 lines · Christian König
From: Christian König <[email protected]>
Not necessary for VRAM.
v2: no need to check if ttm is NULL.
Signed-off-by Christian König <[email protected]>
Applied the series. thanks!
Alex
Quoted 25 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +4
-4@@ -801,11 +801,12 @@ uint32_t amdgpu_ttm_tt_pte_flags(struct amdgpu_device *adev, struct ttm_tt *ttm,if (mem && mem->mem_type !=TTM_PL_SYSTEM ) flags |=AMDGPU_PTE_VALID ; -if (mem && mem->mem_type ==TTM_PL_TT ) +if (mem && mem->mem_type ==TTM_PL_TT ) { flags |=AMDGPU_PTE_SYSTEM ; -if (!ttm || ttm->caching_state == tt_cached) - flags |=AMDGPU_PTE_SNOOPED ; +if (ttm->caching_state == tt_cached) + flags |=AMDGPU_PTE_SNOOPED ; + }if (adev->asic_type >=CHIP_TOPAZ ) flags |=AMDGPU_PTE_EXECUTABLE ; --
Quoted 2 lines
2.5.0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel