Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-26 Thread Christian König
Am 26.11.20 um 13:14 schrieb Thomas Zimmermann: Hi Am 26.11.20 um 13:08 schrieb Christian König: [...] Yeah, I remember a bug report about frequent page-table modifications wrt to vram helpers. So we implemented the lazy unmapping / vmap caching, as suggested by Christian back them. My

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-26 Thread Thomas Zimmermann
Hi Am 26.11.20 um 13:08 schrieb Christian König: [...] Yeah, I remember a bug report about frequent page-table modifications wrt to vram helpers. So we implemented the lazy unmapping / vmap caching, as suggested by Christian back them. My guess is that anything TTM-based can use a similar

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-26 Thread Christian König
Am 26.11.20 um 12:59 schrieb Thomas Zimmermann: Hi Am 26.11.20 um 12:04 schrieb Daniel Vetter: On Thu, Nov 26, 2020 at 11:15 AM Thomas Zimmermann wrote: Hi Am 25.11.20 um 17:32 schrieb Daniel Vetter: [...] I guess full locking is required :-/ I'm not exactly sure how to make this happen

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-26 Thread Thomas Zimmermann
Hi Am 26.11.20 um 12:04 schrieb Daniel Vetter: On Thu, Nov 26, 2020 at 11:15 AM Thomas Zimmermann wrote: Hi Am 25.11.20 um 17:32 schrieb Daniel Vetter: [...] I guess full locking is required :-/ I'm not exactly sure how to make this happen with the current plethora of helpers ... I think

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-26 Thread Thomas Zimmermann
Hi Am 26.11.20 um 12:28 schrieb Christian König: Am 26.11.20 um 12:04 schrieb Daniel Vetter: On Thu, Nov 26, 2020 at 11:15 AM Thomas Zimmermann wrote: Hi Am 25.11.20 um 17:32 schrieb Daniel Vetter: [...] I guess full locking is required :-/ I'm not exactly sure how to make this happen

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-26 Thread Christian König
Am 26.11.20 um 12:04 schrieb Daniel Vetter: On Thu, Nov 26, 2020 at 11:15 AM Thomas Zimmermann wrote: Hi Am 25.11.20 um 17:32 schrieb Daniel Vetter: [...] I guess full locking is required :-/ I'm not exactly sure how to make this happen with the current plethora of helpers ... I think we

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-26 Thread Daniel Vetter
On Thu, Nov 26, 2020 at 11:15 AM Thomas Zimmermann wrote: > > Hi > > Am 25.11.20 um 17:32 schrieb Daniel Vetter: > > [...] > > I guess full locking is required :-/ I'm not exactly sure how to make this > > happen with the current plethora of helpers ... I think we need an > > _locked version of

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-26 Thread Thomas Zimmermann
Hi Am 25.11.20 um 17:32 schrieb Daniel Vetter: [...] I guess full locking is required :-/ I'm not exactly sure how to make this happen with the current plethora of helpers ... I think we need an _locked version of vmap/vunmap callbacks in drm_gem_object_funcs. I think we might be able to get

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-25 Thread Daniel Vetter
On Wed, Nov 25, 2020 at 12:38:01PM +0100, Thomas Zimmermann wrote: > Hi > > Am 25.11.20 um 11:36 schrieb Daniel Vetter: > > On Wed, Nov 25, 2020 at 11:13:13AM +0100, Christian König wrote: > > > Am 25.11.20 um 09:37 schrieb Thomas Zimmermann: > > > > Hi > > > > > > > > Am 24.11.20 um 15:09

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-25 Thread Thomas Zimmermann
Hi Am 25.11.20 um 11:36 schrieb Daniel Vetter: On Wed, Nov 25, 2020 at 11:13:13AM +0100, Christian König wrote: Am 25.11.20 um 09:37 schrieb Thomas Zimmermann: Hi Am 24.11.20 um 15:09 schrieb Daniel Vetter: On Tue, Nov 24, 2020 at 02:56:51PM +0100, Thomas Zimmermann wrote: Hi Am 24.11.20

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-25 Thread Christian König
Am 25.11.20 um 11:36 schrieb Daniel Vetter: On Wed, Nov 25, 2020 at 11:13:13AM +0100, Christian König wrote: Am 25.11.20 um 09:37 schrieb Thomas Zimmermann: Hi Am 24.11.20 um 15:09 schrieb Daniel Vetter: On Tue, Nov 24, 2020 at 02:56:51PM +0100, Thomas Zimmermann wrote: Hi Am 24.11.20 um

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-25 Thread Daniel Vetter
On Wed, Nov 25, 2020 at 11:13:13AM +0100, Christian König wrote: > Am 25.11.20 um 09:37 schrieb Thomas Zimmermann: > > Hi > > > > Am 24.11.20 um 15:09 schrieb Daniel Vetter: > > > On Tue, Nov 24, 2020 at 02:56:51PM +0100, Thomas Zimmermann wrote: > > > > Hi > > > > > > > > Am 24.11.20 um 14:36

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-25 Thread Christian König
Am 25.11.20 um 09:37 schrieb Thomas Zimmermann: Hi Am 24.11.20 um 15:09 schrieb Daniel Vetter: On Tue, Nov 24, 2020 at 02:56:51PM +0100, Thomas Zimmermann wrote: Hi Am 24.11.20 um 14:36 schrieb Christian König: Am 24.11.20 um 13:15 schrieb Thomas Zimmermann: [SNIP] First I wanted to put

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-25 Thread Thomas Zimmermann
Hi Am 24.11.20 um 15:09 schrieb Daniel Vetter: On Tue, Nov 24, 2020 at 02:56:51PM +0100, Thomas Zimmermann wrote: Hi Am 24.11.20 um 14:36 schrieb Christian König: Am 24.11.20 um 13:15 schrieb Thomas Zimmermann: [SNIP] First I wanted to put this into drm_gem_ttm_vmap/vunmap(), but then

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-25 Thread Thomas Zimmermann
Hi Am 24.11.20 um 15:06 schrieb Christian König: Am 24.11.20 um 14:56 schrieb Thomas Zimmermann: Hi Am 24.11.20 um 14:36 schrieb Christian König: Am 24.11.20 um 13:15 schrieb Thomas Zimmermann: [SNIP] First I wanted to put this into drm_gem_ttm_vmap/vunmap(), but then wondered why

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-24 Thread Daniel Vetter
On Tue, Nov 24, 2020 at 02:56:51PM +0100, Thomas Zimmermann wrote: > Hi > > Am 24.11.20 um 14:36 schrieb Christian König: > > Am 24.11.20 um 13:15 schrieb Thomas Zimmermann: > > > [SNIP] > > > > > > > First I wanted to put this into > > > > > > > drm_gem_ttm_vmap/vunmap(), but then wondered why >

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-24 Thread Christian König
Am 24.11.20 um 14:56 schrieb Thomas Zimmermann: Hi Am 24.11.20 um 14:36 schrieb Christian König: Am 24.11.20 um 13:15 schrieb Thomas Zimmermann: [SNIP] First I wanted to put this into drm_gem_ttm_vmap/vunmap(), but then wondered why ttm_bo_vmap() doe not acquire the lock internally? I'd

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-24 Thread Thomas Zimmermann
Hi Am 24.11.20 um 14:36 schrieb Christian König: Am 24.11.20 um 13:15 schrieb Thomas Zimmermann: [SNIP] First I wanted to put this into drm_gem_ttm_vmap/vunmap(), but then wondered why ttm_bo_vmap() doe not acquire the lock internally? I'd expect that vmap/vunmap are close together and do

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-24 Thread Christian König
Am 24.11.20 um 13:15 schrieb Thomas Zimmermann: [SNIP] First I wanted to put this into drm_gem_ttm_vmap/vunmap(), but then wondered why ttm_bo_vmap() doe not acquire the lock internally? I'd expect that vmap/vunmap are close together and do not overlap for the same BO. We have use cases

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-24 Thread Thomas Zimmermann
Hi Am 24.11.20 um 12:54 schrieb Christian König: Am 24.11.20 um 12:44 schrieb Thomas Zimmermann: Hi Am 24.11.20 um 12:30 schrieb Christian König: Am 24.11.20 um 10:16 schrieb Thomas Zimmermann: Hi Christian Am 16.11.20 um 12:28 schrieb Christian König: Am 13.11.20 um 08:59 schrieb Thomas

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-24 Thread Christian König
Am 24.11.20 um 12:44 schrieb Thomas Zimmermann: Hi Am 24.11.20 um 12:30 schrieb Christian König: Am 24.11.20 um 10:16 schrieb Thomas Zimmermann: Hi Christian Am 16.11.20 um 12:28 schrieb Christian König: Am 13.11.20 um 08:59 schrieb Thomas Zimmermann: Hi Christian Am 12.11.20 um 18:16

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-24 Thread Thomas Zimmermann
Hi Am 24.11.20 um 12:30 schrieb Christian König: Am 24.11.20 um 10:16 schrieb Thomas Zimmermann: Hi Christian Am 16.11.20 um 12:28 schrieb Christian König: Am 13.11.20 um 08:59 schrieb Thomas Zimmermann: Hi Christian Am 12.11.20 um 18:16 schrieb Christian König: Am 12.11.20 um 14:21

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-24 Thread Christian König
Am 24.11.20 um 10:16 schrieb Thomas Zimmermann: Hi Christian Am 16.11.20 um 12:28 schrieb Christian König: Am 13.11.20 um 08:59 schrieb Thomas Zimmermann: Hi Christian Am 12.11.20 um 18:16 schrieb Christian König: Am 12.11.20 um 14:21 schrieb Thomas Zimmermann: In order to avoid eviction

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-24 Thread Thomas Zimmermann
Hi Christian Am 16.11.20 um 12:28 schrieb Christian König: Am 13.11.20 um 08:59 schrieb Thomas Zimmermann: Hi Christian Am 12.11.20 um 18:16 schrieb Christian König: Am 12.11.20 um 14:21 schrieb Thomas Zimmermann: In order to avoid eviction of vmap'ed buffers, pin them in their GEM object's

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-16 Thread Thomas Zimmermann
Hi Am 16.11.20 um 12:28 schrieb Christian König: > Am 13.11.20 um 08:59 schrieb Thomas Zimmermann: >> Hi Christian >> >> Am 12.11.20 um 18:16 schrieb Christian König: >>> Am 12.11.20 um 14:21 schrieb Thomas Zimmermann: In order to avoid eviction of vmap'ed buffers, pin them in their GEM

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-13 Thread Thomas Zimmermann
Hi Am 16.11.20 um 12:28 schrieb Christian König: > Am 13.11.20 um 08:59 schrieb Thomas Zimmermann: >> Hi Christian >> >> Am 12.11.20 um 18:16 schrieb Christian König: >>> Am 12.11.20 um 14:21 schrieb Thomas Zimmermann: In order to avoid eviction of vmap'ed buffers, pin them in their GEM

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-13 Thread Christian König
Am 13.11.20 um 08:59 schrieb Thomas Zimmermann: Hi Christian Am 12.11.20 um 18:16 schrieb Christian König: Am 12.11.20 um 14:21 schrieb Thomas Zimmermann: In order to avoid eviction of vmap'ed buffers, pin them in their GEM object's vmap implementation. Unpin them in the vunmap

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-13 Thread Thomas Zimmermann
Hi Christian Am 12.11.20 um 18:16 schrieb Christian König: > Am 12.11.20 um 14:21 schrieb Thomas Zimmermann: >> In order to avoid eviction of vmap'ed buffers, pin them in their GEM >> object's vmap implementation. Unpin them in the vunmap implementation. >> This is needed to make generic fbdev

Re: [PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-12 Thread Christian König
Am 12.11.20 um 14:21 schrieb Thomas Zimmermann: In order to avoid eviction of vmap'ed buffers, pin them in their GEM object's vmap implementation. Unpin them in the vunmap implementation. This is needed to make generic fbdev support work reliably. Without, the buffer object could be evicted

[PATCH 4/7] drm/radeon: Pin buffers while they are vmap'ed

2020-11-12 Thread Thomas Zimmermann
In order to avoid eviction of vmap'ed buffers, pin them in their GEM object's vmap implementation. Unpin them in the vunmap implementation. This is needed to make generic fbdev support work reliably. Without, the buffer object could be evicted while fbdev flushed its shadow buffer. In difference