From: Daniel Vetter Subject: Re: [PATCH 1/3] drm/i915: implement dma buf begin_cpu_access Date: Sun, 5 Aug 2012 22:52:23 +0200 Message-ID: <20120805205223.GC12232@phenom.ffwll.local> References: <1343621216-14212-1-git-send-email-airlied@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id E1F699E824 for ; Sun, 5 Aug 2012 13:52:03 -0700 (PDT) Received: by weyr3 with SMTP id r3so1750818wey.36 for ; Sun, 05 Aug 2012 13:52:02 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1343621216-14212-1-git-send-email-airlied@gmail.com> 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: Dave Airlie Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, Jul 30, 2012 at 02:06:54PM +1000, Dave Airlie wrote: > From: Dave Airlie > > In order for udl vmap to work properly, we need to push the object > into the CPU domain before we start copying the data to the USB device. > > question: what is direction here in terms of read/write to the device. > > This along with the udl change avoids userspace explicit mapping to > be used. > > Signed-off-by: Dave Airlie In my understanding TO_DEVICE means cpu writes, devices reads. FROM is devices writes, cpu reads. So your patch looks correct. One thing I wonder is how much lockdep likes this one here ... But I guess it's not the first one ;-) Also, do we have a simple testcase that clears the bo with the intel igd and then tells udl the updated damage, just to exercise the code a bit? -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48