Re: [PATCH xf86-video-ati 00/21] Port outstanding changes frm

2018-07-11 Thread Alex Deucher
On Wed, Jul 11, 2018 at 1:27 PM, Michel Dänzer wrote: > From: Michel Dänzer > > These are ports of the outstanding applicable changes from the amdgpu > driver. Series is: Acked-by: Alex Deucher > > Emil Velikov (1): > Do not export the DriverRec RADEON > > Jim Qu (1): > Wait for pending

[pull] amdgpu drm-fixes-4.18

2018-07-11 Thread Alex Deucher
Hi Dave, A few display and GPUVM fixes for 4.18. The following changes since commit dc81aab1be9fac2e11f31fe7538a50705eba08cf: MAINTAINERS: update drm tree (2018-07-10 10:59:58 +1000) are available in the git repository at: git://people.freedesktop.org/~agd5f/linux drm-fixes-4.18 for you

Re: [PATCH v2] drm/amdgpu: Allow to create BO lists in CS ioctl v2

2018-07-11 Thread zhoucm1
With more thinking for you performance reason, Can we go further more not to create temp bo list at all? directly add them into parser->validated list? In fact, if bo array is very long, then overhead of bo list creation in CS is considerable, which will double iterate all BOs compared to

Re: [PATCH v2] drm/amdgpu: Allow to create BO lists in CS ioctl v2

2018-07-11 Thread zhoucm1
On 2018年07月12日 11:09, Zhou, David(ChunMing) wrote: Hi Andrey, Could you add compatibility flag or increase kms driver version? So that user space can keep old path when using new one. Sorry for noise, it's already at end of path. Regards, David Zhou Regards, David Zhou -Original

Re: [PATCH] drm/amd/powerplay: convert the sclk/mclk into Mhz for comparation

2018-07-11 Thread Alex Deucher
On Wed, Jul 11, 2018 at 10:58 PM, Quan, Evan wrote: >> You could simplify this to: >> (clocks.data[i].clocks_in_khz / 10 == now) ? "*" : ""); >> > It cannot be simplified as this. Since we need to do comparation in Mhz. > Otherwise we will miss the 'equal' situation. Ah I see, Reviewed-by: Alex

RE: [PATCH v2] drm/amdgpu: Allow to create BO lists in CS ioctl v2

2018-07-11 Thread Zhou, David(ChunMing)
Hi Andrey, Could you add compatibility flag or increase kms driver version? So that user space can keep old path when using new one. Regards, David Zhou -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of zhoucm1 Sent: Thursday, July 12, 2018

RE: [PATCH] drm/amd/powerplay: convert the sclk/mclk into Mhz for comparation

2018-07-11 Thread Quan, Evan
> You could simplify this to: > (clocks.data[i].clocks_in_khz / 10 == now) ? "*" : ""); > It cannot be simplified as this. Since we need to do comparation in Mhz. Otherwise we will miss the 'equal' situation. Regards, Evan > -Original Message- > From: Alex Deucher

Re: [PATCH libdrm] amdgpu: add amdgpu_bo_handle_type_kms_noimport

2018-07-11 Thread Marek Olšák
On Wed, Jul 11, 2018 at 10:09 PM, zhoucm1 wrote: > > > On 2018年07月12日 08:47, Marek Olšák wrote: >> >> From: Marek Olšák > > less patch comment to describe why amdgpu_bo_handle_type_kms doesn't meet > requriement and what patch does. The comment in amdgpu.h describes it well. (at least I hope

[PATCH 16/25] drm/amdgpu: Don't use shadow BO for compute context

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu Compute contexts cannot keep going after a GPU reset. Currently the process must terminate. In the future a process may be able recreate its context from scratch. Either way, there is no need to restore the GPUVM page table from shadow BOs. Signed-off-by: Shaoyun Liu

[PATCH 10/25] drm/amd: Add kfd ioctl defines for hw_exception event

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- include/uapi/linux/kfd_ioctl.h | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h

[PATCH 13/25] drm/amdkfd: Implement GPU reset handlers in KFD

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu Lock KFD and evict existing queues on reset. Notify user mode by signaling hw_exception events. Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 +++

[PATCH 24/25] drm/amdkfd: Replace mqd with mqd_mgr as the variable name for mqd_manager

2018-07-11 Thread Felix Kuehling
From: Yong Zhao This will make reading code much easier. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 105 +++-- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 2 +-

[PATCH 11/25] drm/amdkfd: Add gpu reset interface and place holder

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 10 ++ drivers/gpu/drm/amd/amdkfd/kfd_module.c | 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 3 files changed, 16

[PATCH 15/25] drm/amdkfd: Implement hang detection in KFD and call amdgpu

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu The reset will be performed in a new hw_exception work thread to handle HWS hang without blocking the thread that detected the hang. Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

