[PATCH 4/4] amdgpu: use sync file for shared semaphores

2017-03-14 Thread Dave Airlie
From: Dave Airlie This creates a new interface for amdgpu with ioctls to create/destroy/import and export shared semaphores using sem object backed by the sync_file code. The semaphores are not installed as fd (except for export), but rather like other driver internal objects in an idr. The idr h

[PATCH 3/4] amdgpu/cs: split out fence dependency checking

2017-03-14 Thread Dave Airlie
From: Dave Airlie This just splits out the fence depenency checking into it's own function to make it easier to add semaphore dependencies. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 86 +++--- 1 file changed, 48 insertions(+), 38 deleti

[PATCH 1/4] sync_file: add a mutex to protect fence and callback members. (v22)

2017-03-14 Thread Dave Airlie
From: Dave Airlie This isn't needed currently, but to reuse sync file for Vulkan permanent shared semaphore semantics, we need to be able to swap the fence backing a sync file. This patch adds a mutex to the sync file and uses to protect accesses to the fence and cb members. v1.1: fix the lockin

sync_file rcu adoption and semaphore changes.

2017-03-14 Thread Dave Airlie
Okay I've listened and people said this should use rcu, so I've tried to work out what that looks like, and I present my first pass at using rcu for sync_file. I'm pretty sure I've probably missed some fundamental things here. As to Chris's reserveration_object questions, yes it does the rcu stuff

[PATCH 2/4] sync_file: add replace and export some functionality (v2)

2017-03-14 Thread Dave Airlie
From: Dave Airlie Using sync_file to back vulkan semaphores means need to replace the fence underlying the sync file. This replace function removes the callback, swaps the fence, and returns the old one. This also exports the alloc and fdget functionality for the semaphore wrapper code. v2: use

Re: [PATCH 2/4] sync_file: add replace and export some functionality

2017-03-14 Thread Dave Airlie
> > uabi semantics question: Should we wake up everyone when the fence gets > replaced? What's the khr semaphore expectation here? There are no real semantics for this case, you either wait the semaphore and replace it with NULL, or signal it where you replace the fence with a new fence. Nobody s

Re: [PATCH 1/4] sync_file: add a mutex to protect fence and callback members.

2017-03-14 Thread Dave Airlie
On 15 March 2017 at 10:47, Dave Airlie wrote: > On 14 March 2017 at 19:30, Christian König wrote: >> Am 14.03.2017 um 10:29 schrieb Chris Wilson: >>> >>> On Tue, Mar 14, 2017 at 10:13:37AM +0100, Christian König wrote: Am 14.03.2017 um 09:45 schrieb Daniel Vetter: > > On Tue, Ma

Re: Linux 4.11: Reported regressions as of Tuesday, 20176-03-14

2017-03-14 Thread Michel Dänzer
[ Moving this sub-thread to the amd-gfx mailing list ] On 14/03/17 07:02 PM, Thorsten Leemhuis wrote: > Hi! Find below my first regression report for Linux 4.11. It lists 9 > regressions I'm currently aware of. [...] > Desc: DRM BUG while initializing cape verde (2nd card) > Repo: 2017-03-13 ht

Re: [rfc] amdgpu/sync_file shared semaphores

2017-03-14 Thread Dave Airlie
On 14 March 2017 at 18:53, Daniel Vetter wrote: > On Tue, Mar 14, 2017 at 10:50:49AM +1000, Dave Airlie wrote: >> This contains one libdrm patch and 4 kernel patches. >> >> The goal is to implement the Vulkan KHR_external_semaphore_fd interface >> for permanent semaphore behaviour for radv. >> >>

Re: [PATCH 1/4] sync_file: add a mutex to protect fence and callback members.

2017-03-14 Thread Dave Airlie
On 14 March 2017 at 19:30, Christian König wrote: > Am 14.03.2017 um 10:29 schrieb Chris Wilson: >> >> On Tue, Mar 14, 2017 at 10:13:37AM +0100, Christian König wrote: >>> >>> Am 14.03.2017 um 09:45 schrieb Daniel Vetter: On Tue, Mar 14, 2017 at 10:50:51AM +1000, Dave Airlie wrote: >

Re: [PATCH libdrm] libdrm/amdgpu: add interface for kernel semaphores

2017-03-14 Thread Marek Olšák
While it's nice that you are all having fun here, I don't think that's the way to communicate this. The truth is, if AMD had an open source driver using the semaphores (e.g. Vulkan) and if the libdrm semaphore code was merged, Dave wouldn't be able to change it, ever. If a dependent open source pr

[RESEND PATCH] drm: amd: remove broken include path

2017-03-14 Thread Arnd Bergmann
The AMD ACP driver adds "-I../acp -I../acp/include" to the gcc command line, which makes no sense, since these are evaluated relative to the build directory. When we build with "make W=1", they instead cause a warning: cc1: error: ../acp/: No such file or directory [-Werror=missing-include-dirs] c

[PATCH 2/2] drm/amdgpu/gfx7: enable cp/rlc ints after we disable clockgating

