aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_gart.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2014-07-17 06:01:07 -0400
committerAlex Deucher <alexander.deucher@amd.com>2014-08-05 08:53:32 -0400
commit77497f2735ad6e29c55475e15e9790dbfa2c2ef8 (patch)
tree4799ae3520773f139a24cf5ea539fede1fd5d54b /drivers/gpu/drm/radeon/radeon_gart.c
parenta3eb06dbca08e3fdad7039021ae03b46b215f22a (diff)
drm/radeon: Pass GART page flags to radeon_gart_set_page() explicitly
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_gart.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_gart.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
index b7d3e846cd76..d684642d900b 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon/radeon_gart.c
@@ -243,7 +243,8 @@ void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
243 page_base = rdev->gart.pages_addr[p]; 243 page_base = rdev->gart.pages_addr[p];
244 for (j = 0; j < (PAGE_SIZE / RADEON_GPU_PAGE_SIZE); j++, t++) { 244 for (j = 0; j < (PAGE_SIZE / RADEON_GPU_PAGE_SIZE); j++, t++) {
245 if (rdev->gart.ptr) { 245 if (rdev->gart.ptr) {
246 radeon_gart_set_page(rdev, t, page_base); 246 radeon_gart_set_page(rdev, t, page_base,
247 RADEON_GART_PAGE_DUMMY);
247 } 248 }
248 page_base += RADEON_GPU_PAGE_SIZE; 249 page_base += RADEON_GPU_PAGE_SIZE;
249 } 250 }
@@ -261,13 +262,15 @@ void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
261 * @pages: number of pages to bind 262 * @pages: number of pages to bind
262 * @pagelist: pages to bind 263 * @pagelist: pages to bind
263 * @dma_addr: DMA addresses of pages 264 * @dma_addr: DMA addresses of pages
265 * @flags: RADEON_GART_PAGE_* flags
264 * 266 *
265 * Binds the requested pages to the gart page table 267 * Binds the requested pages to the gart page table
266 * (all asics). 268 * (all asics).
267 * Returns 0 for success, -EINVAL for failure. 269 * Returns 0 for success, -EINVAL for failure.
268 */ 270 */
269int radeon_gart_bind(struct radeon_device *rdev, unsigned offset, 271int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
270 int pages, struct page **pagelist, dma_addr_t *dma_addr) 272 int pages, struct page **pagelist, dma_addr_t *dma_addr,
273 uint32_t flags)
271{ 274{
272 unsigned t; 275 unsigned t;
273 unsigned p; 276 unsigned p;
@@ -287,7 +290,7 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
287 if (rdev->gart.ptr) { 290 if (rdev->gart.ptr) {
288 page_base = rdev->gart.pages_addr[p]; 291 page_base = rdev->gart.pages_addr[p];
289 for (j = 0; j < (PAGE_SIZE / RADEON_GPU_PAGE_SIZE); j++, t++) { 292 for (j = 0; j < (PAGE_SIZE / RADEON_GPU_PAGE_SIZE); j++, t++) {
290 radeon_gart_set_page(rdev, t, page_base); 293 radeon_gart_set_page(rdev, t, page_base, flags);
291 page_base += RADEON_GPU_PAGE_SIZE; 294 page_base += RADEON_GPU_PAGE_SIZE;
292 } 295 }
293 } 296 }