System freeze on display re-activation persists

2017-11-01 Thread Martin Babutzka
Dear AMD developers, I wanted to mention that the regression in amd-staging-drm-next which I reported on the 29.09. and the 06.10. still exists with the latest tree state of the branch. A crash/freeze occurs after the screen is re-enabled either from suspend or from screen locking (which shuts of

[pull] amdgpu drm-fixes-4.14

2017-11-01 Thread Alex Deucher
Hi Dave, Just two small patches for stable to fix the driver failing to load on polaris cards with harvested VCE or UVD blocks. The following changes since commit d3daa2c7865cbfa830651b11c8ad1df23465b46e: drm/amd/amdgpu: Remove workaround check for UVD6 on APUs (2017-10-25 09:32:14 -0400) ar

RE: [PATCH] Revert "drm/amd/scheduler:fix duplicate operation in entity fini"

2017-11-01 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Monk Liu > Sent: Wednesday, November 01, 2017 11:33 PM > To: amd-gfx@lists.freedesktop.org > Cc: Liu, Monk > Subject: [PATCH] Revert "drm/amd/scheduler:fix duplicate operation in > entity fini

[PATCH] Revert "drm/amd/scheduler:fix duplicate operation in entity fini"

2017-11-01 Thread Monk Liu
fix memory leak. This reverts commit d6951b49faa8447a6a77cdb1ef3346b1a1786d31. because when entity_fini is interrupted the jobs in queue still not processed with job_begin, so the finish_cb is not hooked on sched fence, we still need manually do cleanups. Change-Id: I6e17bfeeac85062bc52f1d51b96978

[PATCH 2/3] drm/amdgpu: release exclusive mode after hw_init if no kfd

2017-11-01 Thread Pixel Ding
From: pding KFD device init requires exclusive mode. Driver can release exclusive mode after hw_init if KFD is not enabled. Signed-off-by: pding --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 5 +++-- 2 files changed, 6 insertions(+), 2 del

[PATCH 3/3] drm/amdkfd: pass kgd to kfd inside device_init

2017-11-01 Thread Pixel Ding
From: pding KGD is possible not fully initialised in probe phase, so it's not safe to pass it in if kfd code tries to refer KGD here. Signed-off-by: pding --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 6 +++--- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 8 drivers/gpu/d

[PATCH 1/3] drm/amdgpu: wrap allocation for amdgpu_device

2017-11-01 Thread Pixel Ding
From: pding Add amdgpu_device_alloc() which was part of previous amdgpu_device_init(). Then it's flexible to handle init sequence since kfd has dependency to amdgpu_device base fields. Signed-off-by: pding --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 +-- drivers/gpu/drm/amd/amdgpu/amdg

release ex mode after hw_init if no KIQ

2017-11-01 Thread Pixel Ding
Hi Oded, There're 3 patches for releasing exclusive mode after hw_init if KIQ is not enabled. [PATCH 1/3] drm/amdgpu: wrap allocation for amdgpu_device Allocation of amdgpu_device and base fields are wrapped put it ahead. [PATCH 2/3] drm/amdgpu: release exclusive mode after hw_init if no [PATCH

Re: [PATCH] drm/ttm: Always and only destroy bo->ttm_resv in ttm_bo_release_list

2017-11-01 Thread Chunming Zhou
I think so, it should be enough we free it in the last place. We also find many issues for bo->resv and bo->ttm_resv when debugging PER-VM-BO feature, after ttm_bo_individualize_resv, we should set bo->resv = &bo->ttm_rev before adding to destroy list, and the root resv is preventing eviction

[PATCH 6/8] drm/amdgpu: Implement amdgpu SDMA functions for VI

2017-11-01 Thread Felix Kuehling
From: Philip Cox Signed-off-by: Philip Cox Signed-off-by: shaoyun liu Signed-off-by: Yong Zhao Signed-off-by: Jay Cornwall Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 85 --- drivers/gpu/drm/amd/amdgpu/vid.h | 2

[PATCH 8/8] drm/amdkfd: Implement amdkfd SDMA functions for VI

2017-11-01 Thread Felix Kuehling
From: Philip Cox Signed-off-by: Philip Cox Signed-off-by: shaoyun liu Signed-off-by: Jay Cornwall Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 103 +++- 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/a

[PATCH 5/8] drm/amdgpu: Add support for resuming SDMA queues w/o HWS

2017-11-01 Thread Felix Kuehling
Save wptr in hqd_sdma_destroy, restore it in hqd_sdma_load. Also read updated wptr from user mode when resuming an SDMA queue. Signed-off-by: Jay Cornwall Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 30 +++

[PATCH 2/8] drm/amdkfd: Correct SDMA ring buffer size

2017-11-01 Thread Felix Kuehling
From: shaoyunl ffs function return the position of the first bit set on 1 based. (bit zero returns 1). Signed-off-by: shaoyun liu Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/

[PATCH 7/8] drm/amdkfd: Use ASIC-specific SDMA MQD type

2017-11-01 Thread Felix Kuehling
Signed-off-by: shaoyun liu Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 13 + drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 5 + drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 2 -- 3 files changed, 10 insertions(+), 10 deletions

[PATCH 1/8] drm/amdgpu: Correct SDMA load/unload sequence on HWS disabled mode

2017-11-01 Thread Felix Kuehling
Fix the SDMA load and unload sequence as suggested by HW document. Signed-off-by: shaoyun liu Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 47 --- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/amd/amd

[PATCH 3/8] drm/amdkfd: Fix SDMA oversubsription handling

2017-11-01 Thread Felix Kuehling
SDMA only supports a fixed number of queues. HWS cannot handle oversubscription. Signed-off-by: shaoyun liu Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd

[PATCH 0/8] KFD SDMA support for GFX7 and GFX8 v2

2017-11-01 Thread Felix Kuehling
This patch series fixes SDMA user mode queue support for GFX7 and adds support for GFX8. v2: Rebased. radeon_kfd.c doesn't exist any more. Felix Kuehling (5): drm/amdgpu: Correct SDMA load/unload sequence on HWS disabled mode drm/amdkfd: Fix SDMA oversubsription handling drm/amd: Update kgd

[PATCH 4/8] drm/amd: Update kgd_kfd interface for resuming SDMA queues

2017-11-01 Thread Felix Kuehling
Add wptr and mm parameters to hqd_sdma_load and pass these parameters from device_queue_manager through the mqd_manager. SDMA doesn't support polling while the engine believes it's idle. The driver must update the wptr. The new parameters will be used for looking up the updated value from the spec

[PATCH 8/8] drm/amdkfd: Minor cleanups v2

2017-11-01 Thread Felix Kuehling
These were missed previously when rebasing changes for upstreaming. v2: Remove redundant sched_policy conditions Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 -- drivers/gpu/drm/amd/amdkfd/kfd_priv.h

[PATCH 4/8] drm/amdkfd: Fix debug unregister procedure on process termination v2

2017-11-01 Thread Felix Kuehling
From: Yair Shachar Take the dbgmgr lock and unregister before destroying the debug manager. Do this before destroying the queues. v2: Correct locking order in kfd_ioctl_dbg_register to ake sure the process mutex and dbgmgr mutex are always taken in the same order. Signed-off-by: Yair Shachar S

[PATCH 6/8] drm/amdkfd: Cleanup DQM ASIC-specific ops

2017-11-01 Thread Felix Kuehling
From: Yong Zhao Remove empty initialize function. Rename register_process to update_qpd to avoid confusion with the non-ASIC-specific register_process. Shorten ops_asic_specific to asic_ops. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay --- .../gpu/drm/amd

[PATCH 1/8] drm/amdkfd: Clean up the data structure in kfd_process

2017-11-01 Thread Felix Kuehling
From: Yong Zhao A list of per-process queues is maintained in the kfd_process_queue_manager, so the queues array in kfd_process is redundant and in fact unused. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 6 -

[PATCH 5/8] drm/amdkfd: Register/Deregister process on qpd resolution

2017-11-01 Thread Felix Kuehling
From: Ben Goz Process registration needs to happen on each device. So use per-device queue lists to determine when to register/deregister the process. Signed-off-by: Ben Goz Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 9

[PATCH 7/8] drm/amdkfd: Update queue_count before mapping queues

2017-11-01 Thread Felix Kuehling
map_queues_cpsch uses the queue_count to decide whether to upload a new runlist. So update the counter before calling it. Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c| 20 +++- 1 file changed, 11 insertions(+),

[PATCH 3/8] drm/amdkfd: Avoid calling amd_iommu_unbind_pasid() when suspending

2017-11-01 Thread Felix Kuehling
From: Yong Zhao When kfd suspending on APU, we do not need to call amd_iommu_unbind_pasid(), because pasid will be unbound automatically when power goes off. On the other hand, calling amd_iommu_unbind_pasid() will trigger kfd_process_iommu_unbind_callback() if the process is not terminating. By

[PATCH 2/8] drm/amdkfd: Disable CP/SDMA ring/doorbell in MQD

2017-11-01 Thread Felix Kuehling
From: Jay Cornwall The MQD represents an inactive context and should not have ring or doorbell enable bits set. Doing so interferes with HWS which streams the MQD onto the HQD. If enable bits are set this activates the ring or doorbell before the HQD is fully configured. Signed-off-by: Jay Cornw

[PATCH 0/8] More KFD fixes and cleanups v3

2017-11-01 Thread Felix Kuehling
Another pass through a diff between our internal branch and upstream yielded a few more fixes and cleanups that were previously missed. v2: Added a fix for a bug found when syncing upstreamed changes back into our internal branch (Update queue_count before mapping queues). Remove a redundant condi

RE: [PATCH xf86-video-ati] modesetting: Check crtc before searching link-status property

2017-11-01 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Wednesday, November 01, 2017 1:43 PM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-ati] modesetting: Check crtc before searching > link-status property

