Skip to content

Commit

Permalink
Merge tag 'ttm-fixes-3.14-2014-02-05' of git://people.freedesktop.org…
Browse files Browse the repository at this point in the history
…/~thomash/linux into drm-next

Two ttm regression fixes.

Pull request of 2014-02-05

* tag 'ttm-fixes-3.14-2014-02-05' of git://people.freedesktop.org/~thomash/linux:
  drm/ttm: Don't clear page metadata of imported sg pages
  drm/ttm: Fix TTM object open regression
  • Loading branch information
Dave Airlie committed Feb 6, 2014
2 parents 8b7ad1b + 1b76af5 commit 9df5a9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ttm/ttm_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ int ttm_ref_object_add(struct ttm_object_file *tfile,

if (ret == 0) {
ref = drm_hash_entry(hash, struct ttm_ref_object, hash);
if (!kref_get_unless_zero(&ref->kref)) {
if (kref_get_unless_zero(&ref->kref)) {
rcu_read_unlock();
break;
}
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/ttm/ttm_tt.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ static void ttm_tt_clear_mapping(struct ttm_tt *ttm)
pgoff_t i;
struct page **page = ttm->pages;

if (ttm->page_flags & TTM_PAGE_FLAG_SG)
return;

for (i = 0; i < ttm->num_pages; ++i) {
(*page)->mapping = NULL;
(*page++)->index = 0;
Expand Down

0 comments on commit 9df5a9b

Please sign in to comment.