[PATCH 09/25] drm/amd: Add gpu reset interfaces between amdgpu and amdkfd

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h

[PATCH 01/25] drm/amdkfd: Reliably prevent reclaim-FS while holding DQM lock

2018-07-11 Thread Felix Kuehling
This is needed to prevent deadlocks when MMU notifiers run in reclaim-FS context and take the DQM lock for userptr evictions. Previously this was done by making all memory allocations under DQM locks GFP_NOIO. This is error prone. Using memalloc_nofs_save/restore will reliably affect all memory

[PATCH 21/25] drm/amdkfd: Add debugfs interface to trigger HWS hang

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c | 48 ++ drivers/gpu/drm/amd/amdkfd/kfd_device.c| 23 +++

[PATCH 08/25] drm/amdkfd: fix zero reading of VMID and PASID for Hawaii

2018-07-11 Thread Felix Kuehling
From: Lan Xiao Upon VM Fault, the VMID and PASID written by HW are zeros in Hawaii. Instead of reading from ih_ring_entry, read directly from the registers. This workaround fix the soft hang issues caused by mishandled VM Fault in Hawaii. Signed-off-by: Lan Xiao Signed-off-by: Felix Kuehling

[PATCH 02/25] drm/amdkfd: Stop using GFP_NOIO explicitly

2018-07-11 Thread Felix Kuehling
This is no longer needed with the memalloc_nofs_save/restore in dqm_lock/unlock. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 ++-- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 4 ++--

[PATCH 25/25] drm/amdkfd: Clean up reference of radeon

2018-07-11 Thread Felix Kuehling
From: Yong Zhao Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/cik_int.h | 5 ++- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c| 1 - drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h| 37

[PATCH 05/25] drm/amdkfd: When we get KFD_EVENT_TYPE_MEMORY we send the process SIGSEGV

2018-07-11 Thread Felix Kuehling
From: Moses Reuben Signed-off-by: Moses Reuben Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c

[PATCH 06/25] drm/amdgpu: get_vm_fault implementation on amdgpu side

2018-07-11 Thread Felix Kuehling
From: shaoyunl amdgpu save the vm fault related information for KFD usage and keep the copy until KFD read it. Signed-off-by: shaoyun liu Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 1 +

[PATCH 14/25] drm/amdgpu: Enable the gpu reset from KFD

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu Hook up the gpu_recover callback from KFD to amdgpu to enable handling of GPU hangs detected by KFD. Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 7 +++

[PATCH 12/25] drm/amdgpu: Call KFD reset handlers during GPU reset

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 20 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 + 3

[PATCH 23/25] drm/amdkfd: Use module parameters noretry as the internal variable name

2018-07-11 Thread Felix Kuehling
From: Yong Zhao This makes all module parameters use the same form. Meanwhile clean up the surrounding code. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_v9.c | 2 +-

[PATCH 00/25] KFD fixes, robutness enhancements and cleanups

2018-07-11 Thread Felix Kuehling
This series fixes some KFD issues, adds robustness enhancements and finally a few cleanups. Patches 1-4 are important fixes. Patches 5-8 add handling of GPU VM faults Patches 9-22 add handling of GPU resets and detection of HWS hangs Patches 23-25 are various cleanups Felix Kuehling (2):

[PATCH 22/25] drm/amdkfd: Introduce KFD module parameter halt_if_hws_hang

2018-07-11 Thread Felix Kuehling
From: Yong Zhao This avoids triggering a GPU reset or otherwise changing the HW state. Instead KFD will hang, which allows HW debugging tools to analyze the problem. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling ---

[PATCH 17/25] drm/amdgpu: Check NULL pointer for job before reset job's ring

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu job could be NULL when amdgpu_device_gpu_recover is called Signed-off-by: Shaoyun Liu Reviewed-by: Andrey Grodzovsky Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 19/25] drm/amdgpu: Avoid invalidate tlbs when gpu is on reset

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 3 +++ 3 files

[PATCH 07/25] drm/amdkfd: Handle VM faults in KFD

2018-07-11 Thread Felix Kuehling
From: shaoyunl 1. Pre-GFX9 the amdgpu ISR saves the vm-fault status and address per per-vmid. amdkfd needs to get the information from amdgpu through the new get_vm_fault_info interface. On GFX9 and later, all the required information is in the IH ring 2. amdkfd unmaps all queues from

[PATCH 18/25] drm/amdkfd: Fix kernel queue 64 bit doorbell offset calculation

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu The bitmap index calculation should reverse the logic used on allocation so it will clear the same bit used on allocation Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 9 + 1

[PATCH 04/25] drm/amdkfd: Fix error codes in kfd_get_process

