Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-08-02 Thread Christian König
Am 02.08.2018 um 08:20 schrieb Zhang, Jerry (Junwei): On 08/02/2018 08:00 AM, Marek Olšák wrote: On Wed, Aug 1, 2018 at 2:29 PM, Christian König wrote: Am 01.08.2018 um 19:59 schrieb Marek Olšák: [SNIP] Compared to what the kernel needs to do for updating the page tables it is less than

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-08-02 Thread Zhang, Jerry (Junwei)
On 08/02/2018 08:00 AM, Marek Olšák wrote: On Wed, Aug 1, 2018 at 2:29 PM, Christian König wrote: Am 01.08.2018 um 19:59 schrieb Marek Olšák: On Wed, Aug 1, 2018 at 1:52 PM, Christian König wrote: Am 01.08.2018 um 19:39 schrieb Marek Olšák: On Wed, Aug 1, 2018 at 2:32 AM, Christian

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-08-01 Thread Marek Olšák
On Wed, Aug 1, 2018 at 2:29 PM, Christian König wrote: > Am 01.08.2018 um 19:59 schrieb Marek Olšák: >> >> On Wed, Aug 1, 2018 at 1:52 PM, Christian König >> wrote: >>> >>> Am 01.08.2018 um 19:39 schrieb Marek Olšák: On Wed, Aug 1, 2018 at 2:32 AM, Christian König wrote: >

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-08-01 Thread Christian König
Am 01.08.2018 um 19:59 schrieb Marek Olšák: On Wed, Aug 1, 2018 at 1:52 PM, Christian König wrote: Am 01.08.2018 um 19:39 schrieb Marek Olšák: On Wed, Aug 1, 2018 at 2:32 AM, Christian König wrote: Am 01.08.2018 um 00:07 schrieb Marek Olšák: Can this be implemented as a wrapper on top of

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-08-01 Thread Marek Olšák
On Wed, Aug 1, 2018 at 1:52 PM, Christian König wrote: > Am 01.08.2018 um 19:39 schrieb Marek Olšák: >> >> On Wed, Aug 1, 2018 at 2:32 AM, Christian König >> wrote: >>> >>> Am 01.08.2018 um 00:07 schrieb Marek Olšák: Can this be implemented as a wrapper on top of libdrm? So that the

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-08-01 Thread Christian König
Am 01.08.2018 um 19:39 schrieb Marek Olšák: On Wed, Aug 1, 2018 at 2:32 AM, Christian König wrote: Am 01.08.2018 um 00:07 schrieb Marek Olšák: Can this be implemented as a wrapper on top of libdrm? So that the tree (or hash table) isn't created for UMDs that don't need it. No, the problem

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-08-01 Thread Marek Olšák
On Wed, Aug 1, 2018 at 2:32 AM, Christian König wrote: > Am 01.08.2018 um 00:07 schrieb Marek Olšák: >> >> Can this be implemented as a wrapper on top of libdrm? So that the >> tree (or hash table) isn't created for UMDs that don't need it. > > > No, the problem is that an application gets a CPU

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-08-01 Thread Christian König
Am 01.08.2018 um 00:07 schrieb Marek Olšák: Can this be implemented as a wrapper on top of libdrm? So that the tree (or hash table) isn't created for UMDs that don't need it. No, the problem is that an application gets a CPU pointer from one API and tries to import that pointer into another

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-31 Thread Marek Olšák
Can this be implemented as a wrapper on top of libdrm? So that the tree (or hash table) isn't created for UMDs that don't need it. Marek On Tue, Jul 31, 2018 at 6:13 AM, Christian König wrote: > Am 31.07.2018 um 11:54 schrieb Zhang, Jerry (Junwei): >> >> On 07/31/2018 05:04 PM, Christian König

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-31 Thread Christian König
Am 31.07.2018 um 11:54 schrieb Zhang, Jerry (Junwei): On 07/31/2018 05:04 PM, Christian König wrote: Am 31.07.2018 um 10:58 schrieb Zhang, Jerry (Junwei): On 07/31/2018 04:13 PM, Christian König wrote: Am 31.07.2018 um 10:05 schrieb Zhang, Jerry (Junwei): On 07/31/2018 03:03 PM, Christian

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-31 Thread Zhang, Jerry (Junwei)
On 07/31/2018 05:04 PM, Christian König wrote: Am 31.07.2018 um 10:58 schrieb Zhang, Jerry (Junwei): On 07/31/2018 04:13 PM, Christian König wrote: Am 31.07.2018 um 10:05 schrieb Zhang, Jerry (Junwei): On 07/31/2018 03:03 PM, Christian König wrote: Am 31.07.2018 um 08:58 schrieb Zhang, Jerry

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-31 Thread Christian König
Am 31.07.2018 um 10:58 schrieb Zhang, Jerry (Junwei): On 07/31/2018 04:13 PM, Christian König wrote: Am 31.07.2018 um 10:05 schrieb Zhang, Jerry (Junwei): On 07/31/2018 03:03 PM, Christian König wrote: Am 31.07.2018 um 08:58 schrieb Zhang, Jerry (Junwei): On 07/30/2018 06:47 PM, Christian

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-31 Thread Zhang, Jerry (Junwei)
On 07/31/2018 04:13 PM, Christian König wrote: Am 31.07.2018 um 10:05 schrieb Zhang, Jerry (Junwei): On 07/31/2018 03:03 PM, Christian König wrote: Am 31.07.2018 um 08:58 schrieb Zhang, Jerry (Junwei): On 07/30/2018 06:47 PM, Christian König wrote: Am 30.07.2018 um 12:02 schrieb Junwei

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-31 Thread Christian König
Am 31.07.2018 um 10:05 schrieb Zhang, Jerry (Junwei): On 07/31/2018 03:03 PM, Christian König wrote: Am 31.07.2018 um 08:58 schrieb Zhang, Jerry (Junwei): On 07/30/2018 06:47 PM, Christian König wrote: Am 30.07.2018 um 12:02 schrieb Junwei Zhang: From: Chunming Zhou v2: get original gem

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-31 Thread Zhang, Jerry (Junwei)
On 07/31/2018 03:03 PM, Christian König wrote: Am 31.07.2018 um 08:58 schrieb Zhang, Jerry (Junwei): On 07/30/2018 06:47 PM, Christian König wrote: Am 30.07.2018 um 12:02 schrieb Junwei Zhang: From: Chunming Zhou v2: get original gem handle from gobj v3: update find bo data structure as

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-31 Thread Christian König
Am 31.07.2018 um 08:58 schrieb Zhang, Jerry (Junwei): On 07/30/2018 06:47 PM, Christian König wrote: Am 30.07.2018 um 12:02 schrieb Junwei Zhang: From: Chunming Zhou v2: get original gem handle from gobj v3: update find bo data structure as union(in, out) simply some code logic Do we

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-31 Thread Zhang, Jerry (Junwei)
On 07/30/2018 06:47 PM, Christian König wrote: Am 30.07.2018 um 12:02 schrieb Junwei Zhang: From: Chunming Zhou v2: get original gem handle from gobj v3: update find bo data structure as union(in, out) simply some code logic Do we now have an open source user for this, so that we can

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-31 Thread Christian König
Am 31.07.2018 um 03:40 schrieb Zhou, David(ChunMing): Thanks for Jerry still remembers this series. Hi Christian, For upstream of this feature, seems we already had agreement long time ago. Two reasons for upstreaming: 1. this bug was found by an opengl game, so this bug also is in mesa

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-30 Thread Zhang, Jerry (Junwei)
On 07/31/2018 09:49 AM, Zhou, David(ChunMing) wrote: Typo, excepted -> expected -Original Message- From: amd-gfx On Behalf Of Zhou, David(ChunMing) Sent: Tuesday, July 31, 2018 9:41 AM To: Koenig, Christian ; Zhang, Jerry ; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH 1/2]

