mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dave Airlie" <airlied@gmail.com>
To: "David Miller" <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.sourceforge.net
Subject: Re: drm + 4GB RAM + swiotlb = drm craps out
Date: Mon, 2 Apr 2007 14:08:13 +1000	[thread overview]
Message-ID: <21d7e9970704012108m5fd9797bk45c4b39892c8d36f@mail.gmail.com> (raw)
In-Reply-To: <20070401.201134.82699692.davem@davemloft.net>

> >
> > So when swiotlb happens, as you can guess it all falls apart as the
> > drm never calls sync functions at any stage...
>
> You would have hit this on any platform that does caching
> in the PCI controller as well.

We must not have a great intersect of radeon and such systems..

>
> Coherent memory was created for precisely the case where the cpu
> and the device frequently access the memory.
>
> 8MB is indeed a lot for the kind of allocation that the coherent
> DMA implementation uses.
>
> Does it really have to be all in one big 8MB chunk?  I doubt it.
> Perhaps you can therefore create multiple DMA pools instead?  See
> include/linux/dmapool.h

It currently is required to be in a big 8MB chunk as it gets chopped
up by the X server not the kernel, so kernel needs to allocate pages
to back it when X inits, yes this is ugly, no it can't be fixed
without time-travelling and fixing deployed X servers...

Really we probably only need the ring buffer to be in coherent memory,
the rest of the stuff is used for DMA buffers which are mainly filled
by the CPU and read by the GPU. However I cannot change this without
breaking X, the solution is really to use TTM for this sort of
stuff.... I'm a bit worried as the AGP driver now uses vmalloc_32
which really is a meaningless interface on 64-bit systems..

Dave.

  reply	other threads:[~2007-04-02  4:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-01 23:44 Dave Airlie
2007-04-02  3:11 ` David Miller
2007-04-02  4:08   ` Dave Airlie [this message]
2007-04-02  5:08     ` David Miller
2007-04-02  5:15       ` Dave Airlie
2007-04-02  5:24         ` David Miller
2007-04-02  6:27         ` Andi Kleen
2007-04-02  5:38           ` Dave Airlie
2007-04-02  6:40             ` Andi Kleen
2007-04-02  6:52               ` Dave Airlie
2007-04-02  6:55                 ` Andi Kleen

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=21d7e9970704012108m5fd9797bk45c4b39892c8d36f@mail.gmail.com \
    --to=airlied@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®