2018-07-11 Thread Felix Kuehling
From: Wei Lu Return ERR_PTR(-EINVAL) if kfd_get_process fails to find the process. This fixes kernel oopses when a child process calls KFD ioctls with a file descriptor inherited from the parent process. Signed-off-by: Wei Lu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling ---

[PATCH 20/25] drm/amdgpu: Avoid destroy hqd when GPU is on reset

2018-07-11 Thread Felix Kuehling
From: Shaoyun Liu Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 3 +++ 3 files

Re: [PATCH v2] drm/amdgpu: Allow to create BO lists in CS ioctl v2

2018-07-11 Thread zhoucm1
On 2018年07月12日 04:57, Andrey Grodzovsky wrote: This change is to support MESA performace optimization. Modify CS IOCTL to allow its input as command buffer and an array of buffer handles to create a temporay bo list and then destroy it when IOCTL completes. This saves on calling for BO_LIST

Re: 答复: Regression with kernel 4.18 - AMD RX 550 fails IB ring test on power-up

2018-07-11 Thread jimqu
On 2018年07月12日 05:27, Luís Mendes wrote: Hi Jim, I followed your suggestion and was able to bisect the kernel patches. The offending patch is: drm/amdgpu: defer test IBs on the rings at boot (V3) commit: 2c773de2ecb8c327f2448bd1eecad224e9227087

Re: [PATCH libdrm] amdgpu: add amdgpu_bo_handle_type_kms_noimport

2018-07-11 Thread zhoucm1
On 2018年07月12日 08:47, Marek Olšák wrote: From: Marek Olšák less patch comment to describe why amdgpu_bo_handle_type_kms doesn't meet requriement and what patch does. less Signed-off-by. --- amdgpu/amdgpu.h| 7 ++- amdgpu/amdgpu_bo.c | 4 2 files changed, 10

Re: [PATCH libdrm] amdgpu: add amdgpu_bo_handle_type_kms_noimport

2018-07-11 Thread Zhang, Jerry (Junwei)
On 07/12/2018 09:14 AM, Zhang, Jerry (Junwei) wrote: On 07/12/2018 08:47 AM, Marek Olšák wrote: From: Marek Olšák --- amdgpu/amdgpu.h| 7 ++- amdgpu/amdgpu_bo.c | 4 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h index

Re: [PATCH libdrm] amdgpu: add amdgpu_bo_handle_type_kms_noimport

2018-07-11 Thread Marek Olšák
On Wed, Jul 11, 2018 at 9:14 PM, Zhang, Jerry (Junwei) wrote: > On 07/12/2018 08:47 AM, Marek Olšák wrote: >> >> From: Marek Olšák >> >> --- >> amdgpu/amdgpu.h| 7 ++- >> amdgpu/amdgpu_bo.c | 4 >> 2 files changed, 10 insertions(+), 1 deletion(-) >> >> diff --git

Re: [PATCH libdrm] amdgpu: add amdgpu_bo_handle_type_kms_noimport

2018-07-11 Thread Zhang, Jerry (Junwei)
On 07/12/2018 08:47 AM, Marek Olšák wrote: From: Marek Olšák --- amdgpu/amdgpu.h| 7 ++- amdgpu/amdgpu_bo.c | 4 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h index 36f91058..be83b457 100644 --- a/amdgpu/amdgpu.h +++

[PATCH libdrm] amdgpu: add amdgpu_bo_handle_type_kms_noimport

2018-07-11 Thread Marek Olšák
From: Marek Olšák --- amdgpu/amdgpu.h| 7 ++- amdgpu/amdgpu_bo.c | 4 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h index 36f91058..be83b457 100644 --- a/amdgpu/amdgpu.h +++ b/amdgpu/amdgpu.h @@ -77,21 +77,26 @@ struct

Re: DEBUG_LOCKS_WARN_ON(sem->owner != ((struct task_struct *)(1UL << 0)))