[PATCH xf86-video-ati] modesetting: Check crtc before searching link-status property

2017-11-01 Thread Michel Dänzer
From: Daniel Martin No need to lookup the link-status property if we don't have a crtc. Signed-off-by: Daniel Martin (Ported from xserver commit 8d7f7e24261e68459e6f0a865e243473f65fe7ad) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 8 +++- 1 file changed, 3 insertions(+), 5 de

[PATCH xf86-video-amdgpu] modesetting: Check crtc before searching link-status property

2017-11-01 Thread Michel Dänzer
From: Daniel Martin No need to lookup the link-status property if we don't have a crtc. Signed-off-by: Daniel Martin (Ported from xserver commit 8d7f7e24261e68459e6f0a865e243473f65fe7ad) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 8 +++- 1 file changed, 3 insertions(+), 5 de

Re: KASAN use-after-free report during piglit run

2017-11-01 Thread Michel Dänzer
On 01/11/17 09:47 AM, Christian König wrote: > Am 31.10.2017 um 18:58 schrieb Michel Dänzer: >> On 25/10/17 05:43 PM, Michel Dänzer wrote: >>> KASAN caught another use-after-free on my development machine today, see >>> the attached dmesg excerpt. There haven't been any related changes in >>> amd-s

[PATCH] drm/ttm: Always and only destroy bo->ttm_resv in ttm_bo_release_list

