All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thomas@shipmail.org>
To: april <aapril03@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: seems ttm_bo_handle_move_mem not flush cache, if BO move SYS->VRAM?
Date: Wed, 01 Dec 2010 17:28:26 +0100	[thread overview]
Message-ID: <4CF677AA.4090207@shipmail.org> (raw)
In-Reply-To: <AANLkTinFOdC6uS+a8nua=pEu_mfa9h392UK_Qg6u+5gR@mail.gmail.com>

On 12/01/2010 04:58 AM, april wrote:
> hi all:
>
> I have a question:
>
> If a BO in VRAM (WC) evict to SYS memory(may be cached),  and user
> process still can access it event it is in SYS memory (may be cached)
> .
> when this BO volidate to VRAM,  It seems "ttm_bo_handle_move_mem"  not
> flush cache (If evict to SYS memory with cached).
>
>   But flush cache is needed, If driver use DMA to handle BO
> move(SYS->VRAM), should "ttm_bo_handle_move_mem" handle this? or
> driver do it in "driver->move_notify" before "driver->move" called?
>
>    

April, in order to understand your proble, Can you be a bit more 
specific about.

1) Which cache should be flushed? Cpu cache or GPU cache.

2) Why should it be flushed? For CPU caches, TTM only flushes when 
transitioning the same page from cached to write-combined. If you use 
DMA from system memory to VRAM, and need to flush the system pages 
before performing the DMA operation, that should be done in the driver 
move function.

/Thomas


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

  parent reply	other threads:[~2010-12-01 16:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-01  3:58 seems ttm_bo_handle_move_mem not flush cache, if BO move SYS->VRAM? april
2010-12-01 14:34 ` Jerome Glisse
2010-12-01 16:28 ` Thomas Hellstrom [this message]
2010-12-02  2:49   ` april
2010-12-02  7:35     ` Thomas Hellstrom
2010-12-03  2:25       ` Jerome Glisse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CF677AA.4090207@shipmail.org \
    --to=thomas@shipmail.org \
    --cc=aapril03@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.