[PATCH] drm/amdkfd: Use gpu_offset for user queue's wptr

2023-09-14 Thread YuBiao Wang
Directly use tbo's start address will miss the domain start offset. Need to use gpu_offset instead. Signed-off-by: YuBiao Wang --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] drm/amdgpu: use error code EOPNOTSUPP instead of ENOTSUPPT

2023-09-14 Thread Yang Wang
WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP $ find drivers/gpu/drm/amd -type f \ -exec sed -i 's/\-ENOTSUPP/\-EOPNOTSUPP/g' {} \; Signed-off-by: Yang Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 2 +-

Re: [PATCH] drm/amd/display: fix the ability to use lower resolution modes on eDP

2023-09-14 Thread Hamza Mahfooz
On 9/14/23 17:04, Hamza Mahfooz wrote: On 9/14/23 16:40, Harry Wentland wrote: On 2023-09-14 13:53, Hamza Mahfooz wrote: On eDP we can receive invalid modes from dm_update_crtc_state() for entirely new streams for which drm_mode_set_crtcinfo() shouldn't be called on. So, instead of calling

Re: [PATCH] drm/amd/display: fix the ability to use lower resolution modes on eDP

2023-09-14 Thread Hamza Mahfooz
On 9/14/23 16:40, Harry Wentland wrote: On 2023-09-14 13:53, Hamza Mahfooz wrote: On eDP we can receive invalid modes from dm_update_crtc_state() for entirely new streams for which drm_mode_set_crtcinfo() shouldn't be called on. So, instead of calling drm_mode_set_crtcinfo() from within

Re: [PATCH] drm/amd/display: Handle NULL dccg in dce110_disable_stream

2023-09-14 Thread Alex Deucher
On Mon, Sep 11, 2023 at 10:36 AM Michel Dänzer wrote: > > From: Michel Dänzer > > It can be NULL e.g. with Raven. > > Fixes: 927e784c180c ("drm/amd/display: Add symclk enable/disable during > stream enable/disable") > Signed-off-by: Michel Dänzer Looks like this was fixed in:

Re: [PATCH] fix a memory leak in amdgpu_ras_feature_enable

2023-09-14 Thread Alex Deucher
Applied. Thanks! On Thu, Sep 14, 2023 at 5:53 AM Zhang, Hawking wrote: > > [AMD Official Use Only - General] > > Reviewed-by: Hawking Zhang > > Regards, > Hawking > -Original Message- > From: Cong Liu > Sent: Thursday, September 14, 2023 17:46 > To: Deucher, Alexander ; Koenig,

Re: [PATCH] drm/amd/display: fix the ability to use lower resolution modes on eDP

2023-09-14 Thread Harry Wentland
On 2023-09-14 13:53, Hamza Mahfooz wrote: > On eDP we can receive invalid modes from dm_update_crtc_state() for > entirely new streams for which drm_mode_set_crtcinfo() shouldn't be > called on. So, instead of calling drm_mode_set_crtcinfo() from within > create_stream_for_sink() we can instead

[PATCH 4/4] drm/amdgpu/gmc11: disable AGP on GC 11.5

2023-09-14 Thread Alex Deucher
AGP aperture is deprecated and no longer functional. v2: fix typo (Alex) Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c index

[PATCH 3/4] drm/amdgpu/gmc: add a flag to disable AGP

2023-09-14 Thread Alex Deucher
Allows the driver to disable the AGP aperture when it's not needed. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 1/4] drm/amdgpu/gmc: add a way to force a particular placement for GART

2023-09-14 Thread Alex Deucher
We normally place GART based on the location of VRAM and the available address space around that, but provide an option to force a particular location for hardware that needs it. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 19 +++

[PATCH 2/4] drm/amdgpu/gmc11: set gart placement GC11

2023-09-14 Thread Alex Deucher
Needed to avoid a hardware issue. v2: force high for all GC11 parts for consistency (Alex) Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c

Re: [PATCH v2] drm/amdkfd: Use partial migrations in GPU page faults

2023-09-14 Thread Felix Kuehling
On 2023-09-14 10:59, Chen, Xiaogang wrote: On 9/13/2023 5:03 PM, Felix Kuehling wrote: On 2023-09-11 10:04, Xiaogang.Chen wrote: From: Xiaogang Chen This patch implements partial migration in gpu page fault according to migration granularity(default 2MB) and not split svm range in cpu

Re: [PATCH 4/4] drm/amdgpu/gmc11: disable AGP on GC 11.5

2023-09-14 Thread Alex Deucher
On Thu, Sep 14, 2023 at 2:31 PM Alex Deucher wrote: > > AGP aperture is deprecated and no longer functional. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c >

[PATCH 2/4] drm/amdgpu/gmc11: set gart placement GC11

2023-09-14 Thread Alex Deucher
Needed to avoid a hardware issue. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c index e1f47f9c1881..6947b598e9b2 100644 ---

[PATCH 3/4] drm/amdgpu/gmc: add a flag to disable AGP

2023-09-14 Thread Alex Deucher
Allows the driver to disable the AGP aperture when it's not needed. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 4/4] drm/amdgpu/gmc11: disable AGP on GC 11.5

2023-09-14 Thread Alex Deucher
AGP aperture is deprecated and no longer functional. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c index 6947b598e9b2..7ee91b66f761

[PATCH 1/4] drm/amdgpu/gmc: add a way to force a particular placement for GART

2023-09-14 Thread Alex Deucher
We normally place GART based on the location of VRAM and the available address space around that, but provide an option to force a particular location for hardware that needs it. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 19 +++

[PATCH] drm/amd/display: fix the ability to use lower resolution modes on eDP

2023-09-14 Thread Hamza Mahfooz
On eDP we can receive invalid modes from dm_update_crtc_state() for entirely new streams for which drm_mode_set_crtcinfo() shouldn't be called on. So, instead of calling drm_mode_set_crtcinfo() from within create_stream_for_sink() we can instead call it from amdgpu_dm_connector_mode_valid().

RE: [PATCH] drm/amdkfd: Align unique_id format to match amdgpu

2023-09-14 Thread Russell, Kent
[AMD Official Use Only - General] > -Original Message- > From: Kuehling, Felix > Sent: Thursday, September 14, 2023 1:25 PM > To: Russell, Kent ; amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH] drm/amdkfd: Align unique_id format to match amdgpu > > > On 2023-09-14 13:09, Kent

Re: [PATCH 27/28] drm/amd/display: Drop unused code

2023-09-14 Thread Harry Wentland
On 2023-09-13 22:00, Rodrigo Siqueira wrote: > There are multiple parts of the code that DC does not use anymore, and > this commit drops those dead codes. > > Signed-off-by: Rodrigo Siqueira The commit title is a bit non-descript. I think something like "drop unused link_fpga.c" would be

Re: [PATCH] drm/amdkfd: Align unique_id format to match amdgpu

2023-09-14 Thread Felix Kuehling
On 2023-09-14 13:09, Kent Russell wrote: unique_id is printed as %016llx in amdgpu, but %llu in KFD. Call the sysfs_show_gen_prop function directly and use the %016llx format, to align with amdgpu. Don't need to add a new macro since this is a one-off. Doesn't this break the ABI? Any tool

[PATCH] drm/amdkfd: Align unique_id format to match amdgpu

2023-09-14 Thread Kent Russell
unique_id is printed as %016llx in amdgpu, but %llu in KFD. Call the sysfs_show_gen_prop function directly and use the %016llx format, to align with amdgpu. Don't need to add a new macro since this is a one-off. Signed-off-by: Kent Russell --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 1

[PATCH] drm/amdgpu: update IP count INFO query

2023-09-14 Thread Sathishkumar S
update the query to return the number of functional instances where there is more than an instance of the requested type and for others continue to return one. Signed-off-by: Sathishkumar S --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 90 + 1 file changed, 61

Re: [PATCH v2] drm/amdkfd: Use partial migrations in GPU page faults

2023-09-14 Thread Chen, Xiaogang
On 9/13/2023 5:03 PM, Felix Kuehling wrote: On 2023-09-11 10:04, Xiaogang.Chen wrote: From: Xiaogang Chen This patch implements partial migration in gpu page fault according to migration granularity(default 2MB) and not split svm range in cpu page fault handling. A svm range may include

[PATCH v4] drm/amdgpu: Add EXT_COHERENT memory allocation flags

2023-09-14 Thread David Francis
These flags (for GEM and SVM allocations) allocate memory that allows for system-scope atomic semantics. On GFX943 these flags cause caches to be avoided on non-local memory. On all other ASICs they are identical in functionality to the equivalent COHERENT flags. Corresponding Thunk patch is at

Re: [PATCH v2] drm/amdgpu: always use legacy tlb flush on cyan_skilfish

2023-09-14 Thread Felix Kuehling
On 2023-09-14 10:02, Christian König wrote: Am 14.09.23 um 15:59 schrieb Felix Kuehling: On 2023-09-14 9:39, Christian König wrote: Is a single legacy flush sufficient to emulate an heavyweight flush as well? On previous generations we needed to issue at least two legacy flushes for

Re: [PATCH v2] drm/amdgpu: always use legacy tlb flush on cyan_skilfish

2023-09-14 Thread Christian König
Am 14.09.23 um 15:59 schrieb Felix Kuehling: On 2023-09-14 9:39, Christian König wrote: Is a single legacy flush sufficient to emulate an heavyweight flush as well? On previous generations we needed to issue at least two legacy flushes for this. I assume you are referring to the Vega20

Re: [PATCH v2] drm/amdgpu: always use legacy tlb flush on cyan_skilfish

2023-09-14 Thread Felix Kuehling
On 2023-09-14 9:39, Christian König wrote: Is a single legacy flush sufficient to emulate an heavyweight flush as well? On previous generations we needed to issue at least two legacy flushes for this. I assume you are referring to the Vega20 XGMI workaround. That is a very different issue.

Re: [PATCH] drm/amdkfd: fix add queue process context clear without runtime enable

2023-09-14 Thread Eric Huang
On 2023-09-12 21:52, Jonathan Kim wrote: There are cases where HSA runtime is not enabled through the AMDKFD_IOC_RUNTIME_ENABLE call when adding queues and the MES ADD_QUEUE API should clear the MES process context instead of SET_SHADER_DEBUGGER. Such examples are legacy HSA runtime builds

Re: 回复: [PATCH] drm/amdgpu: Ignore first evction failure during suspend

2023-09-14 Thread Christian König
Am 14.09.23 um 15:37 schrieb Felix Kuehling: Userptr and SVM restore work is scheduled to the system WQ with schedule_delayed_work. See amdgpu_amdkfd_evict_userptr and svm_range_evict. This would need to use queue_delayed_work with the system_freezable_wq. BO restoration is scheduled with

RE: [PATCH] drm/amd/pm: Remove SMUv13.0.6 unsupported feature

2023-09-14 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: Lazar, Lijo Sent: Thursday, September 14, 2023 9:06 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Deucher, Alexander ; Kamal, Asad ; Wang, Yang(Kevin) Subject: [PATCH]

Re: [PATCH v2] drm/amdgpu: always use legacy tlb flush on cyan_skilfish

2023-09-14 Thread Christian König
Is a single legacy flush sufficient to emulate an heavyweight flush as well? On previous generations we needed to issue at least two legacy flushes for this. And please don't push before getting an rb from Felix as well. Regards, Christian. Am 14.09.23 um 11:23 schrieb Lang Yu:

Re: 回复: [PATCH] drm/amdgpu: Ignore first evction failure during suspend

2023-09-14 Thread Felix Kuehling
Userptr and SVM restore work is scheduled to the system WQ with schedule_delayed_work. See amdgpu_amdkfd_evict_userptr and svm_range_evict. This would need to use queue_delayed_work with the system_freezable_wq. BO restoration is scheduled with queue_delayed_work on our own kfd_restore_wq

Re: [PATCH] drm/amd/pm: Remove SMUv13.0.6 unsupported feature

2023-09-14 Thread Alex Deucher
On Thu, Sep 14, 2023 at 9:31 AM Lijo Lazar wrote: > > Selectively updating feature mask is not supported in SMU v13.0.6. > Remove the callback corresponding to that. > > Signed-off-by: Lijo Lazar Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 1 - > 1

[PATCH] fix a memory leak in amdgpu_ras_feature_enable

2023-09-14 Thread Cong Liu
This patch fixes a memory leak in the amdgpu_ras_feature_enable() function. The leak occurs when the function sends a command to the firmware to enable or disable a RAS feature for a GFX block. If the command fails, the kfree() function is not called to free the info memory. Fixes: bf7aa8bea9cb

Fwd: Kernel 6.6-rc1 fails to reboot or shutdown Ryzen 5825U

