Commit 0e97703c authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/radeon: add define for flags used in R600+ GTT

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1aab5514
...@@ -855,6 +855,10 @@ struct radeon_mec { ...@@ -855,6 +855,10 @@ struct radeon_mec {
#define R600_PTE_FRAG_64KB (4 << 7) #define R600_PTE_FRAG_64KB (4 << 7)
#define R600_PTE_FRAG_256KB (6 << 7) #define R600_PTE_FRAG_256KB (6 << 7)
/* flags used for GART page table entries on R600+ */
#define R600_PTE_GART ( R600_PTE_VALID | R600_PTE_SYSTEM | R600_PTE_SNOOPED \
| R600_PTE_READABLE | R600_PTE_WRITEABLE)
struct radeon_vm_pt { struct radeon_vm_pt {
struct radeon_bo *bo; struct radeon_bo *bo;
uint64_t addr; uint64_t addr;
......
...@@ -626,12 +626,6 @@ static void rs600_gart_fini(struct radeon_device *rdev) ...@@ -626,12 +626,6 @@ static void rs600_gart_fini(struct radeon_device *rdev)
radeon_gart_table_vram_free(rdev); radeon_gart_table_vram_free(rdev);
} }
#define R600_PTE_VALID (1 << 0)
#define R600_PTE_SYSTEM (1 << 1)
#define R600_PTE_SNOOPED (1 << 2)
#define R600_PTE_READABLE (1 << 5)
#define R600_PTE_WRITEABLE (1 << 6)
int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr) int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)
{ {
void __iomem *ptr = (void *)rdev->gart.ptr; void __iomem *ptr = (void *)rdev->gart.ptr;
...@@ -640,8 +634,7 @@ int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr) ...@@ -640,8 +634,7 @@ int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)
return -EINVAL; return -EINVAL;
} }
addr = addr & 0xFFFFFFFFFFFFF000ULL; addr = addr & 0xFFFFFFFFFFFFF000ULL;
addr |= R600_PTE_VALID | R600_PTE_SYSTEM | R600_PTE_SNOOPED; addr |= R600_PTE_GART;
addr |= R600_PTE_READABLE | R600_PTE_WRITEABLE;
writeq(addr, ptr + (i * 8)); writeq(addr, ptr + (i * 8));
return 0; return 0;
} }
......
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