dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/prime: remove cargo-cult locking from map_sg helper
Date: Wed, 10 Jul 2013 17:21:23 +0200	[thread overview]
Message-ID: <CAKMK7uFcGdpNHT6p4qbA1oMfznHTaHMSucahg2xypnBnavjbOg@mail.gmail.com> (raw)
In-Reply-To: <20130710151824.GF11007@phenom.dumpdata.com>

On Wed, Jul 10, 2013 at 5:18 PM, Konrad Rzeszutek Wilk
<konrad.wilk@oracle.com> wrote:
>> 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.

Well, the breakage runs deeper since atm ttm doesn't have any concept
of syncing from/to the device dma. Neither has i915. So this little
issue here is just the tip of the iceberg ...

>> 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.

The above is pretty much the summary, actually more lines than what
we've discussed on irc ;-) It's on #dri-devel though:
http://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&show_html=true&highlight_names=&date=2013-07-10
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2013-07-10 15:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 11:54 [PATCH] drm/prime: remove cargo-cult locking from map_sg helper Daniel Vetter
2013-07-10 12:03 ` Maarten Lankhorst
2013-07-10 12:19   ` Daniel Vetter
2013-07-10 15:18     ` Konrad Rzeszutek Wilk
2013-07-10 15:21       ` Daniel Vetter [this message]
2013-07-10 13:46 ` Laurent Pinchart
2013-07-10 14:42   ` Daniel Vetter
2013-07-10 14:48 ` Daniel Vetter
2013-07-10 16:27   ` Maarten Lankhorst
2013-07-11  8:00   ` Laurent Pinchart

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=CAKMK7uFcGdpNHT6p4qbA1oMfznHTaHMSucahg2xypnBnavjbOg@mail.gmail.com \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=konrad.wilk@oracle.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).