Re: [PATCH 16/23] drm/amdgpu/dc: Stop updating plane->fb

2018-03-23 Thread Harry Wentland
On 2018-03-22 11:23 AM, Ville Syrjala wrote: > From: Ville Syrjälä > > We want to get rid of plane->fb on atomic drivers. Stop setting it. > > Cc: Alex Deucher > Cc: "Christian König" > Cc: "David (ChunMing)

Re: [PATCH 3/4] drm/amdgpu: Fix acquiring VM on large-BAR systems

2018-03-23 Thread Felix Kuehling
On 2018-03-23 03:35 PM, Christian König wrote: > Am 23.03.2018 um 20:30 schrieb Felix Kuehling: >> On large-BAR systems the VM page tables for compute are accessed by >> the CPU. Always allow CPU access to the page directory so that it can >> be used later by the CPU when a VM is converted to a

Re: [PATCH 3/4] drm/amdgpu: Fix acquiring VM on large-BAR systems

2018-03-23 Thread Christian König
Am 23.03.2018 um 20:30 schrieb Felix Kuehling: On large-BAR systems the VM page tables for compute are accessed by the CPU. Always allow CPU access to the page directory so that it can be used later by the CPU when a VM is converted to a compute VM. NAK, that means we initial place the PD in

[PATCH 6/6] drm/amdgpu: Add userptr support for KFD

2018-03-23 Thread Felix Kuehling
This adds support for allocating, mapping, unmapping and freeing userptr BOs, and for handling MMU notifiers. v2: updated a comment Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 11 +

[PATCH 5/6] drm/amdkfd: Add quiesce_mm and resume_mm to kgd2kfd_calls

2018-03-23 Thread Felix Kuehling
These interfaces allow KGD to stop and resume all GPU user mode queue access to a process address space. This is needed for handling MMU notifiers of userptrs mapped for GPU access in KFD VMs. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device.c

[PATCH 0/6] Userptr memory mapping support for KFD

2018-03-23 Thread Felix Kuehling
Update of remaining patches from the GPUVM patch series. This should apply on top of the fixes I just sent out. Felix Kuehling (6): drm/amdgpu: Add MMU notifier type for KFD userptr drm/amdgpu: Enable amdgpu_ttm_tt_get_user_pages in worker threads drm/amdgpu: Avoid reclaim while holding

[PATCH 4/6] drm/amdkfd: GFP_NOIO while holding locks taken in MMU notifier

2018-03-23 Thread Felix Kuehling
When an MMU notifier runs in memory reclaim context, it can deadlock trying to take locks that are already held in the thread causing the memory reclaim. The solution is to avoid memory reclaim while holding locks that are taken in MMU notifiers by using GFP_NOIO. This commit fixes memory

[PATCH 3/6] drm/amdgpu: Avoid reclaim while holding locks taken in MMU notifier

2018-03-23 Thread Felix Kuehling
When an MMU notifier runs in memory reclaim context, it can deadlock trying to take locks that are already held in the thread causing the memory reclaim. The solution is to avoid memory reclaim while holding locks that are taken in MMU notifiers. This commit fixes kmalloc while holding rmn->lock

[PATCH 2/6] drm/amdgpu: Enable amdgpu_ttm_tt_get_user_pages in worker threads

2018-03-23 Thread Felix Kuehling
This commit allows amdgpu_ttm_tt_get_user_pages to work in a worker thread rather than regular process context. This will be used when KFD userptr BOs are restored after an MMU-notifier eviction. v2: Manage task reference with get_task_struct/put_task_struct Signed-off-by: Felix Kuehling

[PATCH 1/6] drm/amdgpu: Add MMU notifier type for KFD userptr

2018-03-23 Thread Felix Kuehling
This commit adds the notion of MMU notifier types GFX and HSA. GFX continues to work like MMU notifiers did before. HSA adds support for KFD userptr BOs. The implementation of KFD userptr eviction is a stub for now. Signed-off-by: Felix Kuehling ---

[PATCH 4/4] drm/amdkfd: Use ordered workqueue to restore processes

