From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] drm/prime: remove cargo-cult locking from map_sg helper Date: Wed, 10 Jul 2013 11:18:24 -0400 Message-ID: <20130710151824.GF11007@phenom.dumpdata.com> References: <1373457273-5800-1-git-send-email-daniel.vetter@ffwll.ch> <51DD4D89.3090409@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by gabe.freedesktop.org (Postfix) with ESMTP id 8C8FEE639A for ; Wed, 10 Jul 2013 08:18:31 -0700 (PDT) Content-Disposition: inline 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: Daniel Vetter Cc: DRI Development List-Id: dri-devel@lists.freedesktop.org > So after a bit of irc chatting with Maarten this seems to be more > involved. The above check is to cache the dma mapping, but the > implementation is bogus in tons of ways: > - If direction changes we don't bother with unmaping and freeing the > mapping, but simply leak it. > - This will break if the dma mapping needs explicit syncing since the > helpers don't call sync_to_cpu/sync_to_device anywhere. Right, and I believe I signed up for that. > > So I think I'll decline to poke around more in this hornet nest and > leave it at the locking removal. .. and I get the hornet nest :-). Is there a IRC log of what you guys talked about so I don't omit certain pieces of code.