Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-13 Thread Andrey Grodzovsky
; Wentland, Harry Subject: Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object Mhm, I'm not aware of any let over pointer between TTM and GEM and we worked quite hard on reducing the size of the amdgpu_bo, so another extra pointer just for that corner case would suck quite

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-13 Thread Christian König
/12] drm: Add dummy page per device or GEM object Mhm, I'm not aware of any let over pointer between TTM and GEM and we worked quite hard on reducing the size of the amdgpu_bo, so another extra pointer just for that corner case would suck quite a bit. We have a ton of other pointers in s

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Andrey Grodzovsky
...@lists.freedesktop.org ; daniel.vet...@ffwll.ch ; r...@kernel.org ; l.st...@pengutronix.de ; yuq...@gmail.com ; e...@anholt.net ; Deucher, Alexander ; gre...@linuxfoundation.org ; ppaala...@gmail.com ; Wentland, Harry Subject: Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Andrey Grodzovsky
So - basically allocate the page and pass it as void* pointer to drmm_add_action with a release function which will do the free page, right ? Andrey On 1/12/21 4:10 AM, Daniel Vetter wrote: drm_add_action_or_reset (for better control flow) has both a void * data and a cleanup function (and it i

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Christian König
; r...@kernel.org ; l.st...@pengutronix.de ; yuq...@gmail.com ; e...@anholt.net ; Deucher, Alexander ; gre...@linuxfoundation.org ; ppaala...@gmail.com ; Wentland, Harry Subject: Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object Mhm, I'm not aware of any let over po

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Daniel Vetter
>> dri-de...@lists.freedesktop.org ; > >> daniel.vet...@ffwll.ch ; r...@kernel.org > >> ; l.st...@pengutronix.de ; > >> yuq...@gmail.com ; e...@anholt.net ; > >> Deucher, Alexander ; gre...@linuxfoundation.org > >> ; ppaala...@gmail.com ; &

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Daniel Vetter
; ; l.st...@pengutronix.de ; > > > > yuq...@gmail.com ; e...@anholt.net ; > > > > Deucher, Alexander ; > > > > gre...@linuxfoundation.org ; > > > > ppaala...@gmail.com ; Wentland, Harry > > > > > > > > Subject: Re: [PATCH v3 01/12] drm

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Christian König
Subject: Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object Mhm, I'm not aware of any let over pointer between TTM and GEM and we worked quite hard on reducing the size of the amdgpu_bo, so another extra pointer just for that corner case would suck quite a bit. We have a t

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-11 Thread Andrey Grodzovsky
...@linuxfoundation.org ; ppaala...@gmail.com ; Wentland, Harry Subject: Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object Mhm, I'm not aware of any let over pointer between TTM and GEM and we worked quite hard on reducing the size of the amdgpu_bo, so another extra pointer jus

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-11 Thread Andrey Grodzovsky
...@linuxfoundation.org ; ppaala...@gmail.com ; Wentland, Harry Subject: Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object Mhm, I'm not aware of any let over pointer between TTM and GEM and we worked quite hard on reducing the size of the amdgpu_bo, so another extra pointer jus

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-11 Thread Daniel Vetter
ernel.org > > ; l.st...@pengutronix.de ; > > yuq...@gmail.com ; e...@anholt.net ; > > Deucher, Alexander ; gre...@linuxfoundation.org > > ; ppaala...@gmail.com ; > > Wentland, Harry > > Subject: Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object > &g

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-11 Thread Daniel Vetter
ala...@gmail.com ; > Wentland, Harry > Subject: Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object > > Mhm, I'm not aware of any let over pointer between TTM and GEM and we > worked quite hard on reducing the size of the amdgpu_bo, so another > extra poin

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-08 Thread Grodzovsky, Andrey
...@ffwll.ch ; r...@kernel.org ; l.st...@pengutronix.de ; yuq...@gmail.com ; e...@anholt.net ; Deucher, Alexander ; gre...@linuxfoundation.org ; ppaala...@gmail.com ; Wentland, Harry Subject: Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object Mhm, I'm not aware of any let

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-08 Thread Christian König
Mhm, I'm not aware of any let over pointer between TTM and GEM and we worked quite hard on reducing the size of the amdgpu_bo, so another extra pointer just for that corner case would suck quite a bit. Christian. Am 08.01.21 um 15:46 schrieb Andrey Grodzovsky: Daniel had some objections to thi

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-08 Thread Andrey Grodzovsky
Daniel had some objections to this (see bellow) and so I guess I need you both to agree on the approach before I proceed. Andrey On 1/8/21 9:33 AM, Christian König wrote: Am 08.01.21 um 15:26 schrieb Andrey Grodzovsky: Hey Christian, just a ping. Was there any question for me here? As far

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-08 Thread Christian König
Am 08.01.21 um 15:26 schrieb Andrey Grodzovsky: Hey Christian, just a ping. Was there any question for me here? As far as I can see the best approach would still be to fill the VMA with a single dummy page and avoid pointers in the GEM object. Christian. Andrey On 1/7/21 11:37 AM, Andre

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-08 Thread Andrey Grodzovsky
Hey Christian, just a ping. Andrey On 1/7/21 11:37 AM, Andrey Grodzovsky wrote: On 1/7/21 11:30 AM, Daniel Vetter wrote: On Thu, Jan 07, 2021 at 11:26:52AM -0500, Andrey Grodzovsky wrote: On 1/7/21 11:21 AM, Daniel Vetter wrote: On Tue, Jan 05, 2021 at 04:04:16PM -0500, Andrey Grodzovsky wr

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-07 Thread Andrey Grodzovsky
On 1/7/21 11:30 AM, Daniel Vetter wrote: On Thu, Jan 07, 2021 at 11:26:52AM -0500, Andrey Grodzovsky wrote: On 1/7/21 11:21 AM, Daniel Vetter wrote: On Tue, Jan 05, 2021 at 04:04:16PM -0500, Andrey Grodzovsky wrote: On 11/23/20 3:01 AM, Christian König wrote: Am 23.11.20 um 05:54 schrieb And

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-07 Thread Daniel Vetter
On Thu, Jan 07, 2021 at 11:26:52AM -0500, Andrey Grodzovsky wrote: > > On 1/7/21 11:21 AM, Daniel Vetter wrote: > > On Tue, Jan 05, 2021 at 04:04:16PM -0500, Andrey Grodzovsky wrote: > > > On 11/23/20 3:01 AM, Christian König wrote: > > > > Am 23.11.20 um 05:54 schrieb Andrey Grodzovsky: > > > > >

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-07 Thread Andrey Grodzovsky
Typo Correction bellow On 1/7/21 11:26 AM, Andrey Grodzovsky wrote: Or is the idea to save the struct page * pointer? That feels a bit like over-optimizing stuff. Better to have a simple implementation first and then tune it if (and only if) any part of it becomes a problem for normal usage.

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-07 Thread Andrey Grodzovsky
On 1/7/21 11:21 AM, Daniel Vetter wrote: On Tue, Jan 05, 2021 at 04:04:16PM -0500, Andrey Grodzovsky wrote: On 11/23/20 3:01 AM, Christian König wrote: Am 23.11.20 um 05:54 schrieb Andrey Grodzovsky: On 11/21/20 9:15 AM, Christian König wrote: Am 21.11.20 um 06:21 schrieb Andrey Grodzovsky:

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-07 Thread Daniel Vetter
On Tue, Jan 05, 2021 at 04:04:16PM -0500, Andrey Grodzovsky wrote: > > On 11/23/20 3:01 AM, Christian König wrote: > > Am 23.11.20 um 05:54 schrieb Andrey Grodzovsky: > > > > > > On 11/21/20 9:15 AM, Christian König wrote: > > > > Am 21.11.20 um 06:21 schrieb Andrey Grodzovsky: > > > > > Will be

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-05 Thread Andrey Grodzovsky
On 11/23/20 3:01 AM, Christian König wrote: Am 23.11.20 um 05:54 schrieb Andrey Grodzovsky: On 11/21/20 9:15 AM, Christian König wrote: Am 21.11.20 um 06:21 schrieb Andrey Grodzovsky: Will be used to reroute CPU mapped BO's page faults once device is removed. Uff, one page for each exporte

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2020-11-23 Thread Christian König
Am 23.11.20 um 05:54 schrieb Andrey Grodzovsky: On 11/21/20 9:15 AM, Christian König wrote: Am 21.11.20 um 06:21 schrieb Andrey Grodzovsky: Will be used to reroute CPU mapped BO's page faults once device is removed. Uff, one page for each exported DMA-buf? That's not something we can do. We

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2020-11-22 Thread Andrey Grodzovsky
On 11/21/20 9:15 AM, Christian König wrote: Am 21.11.20 um 06:21 schrieb Andrey Grodzovsky: Will be used to reroute CPU mapped BO's page faults once device is removed. Uff, one page for each exported DMA-buf? That's not something we can do. We need to find a different approach here. Can't w

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2020-11-21 Thread Christian König
Am 21.11.20 um 06:21 schrieb Andrey Grodzovsky: Will be used to reroute CPU mapped BO's page faults once device is removed. Uff, one page for each exported DMA-buf? That's not something we can do. We need to find a different approach here. Can't we call alloc_page() on each fault and link the

[PATCH v3 01/12] drm: Add dummy page per device or GEM object

2020-11-20 Thread Andrey Grodzovsky
Will be used to reroute CPU mapped BO's page faults once device is removed. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/drm_file.c | 8 drivers/gpu/drm/drm_prime.c | 10 ++ include/drm/drm_file.h | 2 ++ include/drm/drm_gem.h | 2 ++ 4 files changed, 22 i