From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Hellstrom 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 Message-ID: <4CF677AA.4090207@shipmail.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-outbound-1.vmware.com (smtp-outbound-1.vmware.com [65.115.85.69]) by gabe.freedesktop.org (Postfix) with ESMTP id 271299E860 for ; Wed, 1 Dec 2010 08:28:49 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: april Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org 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 >