All of lore.kernel.org
 help / color / mirror / Atom feed
* Why do flush page cache twice when change TT's cache attribute
@ 2012-03-19 15:11 Scott Fang
  2012-03-19 15:13 ` Scott Fang
  2012-03-19 17:22 ` Jerome Glisse
  0 siblings, 2 replies; 6+ messages in thread
From: Scott Fang @ 2012-03-19 15:11 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 821 bytes --]

In function ttm_tt_set_caching
,,,,,,,

    if (ttm->caching_state == tt_cached)
        drm_clflush_pages(ttm->pages, ttm->num_pages);

    for (i = 0; i < ttm->num_pages; ++i) {
        cur_page = ttm->pages[i];
        if (likely(cur_page != NULL)) {
            ret = ttm_tt_set_page_caching(cur_page,
                              ttm->caching_state,
                              c_state);
            if (unlikely(ret != 0))
                goto out_err;
        }
    }

    ttm->caching_state = c_state;

    return 0;


drm_clflush_pages flush cache one time.
then in the following function
ttm_tt_set_page_caching->set_memory_wc->change_page_attr_set:
in this function may flush page cache again.

Does the code do some abundant flush, or there is some trick to these codes?

Thanks for the answer in advance.

[-- Attachment #1.2: Type: text/html, Size: 1567 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

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

end of thread, other threads:[~2012-03-21  1:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19 15:11 Why do flush page cache twice when change TT's cache attribute Scott Fang
2012-03-19 15:13 ` Scott Fang
2012-03-19 17:22 ` Jerome Glisse
2012-03-20  2:15   ` Scott Fang
2012-03-20 15:33     ` Konrad Rzeszutek Wilk
2012-03-21  1:37       ` Scott Fang

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.