RE: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-30 Thread Zhou, David(ChunMing)
Typo, excepted -> expected -Original Message- From: amd-gfx On Behalf Of Zhou, David(ChunMing) Sent: Tuesday, July 31, 2018 9:41 AM To: Koenig, Christian ; Zhang, Jerry ; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo

RE: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-30 Thread Zhou, David(ChunMing)
Thanks for Jerry still remembers this series. Hi Christian, For upstream of this feature, seems we already had agreement long time ago. Two reasons for upstreaming: 1. this bug was found by an opengl game, so this bug also is in mesa driver in theory. 2. after upstream these patches, we can

Re: [PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-30 Thread Christian König
Am 30.07.2018 um 12:02 schrieb Junwei Zhang: From: Chunming Zhou v2: get original gem handle from gobj v3: update find bo data structure as union(in, out) simply some code logic Do we now have an open source user for this, so that we can upstream it? One more point below.

[PATCH 1/2] drm/amdgpu: return bo itself if userptr is cpu addr of bo (v3)

2018-07-30 Thread Junwei Zhang
From: Chunming Zhou v2: get original gem handle from gobj v3: update find bo data structure as union(in, out) simply some code logic Signed-off-by: Chunming Zhou Signed-off-by: Junwei Zhang (v3) Reviewed-by: Christian König Reviewed-by: Jammy Zhou ---