Re: [Intel-gfx] [PATCH] drm/i915: stop using swiotlb

2022-07-22 Thread Tvrtko Ursulin
On 22/07/2022 10:58, Christoph Hellwig wrote: On Fri, Jul 22, 2022 at 10:45:54AM +0100, Tvrtko Ursulin wrote: - unsigned int size = swiotlb_max_segment(); - - if (size == 0) - size = UINT_MAX; On a more detailed look, there was a CI failure which makes me think thi

Re: [Intel-gfx] [PATCH] drm/i915: stop using swiotlb

2022-07-22 Thread Christoph Hellwig
On Fri, Jul 22, 2022 at 10:13:48AM +0100, Tvrtko Ursulin wrote: > Christoph - ack from you? Also, if we merge it via the normal process it > will hit 5.21 only. Does that work for you? While I'd like to kill off swiotlb_max_segment rather sooner than later I'm fine with following the normal proce

Re: [Intel-gfx] [PATCH] drm/i915: stop using swiotlb

2022-07-22 Thread Christoph Hellwig
On Fri, Jul 22, 2022 at 10:45:54AM +0100, Tvrtko Ursulin wrote: >> -unsigned int size = swiotlb_max_segment(); >> - >> -if (size == 0) >> -size = UINT_MAX; > > On a more detailed look, there was a CI failure which makes me think this > cap might need to stay. Because max sg seg

Re: [Intel-gfx] [PATCH] drm/i915: stop using swiotlb

2022-07-22 Thread Christoph Hellwig
On Thu, Jul 21, 2022 at 06:43:07PM +0100, Robert Beckett wrote: > + max_segment = dma_max_mapping_size(i915->drm.dev); > + max_segment = max_t(size_t, max_segment, PAGE_SIZE) >> PAGE_SHIFT; dma_max_mapping_size is always larger than PAGE_SIZE, so I don't think the max is needed. Otherwise

Re: [Intel-gfx] [PATCH] drm/i915: stop using swiotlb

2022-07-22 Thread Tvrtko Ursulin
On 21/07/2022 18:43, Robert Beckett wrote: Calling swiotlb functions directly is nowadays considered harmful. See https://lore.kernel.org/intel-gfx/20220711082614.ga29...@lst.de/ Replace swiotlb_max_segment() calls with dma_max_mapping_size(). In i915_gem_object_get_pages_internal() no longer

Re: [Intel-gfx] [PATCH] drm/i915: stop using swiotlb

2022-07-22 Thread Tvrtko Ursulin
On 21/07/2022 18:43, Robert Beckett wrote: Calling swiotlb functions directly is nowadays considered harmful. See https://lore.kernel.org/intel-gfx/20220711082614.ga29...@lst.de/ Replace swiotlb_max_segment() calls with dma_max_mapping_size(). In i915_gem_object_get_pages_internal() no longer

[Intel-gfx] [PATCH] drm/i915: stop using swiotlb

2022-07-21 Thread Robert Beckett
Calling swiotlb functions directly is nowadays considered harmful. See https://lore.kernel.org/intel-gfx/20220711082614.ga29...@lst.de/ Replace swiotlb_max_segment() calls with dma_max_mapping_size(). In i915_gem_object_get_pages_internal() no longer consider max_segment only if CONFIG_SWIOTLB is