2017-11-01 Thread Michel Dänzer
From: Michel Dänzer Fixes a use-after-free due to a race condition in ttm_bo_cleanup_refs_and_unlock, which allows one task to reserve a BO and destroy its ttm_resv while another task is waiting for it to signal in reservation_object_wait_timeout_rcu. Fixes: 0d2bd2ae045d "drm/ttm: fix memory lea

Re: [PATCH] drm/amdgpu:read VRAMLOST from gim

2017-11-01 Thread Alex Deucher
On Tue, Oct 31, 2017 at 11:45 PM, Monk Liu wrote: > Change-Id: I6a268903465004d6e8f65f135734094772b9f614 > Signed-off-by: Monk Liu Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 - > drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 + > drivers/gpu/drm/amd

Re: [PATCH V3 2/2] drm/amd/display: Read resource_straps from registers for DCE12

2017-11-01 Thread Harry Wentland
On 2017-11-01 10:24 AM, sunpeng...@amd.com wrote: > From: "Leo (Sunpeng) Li" > > Now that the registers exist, assign them to the resource_straps struct. > > v2: Fix indentation > v3: Fix trailing whitespace and checkpatch warnings. > > Signed-off-by: Leo (Sunpeng) Li Series is Reviewed-by: H

Re: [PATCH 1/2] drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting

2017-11-01 Thread Leo Liu
On 11/01/2017 10:04 AM, Alex Deucher wrote: On Wed, Nov 1, 2017 at 9:10 AM, Leo Liu wrote: Signed-off-by: Leo Liu --- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.

[PATCH V3 2/2] drm/amd/display: Read resource_straps from registers for DCE12

2017-11-01 Thread sunpeng.li
From: "Leo (Sunpeng) Li" Now that the registers exist, assign them to the resource_straps struct. v2: Fix indentation v3: Fix trailing whitespace and checkpatch warnings. Signed-off-by: Leo (Sunpeng) Li --- .../gpu/drm/amd/display/dc/dce120/dce120_resource.c | 19 +-- 1 file