2017-03-14 Thread Alex Deucher
Even if we disable clockgating, we still need to make sure the cp/rlc interrupts are enabled for powergating which might still be enabled. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH 1/2] drm/amdgpu/gfx8: enable cp/rlc ints after we disable clockgating

2017-03-14 Thread Alex Deucher
Even if we disable clockgating, we still need to make sure the cp/rlc interrupts are enabled for powergating which might still be enabled. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8

Re: [PATCH libdrm] libdrm/amdgpu: add interface for kernel semaphores

2017-03-14 Thread Christian König
Am 14.03.2017 um 18:45 schrieb Harry Wentland: On 2017-03-14 06:04 AM, zhoucm1 wrote: On 2017年03月14日 17:20, Christian König wrote: Am 14.03.2017 um 09:54 schrieb Daniel Vetter: On Tue, Mar 14, 2017 at 11:30:40AM +0800, zhoucm1 wrote: On 2017年03月14日 10:52, Dave Airlie wrote: On 14 March 20

Re: [PATCH libdrm] libdrm/amdgpu: add interface for kernel semaphores

2017-03-14 Thread Daniel Vetter
On Tue, Mar 14, 2017 at 6:45 PM, Harry Wentland wrote: >>> "internal teams simply do not have design authority on stuff like that" >>> >>> Can I print that on a t-shirt and start to sell it? >> >> I guess you cannot dress it to go to office..:) >> > > I'd wear it to the office. > > https://www.cus

Re: [PATCH libdrm] libdrm/amdgpu: add interface for kernel semaphores

2017-03-14 Thread Harry Wentland
On 2017-03-14 06:04 AM, zhoucm1 wrote: On 2017年03月14日 17:20, Christian König wrote: Am 14.03.2017 um 09:54 schrieb Daniel Vetter: On Tue, Mar 14, 2017 at 11:30:40AM +0800, zhoucm1 wrote: On 2017年03月14日 10:52, Dave Airlie wrote: On 14 March 2017 at 12:00, zhoucm1 wrote: Hi Dave, Could yo

Re: [PATCH 1/4] sync_file: add a mutex to protect fence and callback members. (fwd)

2017-03-14 Thread Julia Lawall
improve the system] url: https://github.com/0day-ci/linux/commits/Dave-Airlie/sync_file-add-a-mutex-to-protect-fence-and-callback-members/20170314-155609 base: git://people.freedesktop.org/~airlied/linux.git drm-next :: branch date: 52 minutes ago :: commit date: 52 minutes ago

Re: [PATCH] drm/radeon: Fix GPU lockups for the R7 M270

2017-03-14 Thread Alex Deucher
On Mon, Mar 13, 2017 at 10:42 PM, Umang Raghuvanshi wrote: > > > On 03/14/2017 01:00 AM, Alex Deucher wrote: > >> Does your kernel have this patch: >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ef736d394e85b1bf1fd65ba5e5257b85f6c82325 > > Yes, my kernel has this

Re: [PATCH] drm/radeon: Fix GPU lockups for the R7 M270

2017-03-14 Thread Umang Raghuvanshi
On 03/14/2017 01:00 AM, Alex Deucher wrote: > Does your kernel have this patch: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ef736d394e85b1bf1fd65ba5e5257b85f6c82325 Yes, my kernel has this patch (this issue first occurred in v4.10). -- Cheers, Umang Raghuva

Re: [PATCH 1/4] PCI: add resizeable BAR infrastructure v3

2017-03-14 Thread kbuild test robot
-infrastructure-v3/20170314-163334 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next reproduce: make htmldocs All warnings (new ones prefixed by >>): lib/crc32.c:148: warning: No description found for parameter 'tab)[256]' lib/crc32.c:148: warning:

Re: [PATCH libdrm] libdrm/amdgpu: add interface for kernel semaphores

2017-03-14 Thread zhoucm1
On 2017年03月14日 17:20, Christian König wrote: Am 14.03.2017 um 09:54 schrieb Daniel Vetter: On Tue, Mar 14, 2017 at 11:30:40AM +0800, zhoucm1 wrote: On 2017年03月14日 10:52, Dave Airlie wrote: On 14 March 2017 at 12:00, zhoucm1 wrote: Hi Dave, Could you tell me why you create your new one pa

RE: amd-iommu: can't boot with amdgpu, AMD-Vi: Completion-Wait loop timed out

2017-03-14 Thread Nath, Arindam
>-Original Message- >From: Deucher, Alexander >Sent: Tuesday, March 14, 2017 1:31 AM >To: 'Daniel Drake'; j...@8bytes.org; Suthikulpanit, Suravee; Nath, Arindam >Cc: Chris Chiu; io...@lists.linux-foundation.org; Linux Upstreaming Team; >amd-gfx@lists.freedesktop.org >Subject: RE: amd-iomm

Re: [PATCH 1/4] sync_file: add a mutex to protect fence and callback members.

