From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Paul Durrant <Paul.Durrant@citrix.com>
Cc: Juergen Gross <jgross@suse.com>,
Andrew Cooper <Andrew.Cooper3@citrix.com>,
'Michael D Labriola' <michael.d.labriola@gmail.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
Christoph Hellwig <hch@infradead.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Jan Beulich <JBeulich@suse.com>,
Alex Deucher <alexander.deucher@amd.com>,
Christian Koenig <christian.koenig@amd.com>,
Monk Liu <monk.liu@amd.com>
Subject: Re: [PATCH] drm: add func to better detect wether swiotlb is needed
Date: Wed, 27 Feb 2019 14:25:50 -0500 [thread overview]
Message-ID: <20190227192550.GB24946@char.us.oracle.com> (raw)
In-Reply-To: <ba6812cbb26341bd9b5d3a0981f7d64b@AMSPEX02CL03.citrite.net>
.snip..
> > -u64 drm_get_max_iomem(void)
> > +bool drm_need_swiotlb(int dma_bits)
> > {
> > struct resource *tmp;
> > resource_size_t max_iomem = 0;
> >
> > + /*
> > + * Xen paravirtual hosts require swiotlb regardless of requested dma
> > + * transfer size.
> > + *
> > + * NOTE: Really, what it requires is use of the dma_alloc_coherent
> > + * allocator used in ttm_dma_populate() instead of
> > + * ttm_populate_and_map_pages(), which bounce buffers so much
> > in
> > + * Xen it leads to swiotlb buffer exhaustion.
> > + */
> > + if (xen_pv_domain())
>
> I've not been following all of the ins and outs of the discussion on this so apologies if I'm missing some context, but...
>
> This looks like the wrong test to me. I think it should be:
>
> if ( xen_swiotlb )
Ah, that could be as well.
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2019-02-27 19:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 23:08 [PATCH] drm: add func to better detect wether swiotlb is needed Michael D Labriola
2019-02-21 9:59 ` Paul Durrant
2019-02-27 19:25 ` Konrad Rzeszutek Wilk [this message]
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=20190227192550.GB24946@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=Paul.Durrant@citrix.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hch@infradead.org \
--cc=jgross@suse.com \
--cc=michael.d.labriola@gmail.com \
--cc=monk.liu@amd.com \
--cc=xen-devel@lists.xen.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