2023-09-14 Thread Bagas Sanjaya
Hi, I notice a regression report on Bugzilla [1]. Quoting from it: > The Kernel stalls at boot very long with a drm-amdgpu message, but fails to > restart or shutdown with secure boot enabled or not. Magic key works to exit. > Nothing wrong in the Kernel 6.5 cycle. Later, the reporter (Cc'ed)

[PATCH] alpha: clean up some inconsistent indenting

2023-09-14 Thread Jiapeng Chong
No functional modification involved. drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c:491 dcn32_auto_dpm_test_log() warn: inconsistent indenting. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6574 Signed-off-by: Jiapeng Chong ---

[PATCH] drm/amd/pm: Remove SMUv13.0.6 unsupported feature

2023-09-14 Thread Lijo Lazar
Selectively updating feature mask is not supported in SMU v13.0.6. Remove the callback corresponding to that. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 1 - 1 file changed, 1 deletion(-) diff --git

RE: [PATCH] drm/amdgpu: Fix vbios version string search

2023-09-14 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Lazar, Lijo Sent: Thursday, September 14, 2023 17:24 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Deucher, Alexander Subject: [PATCH] drm/amdgpu: Fix vbios version string

RE: [PATCH] fix a memory leak in amdgpu_ras_feature_enable

2023-09-14 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Cong Liu Sent: Thursday, September 14, 2023 17:46 To: Deucher, Alexander ; Koenig, Christian ; Pan, Xinhui ; David Airlie ; Daniel Vetter ; Yang, Stanley ; Zhang, Hawking Cc: Cong

RE: [PATCH v2] drm/amdgpu: always use legacy tlb flush on cyan_skilfish

2023-09-14 Thread Zhang, Yifan
[AMD Official Use Only - General] This patch is : Reviewed-by: Yifan Zhang -Original Message- From: Yu, Lang Sent: Thursday, September 14, 2023 5:24 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian ; Zhang, Yifan ; Yu, Lang ; sta...@vger.kernel.org

[PATCH v2] drm/amdgpu: always use legacy tlb flush on cyan_skilfish

2023-09-14 Thread Lang Yu
cyan_skilfish has problems with other flush types. v2: fix incorrect ternary conditional operator usage.(Yifan) Signed-off-by: Lang Yu Cc: # v5.15+ --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[PATCH] drm/amdgpu: Fix vbios version string search

2023-09-14 Thread Lijo Lazar
Search for vbios version string in STRING_OFFSET-ATOM_ROM_HEADER region first. If those offsets are not populated, use the hardcoded region. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/atom.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] drm/amdgpu: always use legacy tlb flush on cyan_skilfish

2023-09-14 Thread Lang Yu
On 09/14/ , Zhang, Yifan wrote: > [Public] > > -Original Message- > From: amd-gfx On Behalf Of Lang Yu > Sent: Thursday, September 14, 2023 3:00 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Yu, Lang > ; Koenig, Christian ; > sta...@vger.kernel.org > Subject:

RE: [PATCH] drm/amdgpu: always use legacy tlb flush on cyan_skilfish

2023-09-14 Thread Zhang, Yifan
[Public] -Original Message- From: amd-gfx On Behalf Of Lang Yu Sent: Thursday, September 14, 2023 3:00 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Yu, Lang ; Koenig, Christian ; sta...@vger.kernel.org Subject: [PATCH] drm/amdgpu: always use legacy tlb flush on

Re: [PATCH v6 4/9] drm/amdgpu: create GFX-gen11 usermode queue

2023-09-14 Thread Shashank Sharma
On 14/09/2023 09:45, Christian König wrote: Am 08.09.23 um 18:04 schrieb Shashank Sharma: A Memory queue descriptor (MQD) of a userqueue defines it in the hw's context. As MQD format can vary between different graphics IPs, we need gfx GEN specific handlers to create MQDs. This patch: -

Re: [PATCH v6 4/9] drm/amdgpu: create GFX-gen11 usermode queue

2023-09-14 Thread Christian König
Am 08.09.23 um 18:04 schrieb Shashank Sharma: A Memory queue descriptor (MQD) of a userqueue defines it in the hw's context. As MQD format can vary between different graphics IPs, we need gfx GEN specific handlers to create MQDs. This patch: - Introduces MQD handler functions for the usermode

[PATCH] drm/amdgpu: always use legacy tlb flush on cyan_skilfish

2023-09-14 Thread Lang Yu
cyan_skilfish has problems with other flush types. Signed-off-by: Lang Yu Cc: # v5.15+ --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c index

RE: [PATCH] Revert "drm/amdgpu: Report vbios version instead of PN"

2023-09-14 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Lazar, Lijo Sent: Thursday, September 14, 2023 14:18 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Deucher, Alexander Subject: [PATCH] Revert "drm/amdgpu: Report vbios

Re: 回复: [PATCH] drm/amdgpu: Ignore first evction failure during suspend

2023-09-14 Thread Christian König
[putting Harry on BCC, sorry for the noise] Yeah, that is clearly a bug in the KFD. During the second eviction the hw should already be disabled, so we don't have any SDMA or similar to evict BOs any more and can only copy them with the CPU. @Felix what workqueue do you guys use for the

[PATCH] Revert "drm/amdgpu: Report vbios version instead of PN"

2023-09-14 Thread Lijo Lazar
This reverts commit c187a67725b47f9c1603359a51b79cc19e27442a. vbios_version sysfs node is used to identify Part Number also. Revert to the same so that it doesn't break scripts/software which parse this. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 2 +- 1 file