Re: [PATCH 04/12] drm/ttm: use ttm put pages function to properly restore cache attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Thomas Hellstrom <thellstrom@xxxxxxxxxx>

On 11/08/2011 12:40 AM, j.glisse@xxxxxxxxx wrote:
From: Jerome Glisse<jglisse@xxxxxxxxxx>

On failure we need to make sure the page we free has wb cache
attribute. Do this pas call the proper ttm page helper function.

Signed-off-by: Jerome Glisse<jglisse@xxxxxxxxxx>
Reviewed-by: Konrad Rzeszutek Wilk<konrad.wilk@xxxxxxxxxx>
---
  drivers/gpu/drm/ttm/ttm_tt.c |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 8b7a6d0..3fb4c6d 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -89,7 +89,10 @@ static struct page *__ttm_tt_get_page(struct ttm_tt *ttm, int index)
  	}
  	return p;
  out_err:
-	put_page(p);
+	INIT_LIST_HEAD(&h);
+	list_add(&p->lru,&h);
+	ttm_put_pages(&h, 1, ttm->page_flags,
+		      ttm->caching_state,&ttm->dma_address[index]);
  	return NULL;
  }


_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux