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

2017-03-13 Thread Dave Airlie
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 remember I send >>> out >>> our the whole implementation, Why not directly revie

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

2017-03-13 Thread zhoucm1
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 directly review our patches? This is patch review, I'm not sure what you are expecting

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

2017-03-13 Thread Dave Airlie
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 directly review our patches? This is patch review, I'm not sure what you are expecting in terms of direct review. The patche

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

2017-03-13 Thread zhoucm1
Hi Dave, Could you tell me why you create your new one patch? I remember I send out our the whole implementation, Why not directly review our patches? Thanks, David Zhou On 2017年03月14日 08:50, Dave Airlie wrote: From: Dave Airlie This adds the corresponding code for libdrm to use the new ke

RE: [PATCH 1/4] drm/amdgpu: make set_prt callback optional and fix error handling

2017-03-13 Thread Zhang, Jerry
The series(1~4) are already Reviewed-by: Junwei Zhang Regards, Jerry (Junwei Zhang) Linux Base Graphics SRDC Software Development _ > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of > Christian K?nig > S

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

2017-03-13 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. Signed-off-by: Dave

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

2017-03-13 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. Signed-o

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

2017-03-13 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 libdrm] libdrm/amdgpu: add interface for kernel semaphores

2017-03-13 Thread Dave Airlie
From: Dave Airlie This adds the corresponding code for libdrm to use the new kernel interfaces for semaphores. This will be used by radv to implement shared semaphores. TODO: Version checks. Signed-off-by: Dave Airlie --- amdgpu/amdgpu.h | 28 + amdgpu/amdgpu_cs.c | 1

[rfc] amdgpu/sync_file shared semaphores

