Re: [Intel-gfx] [RFC PATCH 02/16] drm/ttm/pool: Fix ttm_pool_alloc error path

2023-02-15 Thread Thomas Hellström
On Wed, 2023-02-15 at 19:26 +0100, Christian König wrote: > Am 15.02.23 um 19:02 schrieb Thomas Hellström: > > On Wed, 2023-02-15 at 18:31 +0100, Christian König wrote: > > > Am 15.02.23 um 17:13 schrieb Thomas Hellström: > > > > When hitting an error, the error path forgot to unmap dma > > > > map

Re: [Intel-gfx] [RFC PATCH 02/16] drm/ttm/pool: Fix ttm_pool_alloc error path

2023-02-15 Thread Christian König
Am 15.02.23 um 19:02 schrieb Thomas Hellström: On Wed, 2023-02-15 at 18:31 +0100, Christian König wrote: Am 15.02.23 um 17:13 schrieb Thomas Hellström: When hitting an error, the error path forgot to unmap dma mappings and I don't see where this happens? From what I can tell, ttm_pool_page_a

Re: [Intel-gfx] [RFC PATCH 02/16] drm/ttm/pool: Fix ttm_pool_alloc error path

2023-02-15 Thread Thomas Hellström
On Wed, 2023-02-15 at 18:31 +0100, Christian König wrote: > Am 15.02.23 um 17:13 schrieb Thomas Hellström: > > When hitting an error, the error path forgot to unmap dma mappings > > and > > I don't see where this happens? From what I can tell, ttm_pool_page_allocated() maps the page for dma, If w

Re: [Intel-gfx] [RFC PATCH 02/16] drm/ttm/pool: Fix ttm_pool_alloc error path

2023-02-15 Thread Christian König
Am 15.02.23 um 17:13 schrieb Thomas Hellström: When hitting an error, the error path forgot to unmap dma mappings and I don't see where this happens? could call set_pages_wb() on already uncached pages. Yeah, but what's the problem? Regards, Christian. Fix this by introducing a common _

[Intel-gfx] [RFC PATCH 02/16] drm/ttm/pool: Fix ttm_pool_alloc error path

2023-02-15 Thread Thomas Hellström
When hitting an error, the error path forgot to unmap dma mappings and could call set_pages_wb() on already uncached pages. Fix this by introducing a common __ttm_pool_free() function that does the right thing. Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3") Cc: Christian König