dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jerome Glisse <j.glisse@gmail.com>
Cc: thellstrom@vmware.com, Jerome Glisse <jglisse@redhat.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 13/14] drm/ttm: isolate dma data from ttm_tt V3
Date: Wed, 16 Nov 2011 12:21:57 -0500	[thread overview]
Message-ID: <20111116172157.GA5360@phenom.dumpdata.com> (raw)
In-Reply-To: <CAH3drwYM8epBYF+R5Gt+yYGR7iyhz=2WawfiNmfP7pHnAreK+Q@mail.gmail.com>

> >> -int ttm_dma_populate(struct ttm_tt *ttm, struct device *dev);
> >> -extern void ttm_dma_unpopulate(struct ttm_tt *ttm, struct device *dev);
> >> +int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev);
> >> +extern void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev);
> >>
> >>  #else
> >>  static inline int ttm_dma_page_alloc_init(struct ttm_mem_global *glob,
> >
> > You are missing changes to the static implementations in case CONFIG_SWIOTLB is not set.
> >
> 
> Actually i don't think i miss anything
> ttm_dma_populate/ttm_dma_unpopulate is conditional on CONFIG_SWIOTLB
> in both radeon and nouveau. So i should be fine. Or did i miss
> something else ?

You are completlty right.  Somehow I had in my mind that this was present:


diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h
index 5fe2740..bb006c7 100644
--- a/include/drm/ttm/ttm_page_alloc.h
+++ b/include/drm/ttm/ttm_page_alloc.h
@@ -94,6 +94,16 @@ static inline int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data)
 {
 	return 0;
 }
+static inline int ttm_dma_populate(struct ttm_tt *ttm,
+				   struct device *dev)
+{
+	return -ENODEV;
+}
+static inline void ttm_dma_unpopulate(struct ttm_tt *ttm,
+				      struct device *dev)
+{
+	return;
+}
 #endif
 
 #endif

But that does not make sense as the nouveau and radeon are both guarded by the
#ifdef CONFIG_SWIOTLB. So if "# CONFIG_SWIOTLB is not set" is present, well, nobody
will be referencing the ttm_dma_[un|]populate calls.

  reply	other threads:[~2011-11-16 17:22 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-11 22:47 ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V5 j.glisse
2011-11-11 22:47 ` [PATCH 01/14] swiotlb: Expose swiotlb_nr_tlb function to modules j.glisse
2011-11-11 22:47 ` [PATCH 02/14] drm/ttm: remove userspace backed ttm object support j.glisse
2011-11-11 22:47 ` [PATCH 03/14] drm/ttm: remove split btw highmen and lowmem page j.glisse
2011-11-11 22:47 ` [PATCH 04/14] drm/ttm: remove unused backend flags field j.glisse
2011-11-11 22:47 ` [PATCH 05/14] drm/ttm: use ttm put pages function to properly restore cache attribute j.glisse
2011-11-11 22:47 ` [PATCH 06/14] drm/ttm: test for dma_address array allocation failure j.glisse
2011-11-11 22:47 ` [PATCH 07/14] drm/ttm: page allocation use page array instead of list j.glisse
2011-11-11 22:47 ` [PATCH 08/14] drm/ttm: merge ttm_backend and ttm_tt V5 j.glisse
2011-11-11 22:47 ` [PATCH 09/14] drm/ttm: introduce callback for ttm_tt populate & unpopulate V4 j.glisse
2011-11-11 22:47 ` [PATCH 10/14] drm/ttm: provide dma aware ttm page pool code V8 j.glisse
2011-11-16 15:50   ` Konrad Rzeszutek Wilk
2011-11-16 16:04     ` Jerome Glisse
2011-11-11 22:47 ` [PATCH 11/14] drm/radeon/kms: enable the ttm dma pool if swiotlb is on V3 j.glisse
2011-11-16 15:46   ` Konrad Rzeszutek Wilk
2011-11-16 16:05     ` Jerome Glisse
2011-11-11 22:47 ` [PATCH 12/14] drm/nouveau: enable the ttm dma pool when swiotlb is active V3 j.glisse
2011-11-11 22:47 ` [PATCH 13/14] drm/ttm: isolate dma data from ttm_tt V3 j.glisse
2011-11-15 21:07   ` Konrad Rzeszutek Wilk
2011-11-15 21:47     ` Jerome Glisse
2011-11-16  0:35     ` Jerome Glisse
2011-11-16 17:21       ` Konrad Rzeszutek Wilk [this message]
2011-11-11 22:47 ` [PATCH 14/14] drm/ttm: simplify memory accounting for ttm user j.glisse
2011-11-14 14:49 ` ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V5 Thomas Hellstrom
2011-11-14 16:02   ` Jerome Glisse
2011-11-14 16:06     ` Thomas Hellstrom
2011-11-14 18:54       ` Jerome Glisse
2011-11-14 19:25         ` Thomas Hellstrom
2011-11-16 15:15         ` Konrad Rzeszutek Wilk
2011-11-16 15:31           ` Jerome Glisse
2011-11-16 15:53             ` Konrad Rzeszutek Wilk

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=20111116172157.GA5360@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=j.glisse@gmail.com \
    --cc=jglisse@redhat.com \
    --cc=thellstrom@vmware.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