Re: [PATCH] drm/amd/powerplay: wrong control mode cause the fan spins faster unnecessarily

2017-11-01 Thread Alex Deucher
On Wed, Nov 1, 2017 at 5:24 AM, Evan Quan wrote: > The fan control mode can either be FDO_PWM_MODE_STATIC or > FDO_PWM_MODE_STATIC_RPM. > Setting it as AMD_FAN_CTRL_AUTO will cause the fan spin faster wrongly. > > This can be reproduced by: > '# cat /sys/class/hwmon/hwmon0/pwm1 >38 > '# cat /

Re: [PATCH 2/2] drm/amdgpu: allow harvesting check for Polaris VCE

2017-11-01 Thread Alex Deucher
On Wed, Nov 1, 2017 at 9:10 AM, Leo Liu wrote: > Signed-off-by: Leo Liu Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c > b/drivers/gpu/drm/amd/

Re: [PATCH 1/2] drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting

2017-11-01 Thread Alex Deucher
On Wed, Nov 1, 2017 at 9:10 AM, Leo Liu wrote: > Signed-off-by: Leo Liu > --- > drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c > b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c > index 7e4de3e6950f..0c01825a8b9e 1

Re: [Mesa-dev] [PATCH] amdgpu: Add R600_DEBUG flag to reserve VMID per ctx.

2017-11-01 Thread Marek Olšák
Yeah, it should be called when the winsys is created. Marek On Wed, Nov 1, 2017 at 9:49 AM, Christian König wrote: > I'm not 100% sure that patch was correct. > > When is amdgpu_ctx_create() called? The VMID is reserved for the whole > process, not just a context. > > Regards, > Christian. > > >

[PATCH 2/2] drm/amdgpu: allow harvesting check for Polaris VCE

2017-11-01 Thread Leo Liu
Signed-off-by: Leo Liu --- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c index 90332f55cfba..cf81065e3c5a 100644 --- a/drivers/gpu/drm/amd/amdgpu

[PATCH 1/2] drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting

2017-11-01 Thread Leo Liu
Signed-off-by: Leo Liu --- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c index 7e4de3e6950f..0c01825a8b9e 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +++ b/drivers

[PATCH] drm/amdgpu: refine SR-IOV firmware VRAM reservation to protect data

2017-11-01 Thread Horace Chen
The previous solution will create a zero buffer on the system domain and then move the zeroes to the VRAM. This will break the original data on the VRAM. Refine the code to create bo on VRAM domain directly and then remove and re-create mem node to the exact position before bo_pin. This can avoid

RE: [PATCH 1/3] drm/amdgpu: Add interface to protect VRAM at exact position