2017-03-14 Thread Christian König
Am 14.03.2017 um 10:29 schrieb Chris Wilson: On Tue, Mar 14, 2017 at 10:13:37AM +0100, Christian König wrote: Am 14.03.2017 um 09:45 schrieb Daniel Vetter: On Tue, Mar 14, 2017 at 10:50:51AM +1000, Dave Airlie wrote: From: Dave Airlie This isn't needed currently, but to reuse sync file for V

Re: [PATCH 1/4] sync_file: add a mutex to protect fence and callback members.

2017-03-14 Thread Chris Wilson
On Tue, Mar 14, 2017 at 10:13:37AM +0100, Christian König wrote: > Am 14.03.2017 um 09:45 schrieb Daniel Vetter: > >On Tue, Mar 14, 2017 at 10:50:51AM +1000, Dave Airlie wrote: > >>From: Dave Airlie > >> > >>This isn't needed currently, but to reuse sync file for Vulkan > >>permanent shared semaph

Re: [PATCH 3/4] x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 30h-3fh) Processors

2017-03-14 Thread kbuild test robot
-infrastructure-v3/20170314-163334 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next config: i386-randconfig-s0-201711 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH

Re: [PATCH 1/4] sync_file: add a mutex to protect fence and callback members.

2017-03-14 Thread Christian König
Am 14.03.2017 um 09:45 schrieb Daniel Vetter: On Tue, Mar 14, 2017 at 10:50:51AM +1000, Dave Airlie wrote: From: Dave Airlie This isn't needed currently, but to reuse sync file for Vulkan permanent shared semaphore semantics, we need to be able to swap the fence backing a sync file. This patch

Re: [PATCH libdrm] libdrm/amdgpu: add interface for kernel semaphores

2017-03-14 Thread Christian König
Am 14.03.2017 um 09:54 schrieb Daniel Vetter: On Tue, Mar 14, 2017 at 11:30:40AM +0800, zhoucm1 wrote: On 2017年03月14日 10:52, Dave Airlie wrote: On 14 March 2017 at 12:00, zhoucm1 wrote: Hi Dave, Could you tell me why you create your new one patch? I remember I send out our the whole impleme

Re: [PATCH 2/4] PCI: add functionality for resizing resources v2

2017-03-14 Thread kbuild test robot
-infrastructure-v3/20170314-163334 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next config: i386-randconfig-x077-201711 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH

Re: [PATCH 2/4] sync_file: add replace and export some functionality

2017-03-14 Thread Chris Wilson
On Tue, Mar 14, 2017 at 10:50:52AM +1000, Dave Airlie wrote: > From: Dave Airlie > > Using sync_file to back vulkan semaphores means need to replace > the fence underlying the sync file. This replace function removes > the callback, swaps the fence, and returns the old one. This > also exports th

Re: [PATCH libdrm] libdrm/amdgpu: add interface for kernel semaphores

2017-03-14 Thread Daniel Vetter
On Tue, Mar 14, 2017 at 02:16:11PM +1000, Dave Airlie wrote: > On 14 March 2017 at 13:30, zhoucm1 wrote: > > > > > > On 2017年03月14日 10:52, Dave Airlie wrote: > >> > >> On 14 March 2017 at 12:00, zhoucm1 wrote: > >>> > >>> Hi Dave, > >>> > >>> Could you tell me why you create your new one patch? I

Re: [PATCH libdrm] libdrm/amdgpu: add interface for kernel semaphores

2017-03-14 Thread Daniel Vetter
On Tue, Mar 14, 2017 at 11:30:40AM +0800, zhoucm1 wrote: > > > On 2017年03月14日 10:52, Dave Airlie wrote: > > On 14 March 2017 at 12:00, zhoucm1 wrote: > > > Hi Dave, > > > > > > Could you tell me why you create your new one patch? I remember I send out > > > our the whole implementation, Why not

Re: [rfc] amdgpu/sync_file shared semaphores

2017-03-14 Thread Daniel Vetter
On Tue, Mar 14, 2017 at 10:50:49AM +1000, Dave Airlie wrote: > This contains one libdrm patch and 4 kernel patches. > > The goal is to implement the Vulkan KHR_external_semaphore_fd interface > for permanent semaphore behaviour for radv. > > This code tries to enhance sync file to add the require

Re: [PATCH 2/4] sync_file: add replace and export some functionality

2017-03-14 Thread Daniel Vetter
On Tue, Mar 14, 2017 at 10:50:52AM +1000, Dave Airlie wrote: > From: Dave Airlie > > Using sync_file to back vulkan semaphores means need to replace > the fence underlying the sync file. This replace function removes > the callback, swaps the fence, and returns the old one. This > also exports th

Re: [PATCH 1/4] sync_file: add a mutex to protect fence and callback members.

2017-03-14 Thread Daniel Vetter
On Tue, Mar 14, 2017 at 10:50:51AM +1000, Dave Airlie wrote: > From: Dave Airlie > > This isn't needed currently, but to reuse sync file for Vulkan > permanent shared semaphore semantics, we need to be able to swap > the fence backing a sync file. This patch adds a mutex to the > sync file and us