Gerd Hoffmann
2020-Aug-18 08:27 UTC
[Nouveau] [PATCH 1/2] drm: allow limiting the scatter list size.
On Tue, Aug 18, 2020 at 09:57:59AM +0200, Christian K?nig wrote:> Am 18.08.20 um 09:48 schrieb Gerd Hoffmann: > > Add max_segment argument to drm_prime_pages_to_sg(). When set pass it > > through to the __sg_alloc_table_from_pages() call, otherwise use > > SCATTERLIST_MAX_SEGMENT. > > > > Also add max_segment field to gem objects and pass it to > > drm_prime_pages_to_sg() calls in drivers and helpers. > > > > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> > > I'm missing an explanation why this should be useful (it certainly is).virtio-gpu needs this to work properly with SEV (see patch 2/2 of this series).> And the maximum segment size seems misplaced in the GEM object. This is > usually a property of the device or even completely constant.Placing it in drm_device instead would indeed work for virtio-gpu, so I guess you are suggesting that instead? take care, Gerd
Christian König
2020-Aug-18 08:31 UTC
[Nouveau] [PATCH 1/2] drm: allow limiting the scatter list size.
Am 18.08.20 um 10:27 schrieb Gerd Hoffmann:> On Tue, Aug 18, 2020 at 09:57:59AM +0200, Christian K?nig wrote: >> Am 18.08.20 um 09:48 schrieb Gerd Hoffmann: >>> Add max_segment argument to drm_prime_pages_to_sg(). When set pass it >>> through to the __sg_alloc_table_from_pages() call, otherwise use >>> SCATTERLIST_MAX_SEGMENT. >>> >>> Also add max_segment field to gem objects and pass it to >>> drm_prime_pages_to_sg() calls in drivers and helpers. >>> >>> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> >> I'm missing an explanation why this should be useful (it certainly is). > virtio-gpu needs this to work properly with SEV (see patch 2/2 of this > series).Yeah, that's the problem patch 2/2 never showed up here :)>> And the maximum segment size seems misplaced in the GEM object. This is >> usually a property of the device or even completely constant. > Placing it in drm_device instead would indeed work for virtio-gpu, so I > guess you are suggesting that instead?That is probably the best approach, yes. For Intel and AMD it could even be global/constant, but it certainly doesn't needs to be kept around for each buffer. Christian.> > take care, > Gerd >
Gerd Hoffmann
2020-Aug-18 09:00 UTC
[Nouveau] [PATCH 1/2] drm: allow limiting the scatter list size.
Hi,> > > I'm missing an explanation why this should be useful (it certainly is). > > virtio-gpu needs this to work properly with SEV (see patch 2/2 of this > > series). > > Yeah, that's the problem patch 2/2 never showed up here :)The list should have everything. Your inbox probably has 1/2 only because 2/2 doesn't touch amd code and 'git send-email' evaluates sendemail.cccmd (pointing to get_maintainer.pl) for each patch individually. I've found this behavior confusing at times before. Is there some way to send the whole series to everybody? Or at least the cover letter? The git-send-email manpage doesn't give a clue :(> > Placing it in drm_device instead would indeed work for virtio-gpu, so I > > guess you are suggesting that instead? > > That is probably the best approach, yes.Ok, I'll go that route then. thanks, Gerd
Possibly Parallel Threads
- [PATCH 1/2] drm: allow limiting the scatter list size.
- [PATCH 1/2] drm: allow limiting the scatter list size.
- [PATCH 1/2] drm: allow limiting the scatter list size.
- [PATCH v4 1/1] drm: allow limiting the scatter list size.
- [PATCH v3 1/2] drm: allow limiting the scatter list size.