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
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
> -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
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
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
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
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
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
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
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
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
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 +++
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/
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
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
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
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
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
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
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
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
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 -
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
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(+),
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
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
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
> -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
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
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
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
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
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
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
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.
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
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 /
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/
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
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.
>
>
>
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
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
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
+ 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
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
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
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
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
> +++-
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
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
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
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
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
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
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
> ---
>
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_
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/
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
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
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
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
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
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
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
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
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).
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
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
68 matches
Mail list logo