2018-03-23 Thread Felix Kuehling
Restoring multiple processes concurrently can lead to live-locks where each process prevents the other from validating all its BOs. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_module.c | 6 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 2 +-

[PATCH 3/4] drm/amdgpu: Fix acquiring VM on large-BAR systems

2018-03-23 Thread Felix Kuehling
On large-BAR systems the VM page tables for compute are accessed by the CPU. Always allow CPU access to the page directory so that it can be used later by the CPU when a VM is converted to a compute VM. Signed-off-by: Felix Kuehling ---

[PATCH 1/4] drm/amdkfd: Fix scratch memory with HWS enabled

2018-03-23 Thread Felix Kuehling
Program sh_hidden_private_base_vmid correctly in the map-process PM4 packet. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 0/4] KFD fixes

2018-03-23 Thread Felix Kuehling
Patches 1 and 2 should be OK for drm-fixes. Patch 1 in particular is important as it fixes VM faults in applications that rely on scratch memory. Patches 3 and 4 are based on recently upstreamed GPUVM changes for dGPUs and should be applied to the same drm-next branch if it's not too late. Felix

Re: [PATCH 5/5] drm/amdgpu: remove duplicate cg/pg wrapper functions

2018-03-23 Thread Christian König
Am 23.03.2018 um 12:10 schrieb Rex Zhu: [SNIP] -int amdgpu_device_ip_set_powergating_state(struct amdgpu_device *adev, +int amdgpu_device_ip_set_powergating_state(void *dev, enum amd_ip_block_type block_type,

Re: [PATCH] drm/amdgpu: fix typo of domain fallback

2018-03-23 Thread Christian König
Am 23.03.2018 um 11:43 schrieb Chunming Zhou: Change-Id: I71c01f1526db785463af0ba3747fbd2ab8291d1f Signed-off-by: Chunming Zhou Ups, patch is Reviewed-by: Christian König . --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 1 file

[PATCH] drm/amd/pp: silence a static checker warning

2018-03-23 Thread Dan Carpenter
This has a static checker warning because "frev" and "crev" can be uninitialized if "info" is NULL. I just changed the order of the checks so that we check "info" first. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c

[PATCH 2/5] drm/amd/pp: Use gfx rlc funcs directly in powerplay

2018-03-23 Thread Rex Zhu
so we can deprecate the cgs interface Change-Id: Icac15ed7b46aa11009fb6845344fe6de7e6ce5d1 Signed-off-by: Rex Zhu --- .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 13 ++--- .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 63 -- 2 files changed,

[PATCH 3/5] drm/amdgpu: Get pci resource directly through adev

2018-03-23 Thread Rex Zhu
In order to remove the cgs wrapper function Change-Id: Ieb771ddfbd57def9b2a5b0fc124b496444f1fd7b Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git

[PATCH 5/5] drm/amdgpu: remove duplicate cg/pg wrapper functions

2018-03-23 Thread Rex Zhu
Change-Id: I567f3f3085bb59601b44bf8590ba4bdf1bb4df94 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c| 45 -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++-

[PATCH 1/5] drm/amd/pp: Remove DIDT feature support on driver on Vega12

2018-03-23 Thread Rex Zhu
Change-Id: I3517bc4402114890d7a2a6b16f1d98bbfcfb524d Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile |2 +- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 23 +- .../gpu/drm/amd/powerplay/hwmgr/vega12_powertune.c | 1364

[PATCH 4/5] drm/amdgpu: Delete some cgs functions

2018-03-23 Thread Rex Zhu
Drop cgs wrappers that are no longer uses. 1. cgs_rel_firmware 2. cgs_is_virtualization_enabled 3. cgs_notify_dpm_enabled Change-Id: I1253ed9c3a48658766cb4253b1baaba258e96a07 Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu ---

[PATCH] drm/amdgpu: fix typo of domain fallback

2018-03-23 Thread Chunming Zhou
Change-Id: I71c01f1526db785463af0ba3747fbd2ab8291d1f Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c