Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282483
b: refs/heads/master
c: 667b7a2
h: refs/heads/master
i:
  282481: 1dddf69
  282479: c311d0a
v: v3
  • Loading branch information
Jerome Glisse authored and Dave Airlie committed Dec 6, 2011
1 parent 7af5935 commit cb9c902
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3316497bcd73dcad971d79bed32571ed785a8c01
refs/heads/master: 667b7a27c221acaea844ba41f1c0a713aba44d31
11 changes: 2 additions & 9 deletions trunk/drivers/gpu/drm/ttm/ttm_tt.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static struct page *__ttm_tt_get_page(struct ttm_tt *ttm, int index)
struct ttm_mem_global *mem_glob = ttm->glob->mem_glob;
int ret;

while (NULL == (p = ttm->pages[index])) {
if (NULL == (p = ttm->pages[index])) {

INIT_LIST_HEAD(&h);

Expand All @@ -86,10 +86,7 @@ static struct page *__ttm_tt_get_page(struct ttm_tt *ttm, int index)
if (unlikely(ret != 0))
goto out_err;

if (PageHighMem(p))
ttm->pages[--ttm->first_himem_page] = p;
else
ttm->pages[++ttm->last_lomem_page] = p;
ttm->pages[index] = p;
}
return p;
out_err:
Expand Down Expand Up @@ -271,8 +268,6 @@ static void ttm_tt_free_alloced_pages(struct ttm_tt *ttm)
ttm_put_pages(&h, count, ttm->page_flags, ttm->caching_state,
ttm->dma_address);
ttm->state = tt_unpopulated;
ttm->first_himem_page = ttm->num_pages;
ttm->last_lomem_page = -1;
}

void ttm_tt_destroy(struct ttm_tt *ttm)
Expand Down Expand Up @@ -316,8 +311,6 @@ struct ttm_tt *ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size,

ttm->glob = bdev->glob;
ttm->num_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
ttm->first_himem_page = ttm->num_pages;
ttm->last_lomem_page = -1;
ttm->caching_state = tt_cached;
ttm->page_flags = page_flags;

Expand Down
7 changes: 0 additions & 7 deletions trunk/include/drm/ttm/ttm_bo_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@ enum ttm_caching_state {
* @dummy_read_page: Page to map where the ttm_tt page array contains a NULL
* pointer.
* @pages: Array of pages backing the data.
* @first_himem_page: Himem pages are put last in the page array, which
* enables us to run caching attribute changes on only the first part
* of the page array containing lomem pages. This is the index of the
* first himem page.
* @last_lomem_page: Index of the last lomem page in the page array.
* @num_pages: Number of pages in the page array.
* @bdev: Pointer to the current struct ttm_bo_device.
* @be: Pointer to the ttm backend.
Expand All @@ -157,8 +152,6 @@ enum ttm_caching_state {
struct ttm_tt {
struct page *dummy_read_page;
struct page **pages;
long first_himem_page;
long last_lomem_page;
uint32_t page_flags;
unsigned long num_pages;
struct ttm_bo_global *glob;
Expand Down

0 comments on commit cb9c902

Please sign in to comment.