Comment 29 for bug 496653

Revision history for this message
In , Lists-andyfurniss (lists-andyfurniss) wrote :

(In reply to comment #0)

> I use kernel 2.6.33 rc8 with ati kms support.

I have a similar sounding problem on an AGP card since early Feb.

http://article.gmane.org/gmane.comp.video.dri.devel/42770

As I am running git drm-radeon-testing, to fix all I need to do is -

git revert db78e27de7e29a6db6be7caf607cf803d84094aa

I suppose you could try making a normal diff out of the revert below.

    Revert "drm/ttm: Avoid conflicting reserve_memtype during ttm_tt_set_page_caching."

    This reverts commit db78e27de7e29a6db6be7caf607cf803d84094aa.

diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index e2123af..9c2b1cc 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -198,26 +198,17 @@ EXPORT_SYMBOL(ttm_tt_populate);
 static inline int ttm_tt_set_page_caching(struct page *p,
                                          enum ttm_caching_state c_state)
 {
- int ret = 0;
-
        if (PageHighMem(p))
                return 0;

- if (get_page_memtype(p) != -1) {
- /* p isn't in the default caching state, set it to
- * writeback first to free its current memtype. */
-
- ret = set_pages_wb(p, 1);
- if (ret)
- return ret;
+ switch (c_state) {
+ case tt_cached:
+ return set_pages_wb(p, 1);
+ case tt_wc:
+ return set_memory_wc((unsigned long) page_address(p), 1);
+ default:
+ return set_pages_uc(p, 1);
        }
-
- if (c_state == tt_wc)
- ret = set_memory_wc((unsigned long) page_address(p), 1);
- else if (c_state == tt_uncached)
- ret = set_pages_uc(p, 1);
-
- return ret;
 }
 #else /* CONFIG_X86 */
 static inline int ttm_tt_set_page_caching(struct page *p,