2017-11-01 Thread Liu, Monk
+ if (((domain & AMDGPU_GEM_DOMAIN_VRAM) || + (domain & AMDGPU_GEM_DOMAIN_GTT)) && offset != ~0) { Why not make it simple? Like: if ((domain & (AMDGPU_GEM_DOMAIN_VRAM|AMDGPU_GEM_DOMAIN_GTT)) && offset !=~0) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.fr

RE: [PATCH 3/3] drm/amdgpu: pick SR-IOV fw reservation information in atomfirmware

2017-11-01 Thread Liu, Monk
This one is already submitted -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Horace Chen Sent: 2017年11月1日 16:58 To: amd-gfx@lists.freedesktop.org Cc: Chen, Horace Subject: [PATCH 3/3] drm/amdgpu: pick SR-IOV fw reservation information in ato

RE: [PATCH 2/3] drm/amdgpu: change interface when firmware reserving vram

2017-11-01 Thread Liu, Monk
Reviewed-by: Monk Liu -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Horace Chen Sent: 2017年11月1日 16:58 To: amd-gfx@lists.freedesktop.org Cc: Chen, Horace Subject: [PATCH 2/3] drm/amdgpu: change interface when firmware reserving vram use am

Re: [PATCH 8/8] drm/amdkfd: Minor cleanups v2

2017-11-01 Thread Oded Gabbay
On Thu, Oct 26, 2017 at 1:41 AM, Felix Kuehling wrote: > These were missed previously when rebasing changes for upstreaming. > > v2: Remove redundant sched_policy conditions > > Signed-off-by: Felix Kuehling > --- > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 -- > drivers

Re: [PATCH 7/8] drm/amdkfd: Update queue_count before mapping queues

2017-11-01 Thread Oded Gabbay
On Thu, Oct 26, 2017 at 1:41 AM, Felix Kuehling wrote: > map_queues_cpsch uses the queue_count to decide whether to upload > a new runlist. So update the counter before calling it. > > Signed-off-by: Felix Kuehling > --- > .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c| 20 > +++-

Re: [PATCH 6/8] drm/amdkfd: Cleanup DQM ASIC-specific ops

2017-11-01 Thread Oded Gabbay
On Thu, Oct 26, 2017 at 1:41 AM, Felix Kuehling wrote: > From: Yong Zhao > > Remove empty initialize function. > > Rename register_process to update_qpd to avoid confusion with the > non-ASIC-specific register_process. > > Shorten ops_asic_specific to asic_ops. > > Signed-off-by: Yong Zhao > Sig

Re: [PATCH 5/8] drm/amdkfd: Register/Deregister process on qpd resolution

2017-11-01 Thread Oded Gabbay
On Thu, Oct 26, 2017 at 1:41 AM, Felix Kuehling wrote: > From: Ben Goz > > Process registration needs to happen on each device. So use per-device > queue lists to determine when to register/deregister the process. > > Signed-off-by: Ben Goz > Signed-off-by: Felix Kuehling > --- > drivers/gpu/d

Re: [PATCH 4/8] drm/amdkfd: Fix debug unregister procedure on process termination

2017-11-01 Thread Oded Gabbay
On Thu, Oct 26, 2017 at 1:41 AM, Felix Kuehling wrote: > From: Yair Shachar > > Take the dbgmgr lock and unregister before destroying the debug manager. > Do this before destroying the queues. > > Signed-off-by: Yair Shachar > Signed-off-by: Felix Kuehling > --- > drivers/gpu/drm/amd/amdkfd/kf

RE: [PATCH 2/2] drm/amdgpu:cleanup deprecated gpu reset logic

2017-11-01 Thread Liu, Monk
Sounds feasible, only this step looks need some investigation on hardware side: >in gfx_v9_0_priv_reg_irq() (and all the other IRQ handlers as well) we add >functionality to figure out the ring/scheduler which caused the illegal >operation. e.g. : gfx_v9_priv_reg_irq(struct amdgpu_device *adev

Re: [PATCH 3/8] drm/amdkfd: Avoid calling amd_iommu_unbind_pasid() when suspending

2017-11-01 Thread Oded Gabbay
On Thu, Oct 26, 2017 at 1:41 AM, Felix Kuehling wrote: > From: Yong Zhao > > When kfd suspending on APU, we do not need to call > amd_iommu_unbind_pasid(), because pasid will be unbound automatically > when power goes off. > > On the other hand, calling amd_iommu_unbind_pasid() will trigger > kfd

Re: [PATCH 2/8] drm/amdkfd: Disable CP/SDMA ring/doorbell in MQD

2017-11-01 Thread Oded Gabbay
On Thu, Oct 26, 2017 at 1:41 AM, Felix Kuehling wrote: > From: Jay Cornwall > > The MQD represents an inactive context and should not have ring or > doorbell enable bits set. Doing so interferes with HWS which streams > the MQD onto the HQD. If enable bits are set this activates the ring > or doo

Re: [PATCH 1/8] drm/amdkfd: Clean up the data structure in kfd_process

2017-11-01 Thread Oded Gabbay
On Thu, Oct 26, 2017 at 1:41 AM, Felix Kuehling wrote: > From: Yong Zhao > > A list of per-process queues is maintained in the > kfd_process_queue_manager, so the queues array in kfd_process is > redundant and in fact unused. > > Signed-off-by: Yong Zhao > Signed-off-by: Felix Kuehling > --- >

[PATCH 3/3] drm/amdgpu: pick SR-IOV fw reservation information in atomfirmware

2017-11-01 Thread Horace Chen
SR-IOV need to get start offset and size from firmware for its vram reservation. This logic had been add to the atombios code path. As the current branch will run atomfirmware by default, add same logic to atomfirmware code path. Signed-off-by: Horace Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH] drm/amd/powerplay: wrong control mode cause the fan spins faster unnecessarily

2017-11-01 Thread Evan Quan
The fan control mode can either be FDO_PWM_MODE_STATIC or FDO_PWM_MODE_STATIC_RPM. Setting it as AMD_FAN_CTRL_AUTO will cause the fan spin faster wrongly. This can be reproduced by: '# cat /sys/class/hwmon/hwmon0/pwm1 38 '# cat /sys/class/hwmon/hwmon0/pwm1_enable 2 '# echo "2" > /sys/class/

[PATCH 2/3] drm/amdgpu: change interface when firmware reserving vram

2017-11-01 Thread Horace Chen
use amdgpu_bo_create_vram_restricted_kernel to reserve bo at specified position and keep the original data intact. Signed-off-by: Horace Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 44 ++ 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/drivers

Re: [PATCH 1/3] drm/amdgpu: Add interface to protect VRAM at exact position

2017-11-01 Thread Christian König
Am 01.11.2017 um 09:58 schrieb Horace Chen: The existing method to reserve specified VRAM is to create a bo on system domain then pin it to VRAM. But in this process the existing data on the VRAM will be broken, because ttm will allocate a zero buffer on system domain then copy the zeroes to VRAM

[PATCH 1/3] drm/amdgpu: Add interface to protect VRAM at exact position

2017-11-01 Thread Horace Chen
The existing method to reserve specified VRAM is to create a bo on system domain then pin it to VRAM. But in this process the existing data on the VRAM will be broken, because ttm will allocate a zero buffer on system domain then copy the zeroes to VRAM. Actually SRIOV need to reserve VRAM to prot

Re: [Mesa-dev] [PATCH] amdgpu: Add R600_DEBUG flag to reserve VMID per ctx.

2017-11-01 Thread Christian König
I'm not 100% sure that patch was correct. When is amdgpu_ctx_create() called? The VMID is reserved for the whole process, not just a context. Regards, Christian. Am 31.10.2017 um 16:57 schrieb Marek Olšák: I addressed the feedback and pushed the patch. Marek On Tue, Oct 31, 2017 at 4:50 PM

Re: KASAN use-after-free report during piglit run

2017-11-01 Thread Christian König
Am 31.10.2017 um 18:58 schrieb Michel Dänzer: On 25/10/17 05:43 PM, Michel Dänzer wrote: KASAN caught another use-after-free on my development machine today, see the attached dmesg excerpt. There haven't been any related changes in amd-staging-drm-next since yesterday, so maybe userspace is just

Re: [PATCH] amdgpu: Add R600_DEBUG flag to reserve VMID per ctx.

2017-11-01 Thread Christian König
Am 31.10.2017 um 16:50 schrieb Michel Dänzer: On 31/10/17 04:40 PM, Andrey Grodzovsky wrote: Signed-off-by: Andrey Grodzovsky [...] diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index 8f43e93..1155492 100644 --- a/src/gallium/winsys/amdgp

Re: [PATCH 2/2] drm/amdgpu:cleanup deprecated gpu reset logic

2017-11-01 Thread Christian König
Am 01.11.2017 um 04:29 schrieb Liu, Monk: The thing is triggering gpu_recover() in irq routine give you NULL for the @bad/job parameter, so gpu_recover() actually did nothing meaningful, it just repeat scheduling un-signaled jobs again and again, and finally your GPU is stuck with infinite rec

Re: [PATCH] drm/amdgpu: release exclusive mode after hw_init if no kfd

2017-11-01 Thread Oded Gabbay
Tom, AFAIK, you can't manually load the amdkfd driver. i.e. it simply won't work, with or without this change. It must be loaded in a certain order (in relation to amdgpu and amd_iommu_v2) during Linux boot. That issue is one that has been with us from the start and has received justified criticism

Re: [PATCH 00/17] KFD interrupt and signal event handling improvements v2

2017-11-01 Thread Oded Gabbay
Hi, I've taken the patch-set to -next. Oded On Sat, Oct 28, 2017 at 2:35 AM, Felix Kuehling wrote: > This patch series improves interrupt handling latency, signal event > processing overhead and replaces some custom data structures with > standard kernel data structures (idr, kfifo, waitqueue).

Re: [PATCH] drm/radeon: deprecate and remove KFD interface

2017-11-01 Thread Oded Gabbay
ok, taken to -next. On Tue, Oct 31, 2017 at 4:56 PM, Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 31.10.2017 um 11:44 schrieb Oded Gabbay: > >> Don't have any strong objection, but I just want to ask if current >> users can just move to using amdgpu on KV and their current user

Re: release exclusive mode after hw init if no kfd

2017-11-01 Thread Ding, Pixel
Hi Oded, Please ignore them so far. I need to consider more like that the probe is included in retry init logics. — Sincerely Yours, Pixel On 01/11/2017, 1:53 PM, "amd-gfx on behalf of Pixel Ding" wrote: >Hi Oded, > >Please review. > >[PATCH 1/2] drm/amdkfd: initialise kgd field insid