Rev 1125 | Rev 1179 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1125 | Rev 1128 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | #include "drmP.h" |
28 | #include "drmP.h" |
29 | #include "radeon_drm.h" |
29 | #include "radeon_drm.h" |
30 | #include "radeon.h" |
30 | #include "radeon.h" |
31 | #include "radeon_reg.h" |
31 | #include "radeon_reg.h" |
Line 32... | Line -... | ||
32 | - | ||
33 | #if 0 |
32 | |
34 | /* |
33 | /* |
35 | * Common GART table functions. |
34 | * Common GART table functions. |
36 | */ |
35 | */ |
37 | int radeon_gart_table_ram_alloc(struct radeon_device *rdev) |
36 | int radeon_gart_table_ram_alloc(struct radeon_device *rdev) |
38 | { |
37 | { |
Line 39... | Line 38... | ||
39 | void *ptr; |
38 | void *ptr; |
40 | 39 | ||
41 | ptr = pci_alloc_consistent(rdev->pdev, rdev->gart.table_size, |
40 | // ptr = pci_alloc_consistent(rdev->pdev, rdev->gart.table_size, |
42 | &rdev->gart.table_addr); |
41 | // &rdev->gart.table_addr); |
43 | if (ptr == NULL) { |
42 | if (ptr == NULL) { |
44 | return -ENOMEM; |
43 | return -ENOMEM; |
45 | } |
44 | } |
Line 65... | Line 64... | ||
65 | rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740) { |
64 | rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740) { |
66 | set_memory_wb((unsigned long)rdev->gart.table.ram.ptr, |
65 | set_memory_wb((unsigned long)rdev->gart.table.ram.ptr, |
67 | rdev->gart.table_size >> PAGE_SHIFT); |
66 | rdev->gart.table_size >> PAGE_SHIFT); |
68 | } |
67 | } |
69 | #endif |
68 | #endif |
70 | pci_free_consistent(rdev->pdev, rdev->gart.table_size, |
69 | // pci_free_consistent(rdev->pdev, rdev->gart.table_size, |
71 | (void *)rdev->gart.table.ram.ptr, |
70 | // (void *)rdev->gart.table.ram.ptr, |
72 | rdev->gart.table_addr); |
71 | // rdev->gart.table_addr); |
73 | rdev->gart.table.ram.ptr = NULL; |
72 | rdev->gart.table.ram.ptr = NULL; |
74 | rdev->gart.table_addr = 0; |
73 | rdev->gart.table_addr = 0; |
75 | } |
74 | } |
76 | #endif |
- | |
Line 77... | Line 75... | ||
77 | 75 | ||
78 | int radeon_gart_table_vram_alloc(struct radeon_device *rdev) |
76 | int radeon_gart_table_vram_alloc(struct radeon_device *rdev) |
79 | { |
77 | { |
80 | uint32_t gpu_addr; |
78 | uint32_t gpu_addr; |