All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/ttm: Don't clear page metadata of imported sg pages
@ 2014-02-05  8:34 Thomas Hellstrom
  2014-02-05 14:37 ` Jakob Bornecrantz
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Hellstrom @ 2014-02-05  8:34 UTC (permalink / raw)
  To: dri-devel, jakob; +Cc: Thomas Hellstrom

These page pointers shouldn't be visible to TTM in the first place, but
until we fix that up, don't clear the page metadata because that
will upset the exporter.

Reported-by: Cristoph Haag <haagch.christoph@googleemail.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
---
 drivers/gpu/drm/ttm/ttm_tt.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 9af9908..75f3190 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -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;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/ttm: Don't clear page metadata of imported sg pages
  2014-02-05  8:34 [PATCH] drm/ttm: Don't clear page metadata of imported sg pages Thomas Hellstrom
@ 2014-02-05 14:37 ` Jakob Bornecrantz
  0 siblings, 0 replies; 2+ messages in thread
From: Jakob Bornecrantz @ 2014-02-05 14:37 UTC (permalink / raw)
  To: Thomas Hellstrom; +Cc: dri-devel

----- Ursprungligt meddelande -----
> These page pointers shouldn't be visible to TTM in the first place, but
> until we fix that up, don't clear the page metadata because that
> will upset the exporter.
> 
> Reported-by: Cristoph Haag <haagch.christoph@googleemail.com>
> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
> ---
>  drivers/gpu/drm/ttm/ttm_tt.c |    3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>

> 
> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> index 9af9908..75f3190 100644
> --- a/drivers/gpu/drm/ttm/ttm_tt.c
> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> @@ -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;
> --
> 1.7.10.4
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-05 14:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05  8:34 [PATCH] drm/ttm: Don't clear page metadata of imported sg pages Thomas Hellstrom
2014-02-05 14:37 ` Jakob Bornecrantz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.