[PATCH] drm: Remove SCATTERLIST_MAX_SEGMENT

Jason Gunthorpe jgg at nvidia.com
Thu Oct 29 18:20:40 UTC 2020


On Wed, Oct 28, 2020 at 08:49:11PM +0100, Daniel Vetter wrote:
> On Wed, Oct 28, 2020 at 04:15:26PM -0300, Jason Gunthorpe wrote:
> > Since commit 9a40401cfa13 ("lib/scatterlist: Do not limit max_segment to
> > PAGE_ALIGNED values") the max_segment input to sg_alloc_table_from_pages()
> > does not have to be any special value. The new algorithm will always
> > create something less than what the user provides. Thus eliminate this
> > confusing constant.
> > 
> > - vmwgfx should use the HW capability, not mix in the OS page size for
> >   calling dma_set_max_seg_size()
> > 
> > - i915 uses i915_sg_segment_size() both for sg_alloc_table_from_pages
> >   and for some open coded sgl construction. This doesn't change the value
> >   since rounddown(size, UINT_MAX) == SCATTERLIST_MAX_SEGMENT
> > 
> > - drm_prime_pages_to_sg uses it as a default if max_segment is zero,
> >   UINT_MAX is fine to use directly.
> > 
> > Cc: Gerd Hoffmann <kraxel at redhat.com>
> > Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> > Cc: Thomas Hellstrom <thellstrom at vmware.com>
> > Cc: Qian Cai <cai at lca.pw>
> > Cc: "Ursulin, Tvrtko" <tvrtko.ursulin at intel.com>
> > Suggested-by: Christoph Hellwig <hch at lst.de>
> > Signed-off-by: Jason Gunthorpe <jgg at nvidia.com>
> 
> lgtm. Do you want to push this through some other queue, or should I put
> this into drm trees? Prefer 5.10 or 5.11?

I think DRM tree is best

Thanks,
Jason


More information about the dri-devel mailing list