2017-03-13 Thread Dave Airlie
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 required behaviour (which is mostly being able to replace the fence backing the

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

2017-03-13 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

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

2017-03-13 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Daniel Drake > Sent: Monday, March 13, 2017 3:50 PM > To: j...@8bytes.org > Cc: Chris Chiu; io...@lists.linux-foundation.org; Linux Upstreaming Team; > amd-gfx@lists.freedesktop.org > Subject:

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

2017-03-13 Thread Daniel Drake
Hi, We are unable to boot Acer Aspire E5-553G (AMD FX-9800P RADEON R7) nor Acer Aspire E5-523 with standard configurations because during boot the screen is flooded with the following error message over and over: AMD-Vi: Completion-Wait loop timed out We have left the system for quite a while

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

2017-03-13 Thread Alex Deucher
On Sat, Mar 11, 2017 at 11:21 AM, Umang Raghuvanshi wrote: > Commit 3a69adfe5617 ("drm/radeon: drop oland quirks") removed > quirks for Oland but also caused a regression where M270 GPUs > would go into a lock-up when OpenGL intensive applications were used. > This reverts the change only for the

Re: [PATCH 4/4] drm/amdgpu: resize VRAM BAR for CPU access

2017-03-13 Thread Andy Shevchenko
On Mon, Mar 13, 2017 at 2:41 PM, Christian König wrote: > From: Christian König > > Try to resize BAR0 to let CPU access all of VRAM. > +void amdgpu_resize_bar0(struct amdgpu_device *adev) > +{ > + u32 size = max(ilog2(adev->mc.real_vram_size - 1) + 1, 20) - 20; > + int r; > + > +

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

2017-03-13 Thread Andy Shevchenko
On Mon, Mar 13, 2017 at 2:41 PM, Christian König wrote: > Most BIOS don't enable this because of compatibility reasons. > > Manually enable a 64bit BAR of 64GB size so that we have > enough room for PCI devices. > +static void pci_amd_enable_64bit_bar(struct pci_dev *dev) > +{ > + const ui

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

2017-03-13 Thread Andy Shevchenko
On Mon, Mar 13, 2017 at 2:41 PM, Christian König wrote: > From: Christian König > > This allows device drivers to request resizing their BARs. > > The function only tries to reprogram the windows of the bridge directly above > the requesting device and only the BAR of the same type (usually mem,

Re: [PATCH 3/3] drm/amdgpu: refine vce_3.0 code.

2017-03-13 Thread Alex Deucher
On Mon, Mar 13, 2017 at 4:51 AM, Rex Zhu wrote: > fix logic error in hw_fini and > set_clockgating_state functions. > > Change-Id: I1e3f241f300b3c561df695b38b19c7a89160db25 > Signed-off-by: Rex Zhu Series is: Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 16 ++

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

2017-03-13 Thread Umang Raghuvanshi
The AMD Radeon R7 M270 card's OpenGL functionality completely broke down in Linux kernel v4.10. Before v4.10, the card was incorrectly identified as a Radeon R7 M265 but worked perfectly (possibly due to the similarities between the two). It should also be noted that this issue is also present in W

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

2017-03-13 Thread Umang Raghuvanshi
Commit 3a69adfe5617 ("drm/radeon: drop oland quirks") removed quirks for Oland but also caused a regression where M270 GPUs would go into a lock-up when OpenGL intensive applications were used. This reverts the change only for the M270 and fixes the lock-ups. Signed-off-by: Umang Raghuvanshi ---

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

2017-03-13 Thread Christian König
From: Christian König This allows device drivers to request resizing their BARs. The function only tries to reprogram the windows of the bridge directly above the requesting device and only the BAR of the same type (usually mem, 64bit, prefetchable). This is done to make sure not to disturb othe

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

2017-03-13 Thread Christian König
From: Christian König Most BIOS don't enable this because of compatibility reasons. Manually enable a 64bit BAR of 64GB size so that we have enough room for PCI devices. Signed-off-by: Christian König --- arch/x86/pci/fixup.c | 53 1 file c

Resizeable PCI BAR support V3

2017-03-13 Thread Christian König
Hi Bjorn and others on the lists, it's over a year that I initially came up with that, but now I finally have the time to finish it up. This set of patches allows device drivers to resize and most likely also relocate the PCI BAR of devices they manage to allow the CPU to access all of the device

[PATCH 4/4] drm/amdgpu: resize VRAM BAR for CPU access

2017-03-13 Thread Christian König
From: Christian König Try to resize BAR0 to let CPU access all of VRAM. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 29 + drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 8 +---

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

2017-03-13 Thread Christian König
From: Christian König Just the defines and helper functions to read the possible sizes of a BAR and update it's size. See https://pcisig.com/sites/default/files/specification_documents/ECN_Resizable-BAR_24Apr2008.pdf. This is useful for hardware with large local storage (mostly GFX) which only

Re: [PATCH 1/5] PCI: add resizeable BAR infrastructure v2

2017-03-13 Thread Christian König
Am 06.03.2017 um 13:20 schrieb Andy Shevchenko: On Mon, Mar 6, 2017 at 1:40 PM, Christian König wrote: + for (i = 0; i < nbars; ++i, pos += 8) { 8 is defined somewhere in the spec? (Yes, I understand that is just 64 bits shift) Yes, it is defined in the spec, see "Figure 7-x1 Resizable

[PATCH 3/4] drm/amdgpu: implement AMDGPU_VA_OP_CLEAR v2

2017-03-13 Thread Christian König
From: Christian König A new VM operation to remove all mappings in a range. v2: limit unmapped area as noted by Jerry Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 27 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdg

[PATCH 2/4] drm/amdgpu: separate page table allocation from mapping

2017-03-13 Thread Christian König
From: Christian König This makes it easier to implement a replace operation. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 9 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 136 +--

[PATCH 4/4] drm/amdgpu: add a VM mapping replace operation v2

2017-03-13 Thread Christian König
From: Christian König Add a new operation to replace mappings in a VM with a new one. v2: Fix Jerry's comment, separate out clear operation. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 15 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 64 +

[PATCH 1/4] drm/amdgpu: make set_prt callback optional and fix error handling

2017-03-13 Thread Christian König
From: Christian König PRT support is completely implemented now and we left it turned on accidentially in the error path. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git

[PATCH 3/3] drm/amdgpu: refine vce_3.0 code.

2017-03-13 Thread Rex Zhu
fix logic error in hw_fini and set_clockgating_state functions. Change-Id: I1e3f241f300b3c561df695b38b19c7a89160db25 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vc

[PATCH 1/3] drm/amdgpu: refine vce2.0 dpm sequence

2017-03-13 Thread Rex Zhu
first start vce then enable vce dpm. Change-Id: I8f5da7caca3184ce65962df9bb3d3162b5a0528a Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdg

[PATCH 2/3] drm/amd/powerplay: fix copy error in smu7_clockpoweragting.c

2017-03-13 Thread Rex Zhu
Change-Id: I0e41fdb2df794dcbe4c508e9a71dd60612430482 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c b/drivers/gpu/drm/amd/powerp

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

2017-03-13 Thread Umang Raghuvanshi
Commit 3a69adfe5617 ("drm/radeon: drop oland quirks") removed quirks for Oland but also caused a regression where M270 GPUs would go into a lock-up when OpenGL intensive applications were used. This reverts the change only for the M270 and fixes the lock-ups. Signed-off-by: Umang Raghuvanshi ---

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

2017-03-13 Thread Umang Raghuvanshi
The AMD Radeon R7 M270 card's OpenGL functionality completely broke down in Linux kernel v4.10. Before v4.10, the card was incorrectly identified as a Radeon R7 M265 but worked perfectly (possibly due to the similarities between the two). It should also be noted that this issue is also present in W

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

2017-03-13 Thread Umang Raghuvanshi
Commit 3a69adfe5617 ("drm/radeon: drop oland quirks") removed quirks for Oland but also caused a regression where M270 GPUs would go into a lock-up when OpenGL intensive applications were used. This reverts the change only for the M270 and fixes the lock-ups. Signed-off-by: Umang Raghuvanshi ---