2018-07-11 Thread Felix Kuehling
Kent just caught a similar backtrace in one of our KFD pre-submission tests (see below) Neither KFD nor AMDGPU are implied in the backtrace. Is this a regression in the kernel itself? amd-kfd-staging is currently based on 4.18-rc1. Regards,   Felix [ 19.435544] [ cut here

[PATCH 4/4] drm/amd: Use newly added interrupt source defs for SOC15.

2018-07-11 Thread Andrey Grodzovsky
Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 10 ++ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c| 6 -- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 7 +--

[PATCH 3/4] drm/amd: Add interrupt source definitions for SOC15 v3.

2018-07-11 Thread Andrey Grodzovsky
Stop using 'magic numbers' when registering interrupt sources. v2: Switch to kernel style comments. v3: Rebase. Signed-off-by: Andrey Grodzovsky Acked-by: Christian König --- .../drm/amd/include/ivsrcid/gfx/irqsrcs_gfx_9_0.h | 55 ++

[PATCH 2/4] drm/amd: Use newly added interrupt source defs for VI v3.

2018-07-11 Thread Andrey Grodzovsky
v2: Rebase v3: Use defines for CP_SQ and CP_ECC_ERROR interrupts. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 6 -- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 --

[PATCH 1/4] drm/amd: Add interrupt source definitions for VI v3.

2018-07-11 Thread Andrey Grodzovsky
Stop using 'magic numbers' when registering interrupt sources. v2: Clean redundant comments. Switch to kernel style comments. v3: Add CP_ECC_ERROR define Signed-off-by: Andrey Grodzovsky Acked-by: Christian König Signed-off-by: Andrey Grodzovsky ---

Re: 答复: Regression with kernel 4.18 - AMD RX 550 fails IB ring test on power-up

2018-07-11 Thread Luís Mendes
Hi Jim, I followed your suggestion and was able to bisect the kernel patches. The offending patch is: drm/amdgpu: defer test IBs on the rings at boot (V3) commit: 2c773de2ecb8c327f2448bd1eecad224e9227087

[PATCH v2] drm/amdgpu: Allow to create BO lists in CS ioctl v2

2018-07-11 Thread Andrey Grodzovsky
This change is to support MESA performace optimization. Modify CS IOCTL to allow its input as command buffer and an array of buffer handles to create a temporay bo list and then destroy it when IOCTL completes. This saves on calling for BO_LIST create and destry IOCTLs in MESA and by this improves

Re: [PATCH] drm/amdgpu: add emit reg write reg wait for vcn jpeg

2018-07-11 Thread Leo Liu
Reviewed-by: Leo Liu On 07/11/2018 02:55 PM, boyuan.zh...@amd.com wrote: From: Boyuan Zhang The emit_reg_write_reg_wait function was not assigned for vcn jpeg. This patch add it back. Signed-off-by: Boyuan Zhang --- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 + 1 file changed, 1

[PATCH] drm/amdgpu: add emit reg write reg wait for vcn jpeg

2018-07-11 Thread boyuan.zhang
From: Boyuan Zhang The emit_reg_write_reg_wait function was not assigned for vcn jpeg. This patch add it back. Signed-off-by: Boyuan Zhang --- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c

Re: [PATCH] drm/amdgpu: Allow to create BO lists in CS ioctl.

2018-07-11 Thread Andrey Grodzovsky
This was to avoid extra code in amdgpu_cs_parser_bos when amdgpu_bo_list_get is called. But I see your argument about random id guess (practically unrealistic to happen but still a valid argument). I will do some minor alterations to avoid this and respin the patch. Andrey On 07/11/2018

[PATCH xf86-video-ati 07/21] Simplify drmmode_crtc_scanout_update

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer Use our own BoxRec for the extents, and RegionEmpty for clearing the scanout damage region. (Ported from amdgpu commit 72c3e9c7308fbcdf85708b72f9be14a5f2f8e7b5) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 16 1 file changed, 4 insertions(+),

[PATCH xf86-video-ati 16/21] Check dimensions passed to drmmode_xf86crtc_resize

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer When enabling a secondary GPU output, Xorg can try resizing the screen beyond the limit advertised by the driver, leading to drmModeAddFB failing and primary GPU outputs turning off. Check for this and bail instead. (Ported from amdgpu commit

[PATCH xf86-video-ati 04/21] Track DRM event queue sequence number in scanout_update_pending

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer Preparation for next change, no behaviour change intended. (Ported from amdgpu commit 04a5c5f7cfacad8d9ccffe81e388cc3da2036cb5) Signed-off-by: Michel Dänzer --- src/drmmode_display.h | 2 +- src/radeon_kms.c | 16 2 files changed, 9 insertions(+), 9

[PATCH xf86-video-ati 03/21] Ignore RADEON_DRM_QUEUE_ERROR (0) in radeon_drm_abort_entry

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer This allows a following change to be slightly simpler. (Ported from amdgpu commit 8fcc3a9b43d3907052a83a96e5a2423afab5ad3f) Signed-off-by: Michel Dänzer --- src/radeon_drm_queue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/radeon_drm_queue.c

[PATCH xf86-video-ati 13/21] Replace 'foo == NULL' with '!foo'

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer Shorter and sweeter. :) (Ported from amdgpu commit e8e688f3852fb06b0c34ed5bce47c9493bcd1613) Signed-off-by: Michel Dänzer --- src/ati.c| 4 ++-- src/drmmode_display.c| 8 src/evergreen_exa.c | 10 +- src/r600_exa.c

[PATCH xf86-video-ati 09/21] Simplify drmmode_handle_transform

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer Set crtc->driverIsPerformingTransform for any case we can handle before calling xf86CrtcRotate. We already clear it afterwards when the latter clears crtc->transform_in_use. This should allow our separate scanout buffer mechanism to be used in more cases. (Cherry picked

[PATCH xf86-video-ati 05/21] Abort scanout_update_pending event when possible

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer We don't need to wait for a non-TearFree scanout update before scanning out from the screen pixmap or before flipping, as the scanout update won't be visible anyway. Instead, just abort it. (Ported from amdgpu commit 36d01989cd842588f12fdae5b2cba5fdcf9c91dd) Signed-off-by:

[PATCH xf86-video-ati 17/21] Remove #if 0'd code

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer This has always been disabled, no need to keep it. (Ported from amdgpu commit 19a40758be04e1d451a030f452efb49e8aaad541) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 12 1 file changed, 12 deletions(-) diff --git a/src/drmmode_display.c

[PATCH xf86-video-ati 00/21] Port outstanding changes frm

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer These are ports of the outstanding applicable changes from the amdgpu driver. Emil Velikov (1): Do not export the DriverRec RADEON Jim Qu (1): Wait for pending scanout update before calling drmmode_crtc_scanout_free Keith Packard (3): modesetting: Record

[PATCH xf86-video-ati 12/21] Wait for pending flips in drmmode_output_set_tear_free

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer This prevents a nested call to drmHandleEvent, which would hang. Fixes hangs when disabling TearFree on a CRTC while a DRI3 client is page flipping. (Ported from amdgpu commit 04947b83cce3a7782e59dece2c7797cc396c1e05) Signed-off-by: Michel Dänzer ---

[PATCH xf86-video-ati 18/21] Call drmmode_crtc_gamma_do_set from drmmode_setup_colormap

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer Instead of from drmmode_set_mode_major. There's no need to re-set the gamma LUT on every modeset, the kernel should preserve it. (Ported from amdgpu commit baea4fa492f635cdfe746a84be2e337d9aeae8a9) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 26

[PATCH xf86-video-ati 10/21] Set drmmode_crtc->scanout_id = 0 when TearFree is disabled

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer When disabling TearFree, drmmode_crtc->scanout_id could remain as 1, but drmmode_set_mode_major would destroy drmmode_crtc->scanout[1], so scanout_do_update() would keep bailing, and the scanout buffer would stop being updated. Fixes freeze after disabling TearFree on a CRTC

[PATCH xf86-video-ati 19/21] modesetting: Record non-desktop kernel property at PreInit time

2018-07-11 Thread Michel Dänzer
From: Keith Packard Save any value of the kernel non-desktop property in the xf86Output structure to avoid non-desktop outputs in the default configuration. [Also bump randrproto requirement to a version that defines RR_PROPERTY_NON_DESKTOP - ajax] Signed-off-by: Keith Packard (Ported from

[PATCH xf86-video-ati 21/21] Add RandR leases support

2018-07-11 Thread Michel Dänzer
From: Keith Packard Signed-off-by: Keith Packard (Ported from xserver commit e4e3447603b5fd3a38a92c3f972396d1f81168ad) Signed-off-by: Michel Dänzer (Ported from amdgpu commit 61040bdfa360975614fb47aa7ea1b3a1abac3427) --- configure.ac | 2 +- src/drmmode_display.c | 159

[PATCH xf86-video-ati 20/21] modesetting: Create CONNECTOR_ID properties for outputs [v2]

2018-07-11 Thread Michel Dänzer
From: Keith Packard This lets a DRM client map between X outputs and kernel connectors. v2: Change CONNECTOR_ID to enum -- Adam Jackson Signed-off-by: Keith Packard (Ported from xserver commit 023d4aba8d45e9e3630b944ecfb650c081799b96) Signed-off-by: Michel Dänzer (Ported from amdgpu

[PATCH xf86-video-ati 14/21] Call drmmode_do_crtc_dpms from drmmode_crtc_dpms as well

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer Leo pointed out that drmmode_do_crtc_dpms wasn't getting called when turning off an output with xrandr --output --off This meant that the vblank sequence number and timestamp wouldn't be saved before turning off the CRTC in this case. Reported-by: Leo (Sunpeng) Li

[PATCH xf86-video-ati 06/21] Update RandR CRTC state if set_mode_major fails in set_desired_modes

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer Without this, RandR would report the CRTC and its outputs as enabled, even though they were actually off due to the failure. (Cherry picked from amdgpu commit 4dcda0b48d62944c841cd9540f4ad4c7ac8dee47) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 2 ++ 1 file

[PATCH xf86-video-ati 02/21] Do not export the DriverRec RADEON

2018-07-11 Thread Michel Dänzer
From: Emil Velikov Unused externally and should not be exported. Signed-off-by: Emil Velikov (Ported from amdgpu commit 7fb8b49895e225b3908c8bd186539de23afe91d1) Signed-off-by: Michel Dänzer --- src/radeon_probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH xf86-video-ati 15/21] Use drmmode_crtc_dpms in drmmode_set_desired_modes

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer Simplifies the latter slightly. (Ported from amdgpu commit 74124f2c17dbb4b752707bb7eee398ae099e8a2c) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/drmmode_display.c

[PATCH xf86-video-ati 11/21] Refactor drmmode_output_set_tear_free helper

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer Preparation for the following fix, no functional change intended. (Ported from amdgpu commit fa30f4601de7a44edfb4a95873bd648946fd4292) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 28 ++-- 1 file changed, 18 insertions(+), 10

[PATCH xf86-video-ati 08/21] Don't call scanout_flip/update with a legacy RandR scanout buffer

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer It means we are not using our own scanout buffers. Fixes crash when TearFree is supposed to be enabled, but drmmode_handle_transform doesn't set crtc->driverIsPerformingTransform. Bugzilla: https://bugs.freedesktop.org/105736 (Ported from commit

[PATCH xf86-video-ati 01/21] Wait for pending scanout update before calling drmmode_crtc_scanout_free

2018-07-11 Thread Michel Dänzer
From: Jim Qu There is a case that when set screen from reverse to normal, the old scanout damage is freed in modesetting before scanout update handler, so it causes segment fault issue. Signed-off-by: Jim Qu [ Michel Dänzer: Only call drmmode_crtc_wait_pending_event before

[PATCH 1/3] drm/amdgpu: Keep track of amount of pinned CPU visible VRAM

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer Instead of CPU invisible VRAM. Preparation for the following, no functional change intended. Cc: sta...@vger.kernel.org Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 5 ++---

[PATCH 3/3] drm/amdgpu: Warn and update pin_size values when destroying a pinned BO

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer This shouldn't happen, but if it does, we'll get a backtrace of the caller, and update the pin_size values as needed. Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 37 +- 1 file changed, 29 insertions(+), 8 deletions(-)

[PATCH 0/3] drm/amdgpu: Final fix for https://bugs.freedesktop.org/106872

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer Finally got confirmation from the debugging patch in the bug report that these values need to be atomic, or they can get corrupted. Patch 1 is so that it's not necessary to use two atomic values for computing the amount of non-pinned CPU visible VRAM, as that could still

[PATCH 2/3] drm/amdgpu: Make pin_size values atomic

2018-07-11 Thread Michel Dänzer
From: Michel Dänzer Concurrent execution of the non-atomic arithmetic could result in completely bogus values. Cc: sta...@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/106872 Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 6 +++---

DEBUG_LOCKS_WARN_ON(sem->owner != ((struct task_struct *)(1UL << 0)))

2018-07-11 Thread Michel Dänzer
I've been occasionally getting the debugging warnings seen in the attached kernel log excerpt. Only for piglit amd_pinned_memory and for libdrm amdgpu_test, so I suspect it's pointing at a userptr related issue. Christian, any ideas? -- Earthling Michel Dänzer |

Re: [PATCH] drm/amdgpu: Allow to create BO lists in CS ioctl.

2018-07-11 Thread Christian König
Am 11.07.2018 um 17:37 schrieb Andrey Grodzovsky: On 07/11/2018 11:05 AM, Christian König wrote: Am 11.07.2018 um 16:51 schrieb Andrey Grodzovsky: [SNIP] + +    bool destroy_bo_list; I think you don't need this. IIRC the bo_list structure was reference counted. So all you need to do is

Re: [PATCH] drm/amdgpu: Allow to create BO lists in CS ioctl.

2018-07-11 Thread Andrey Grodzovsky
On 07/11/2018 11:05 AM, Christian König wrote: Am 11.07.2018 um 16:51 schrieb Andrey Grodzovsky: This change is to support MESA performace optimization. Modify CS IOCTL to allow its input as command buffer and an array of buffer handles to create a temporay bo list and then destroy it when

Re: [PATCH] drm/amd/powerplay: convert the sclk/mclk into Mhz for comparation

2018-07-11 Thread Alex Deucher
On Wed, Jul 11, 2018 at 4:26 AM, Evan Quan wrote: > Convert the clocks into right Mhz unit. Otherwise, it will miss > the equal situation. > > Change-Id: I80e1af975715712f5ddef4ca6a6e356d90932613 > Signed-off-by: Evan Quan > --- > drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 4 ++-- > 1

Re: [PATCH] drm/amdgpu: Allow to create BO lists in CS ioctl.

2018-07-11 Thread Christian König
Am 11.07.2018 um 16:51 schrieb Andrey Grodzovsky: This change is to support MESA performace optimization. Modify CS IOCTL to allow its input as command buffer and an array of buffer handles to create a temporay bo list and then destroy it when IOCTL completes. This saves on calling for BO_LIST

[PATCH] drm/amdgpu: Allow to create BO lists in CS ioctl.

2018-07-11 Thread Andrey Grodzovsky
This change is to support MESA performace optimization. Modify CS IOCTL to allow its input as command buffer and an array of buffer handles to create a temporay bo list and then destroy it when IOCTL completes. This saves on calling for BO_LIST create and destry IOCTLs in MESA and by this improves

[PATCH] [RESEND] amdgpu: kfd: use modern ktime accessors

2018-07-11 Thread Arnd Bergmann
getrawmonotonic64() and get_monotonic_boottime64() are deprecated because of the nonstandard naming. The replacement functions ktime_get_raw_ns() and ktime_get_boot_ns() also simplify the callers. Reviewed-by: Felix Kuehling . Signed-off-by: Arnd Bergmann --- Patch was originall sent on Jun 18

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-11 Thread Leon Romanovsky
On Wed, Jul 11, 2018 at 01:13:18PM +0200, Michal Hocko wrote: > On Wed 11-07-18 13:14:47, Leon Romanovsky wrote: > > On Wed, Jul 11, 2018 at 11:03:53AM +0200, Michal Hocko wrote: > > > On Tue 10-07-18 19:20:20, Leon Romanovsky wrote: > > > > On Tue, Jul 10, 2018 at 04:14:10PM +0200, Michal Hocko

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-11 Thread Michal Hocko
On Wed 11-07-18 13:14:47, Leon Romanovsky wrote: > On Wed, Jul 11, 2018 at 11:03:53AM +0200, Michal Hocko wrote: > > On Tue 10-07-18 19:20:20, Leon Romanovsky wrote: > > > On Tue, Jul 10, 2018 at 04:14:10PM +0200, Michal Hocko wrote: > > > > On Tue 10-07-18 16:40:40, Leon Romanovsky wrote: > > > >

Re: 答复: 答复: [alsa-devel] 答复: [PATCH] vgaswitchroo: set audio client id according to bound gpu client id

2018-07-11 Thread Takashi Iwai
On Wed, 11 Jul 2018 12:21:03 +0200, jimqu wrote: > > > > On 2018年07月11日 17:53, Takashi Iwai wrote: > > On Wed, 11 Jul 2018 11:26:11 +0200, > > jimqu wrote: > >> > >> > >> On 2018年07月11日 17:04, Takashi Iwai wrote: > >>> On Wed, 11 Jul 2018 10:41:38 +0200, > >>> jimqu wrote: > > On

Re: 答复: 答复: [alsa-devel] 答复: [PATCH] vgaswitchroo: set audio client id according to bound gpu client id

2018-07-11 Thread jimqu
On 2018年07月11日 17:53, Takashi Iwai wrote: On Wed, 11 Jul 2018 11:26:11 +0200, jimqu wrote: On 2018年07月11日 17:04, Takashi Iwai wrote: On Wed, 11 Jul 2018 10:41:38 +0200, jimqu wrote: On 2018年07月11日 15:19, Takashi Iwai wrote: On Tue, 10 Jul 2018 13:21:00 +0200, Takashi Iwai wrote: revert

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-11 Thread Leon Romanovsky
On Wed, Jul 11, 2018 at 11:03:53AM +0200, Michal Hocko wrote: > On Tue 10-07-18 19:20:20, Leon Romanovsky wrote: > > On Tue, Jul 10, 2018 at 04:14:10PM +0200, Michal Hocko wrote: > > > On Tue 10-07-18 16:40:40, Leon Romanovsky wrote: > > > > On Mon, Jul 09, 2018 at 02:29:08PM +0200, Michal Hocko

Re: [PATCH] drm/amdgpu: correct rlc save restore list initialization for v2_1

2018-07-11 Thread Huang Rui
On Wed, Jul 11, 2018 at 04:25:04PM +0800, Evan Quan wrote: > The save restore list initialization does not have to be pg guarded. > And for some asic(e.g. Vega12), it does not have cntl/gpm/srm lists. > > Change-Id: I85c0e3525ca7fb385c3d0b9e5abc13708c91e795 > Signed-off-by: Evan Quan Thanks for

Re: 答复: Regression with kernel 4.18 - AMD RX 550 fails IB ring test on power-up

2018-07-11 Thread jimqu
HI Luis, Let us trace the issue one by one. IB test fail: This should be regression issue on 4.18, you can bisect the kernel patches. GPU hang: Fix IB test fail first. Thanks JimQu On 2018年07月11日 17:34, Luís Mendes wrote: Hi Jim, Thanks for your interest in this issue. Actually

Re: 答复: 答复: [alsa-devel] 答复: [PATCH] vgaswitchroo: set audio client id according to bound gpu client id

2018-07-11 Thread Takashi Iwai
On Wed, 11 Jul 2018 11:26:11 +0200, jimqu wrote: > > > > On 2018年07月11日 17:04, Takashi Iwai wrote: > > On Wed, 11 Jul 2018 10:41:38 +0200, > > jimqu wrote: > >> > >> > >> On 2018年07月11日 15:19, Takashi Iwai wrote: > >>> On Tue, 10 Jul 2018 13:21:00 +0200, > >>> Takashi Iwai wrote: > > revert

Re: 答复: 答复: [alsa-devel] 答复: [PATCH] vgaswitchroo: set audio client id according to bound gpu client id

2018-07-11 Thread jimqu
On 2018年07月11日 17:04, Takashi Iwai wrote: On Wed, 11 Jul 2018 10:41:38 +0200, jimqu wrote: On 2018年07月11日 15:19, Takashi Iwai wrote: On Tue, 10 Jul 2018 13:21:00 +0200, Takashi Iwai wrote: revert the fix of amdgpu suspend issue, audio issue also can be observed. Did you check the

Re: 答复: 答复: [alsa-devel] 答复: [PATCH] vgaswitchroo: set audio client id according to bound gpu client id

2018-07-11 Thread Takashi Iwai
On Wed, 11 Jul 2018 10:41:38 +0200, jimqu wrote: > > > > On 2018年07月11日 15:19, Takashi Iwai wrote: > > On Tue, 10 Jul 2018 13:21:00 +0200, > > Takashi Iwai wrote: > >>> revert the fix of amdgpu suspend issue, audio issue also can be observed. > >> Did you check the behavior with the single AMD

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-11 Thread Michal Hocko
On Tue 10-07-18 19:20:20, Leon Romanovsky wrote: > On Tue, Jul 10, 2018 at 04:14:10PM +0200, Michal Hocko wrote: > > On Tue 10-07-18 16:40:40, Leon Romanovsky wrote: > > > On Mon, Jul 09, 2018 at 02:29:08PM +0200, Michal Hocko wrote: > > > > On Wed 27-06-18 09:44:21, Michal Hocko wrote: > > > > >

Re: 答复: 答复: [alsa-devel] 答复: [PATCH] vgaswitchroo: set audio client id according to bound gpu client id

2018-07-11 Thread jimqu
On 2018年07月11日 15:19, Takashi Iwai wrote: On Tue, 10 Jul 2018 13:21:00 +0200, Takashi Iwai wrote: revert the fix of amdgpu suspend issue, audio issue also can be observed. Did you check the behavior with the single AMD GPU hardware? If confirmed, we can forget about vga_switcheroo. ... and

Re: [PATCH] drm/amdgpu/vi: fix mixed up state in smu clockgating setup

2018-07-11 Thread Huang Rui
On Tue, Jul 10, 2018 at 04:53:39PM -0500, Alex Deucher wrote: > Use the PP_STATE_SUPPORT_* rather than AMD_CG_SUPPORT_* > when communicating with the SMU. > > Signed-off-by: Alex Deucher Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/vi.c | 12 ++-- > 1 file changed, 6

[PATCH] drm/amd/powerplay: convert the sclk/mclk into Mhz for comparation

2018-07-11 Thread Evan Quan
Convert the clocks into right Mhz unit. Otherwise, it will miss the equal situation. Change-Id: I80e1af975715712f5ddef4ca6a6e356d90932613 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] drm/amdgpu: correct rlc save restore list initialization for v2_1

2018-07-11 Thread Evan Quan
The save restore list initialization does not have to be pg guarded. And for some asic(e.g. Vega12), it does not have cntl/gpm/srm lists. Change-Id: I85c0e3525ca7fb385c3d0b9e5abc13708c91e795 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 18 -- 1 file

Re: 答复: 答复: [alsa-devel] 答复: [PATCH] vgaswitchroo: set audio client id according to bound gpu client id

2018-07-11 Thread Takashi Iwai
On Tue, 10 Jul 2018 13:21:00 +0200, Takashi Iwai wrote: > > > revert the fix of amdgpu suspend issue, audio issue also can be observed. > > Did you check the behavior with the single AMD GPU hardware? > If confirmed, we can forget about vga_switcheroo. ... and taking a look back at the recent

RE: [PATCH 07/10] drm/amdgpu: reduce the idle period that RLC has to wait before request CGCG

2018-07-11 Thread Quan, Evan
Yes, Rv gfxoff is not affected. Regards, Evan > -Original Message- > From: Alex Deucher [mailto:alexdeuc...@gmail.com] > Sent: Wednesday, July 11, 2018 1:20 AM > To: Quan, Evan > Cc: amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH 07/10] drm/amdgpu: reduce the idle period that RLC

  1   2   >