[PATCH] drm/amdgpu: correct gpu clock counter query on cyan skilfish

2023-09-20 Thread Lang Yu
Cayn skilfish uses SMUIO v11.0.8 offset. Signed-off-by: Lang Yu Cc: # v5.15+ --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index

[PATCH] drm/amdgpu: correct gpu clock counter query on cyan skilfish

2023-09-20 Thread Lang Yu
Cayn skilfish uses SMUIO v11.0.8 offset. Signed-off-by: Lang Yu Cc: # v5.15+ --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index

[PATCH] drm/amdgpu:Expose physical id of device in XGMI hive

2023-09-20 Thread Mangesh Gadre
This identifies the physical ordering of devices in the hive Signed-off-by: Mangesh Gadre Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c

[PATCH] drm/amdgpu: Move kfd suspend before evict resource

2023-09-20 Thread xinhui pan
Like amdgpu_device_reset_sriov does, kfd suspend should be called at the beginning to make sure kfd BO is idle. Otherwise the extra amdgpu_device_evict_resources fails or amdgpu_virt_request_full_gpu timeout. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1

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

2023-09-20 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Series is. Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Thursday, September 21, 2023 1:58 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 3/3]

[pull] amdgpu, amdkfd drm-fixes-6.6

2023-09-20 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 6.6. The following changes since commit ce9ecca0238b140b88f43859b211c9fdfd8e5b70: Linux 6.6-rc2 (2023-09-17 14:40:24 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes-6.6-2023-09-20 for you to

[PATCH] drm/amdgpu: fix ip count query for xcp partitions

2023-09-20 Thread Sathishkumar S
fix wrong ip count INFO on spatial partitions. update the query to return the instance count corresponding to the partition id. Signed-off-by: Sathishkumar S --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 32 + 1 file changed, 32 insertions(+) diff --git

[PATCH] drm/amd/display: switch DC over to the new DRM logging macros

2023-09-20 Thread Hamza Mahfooz
For multi-GPU systems it is difficult to tell which GPU a particular message is being printed for and that is undesirable because it complicates debugging efforts. Also, the new macros allow us to enable logging for particular parts of the codebase more selectively (since we no longer need to

Re: [PATCH 2/2] drm/amd/pm: Add GC v9.4.3 thermal limits to hwmon

2023-09-20 Thread Deucher, Alexander
[AMD Official Use Only - General] Series is: Acked-by: Alex Deucher On a somewhat related note, we should fix the hysteresis values. They are currently set to the min and max temperatures which IIRC was not the intent of these values in hwmon. Alex From:

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

2023-09-20 Thread Alex Deucher
AGP aperture is deprecated and no longer functional. v2: fix typo (Alex) v3: just skip the agp setup call v4: revert back to the original model Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 1/3] drm/amdgpu/gmc6-8: properly disable the AGP aperture

2023-09-20 Thread Alex Deucher
The BOT register needs to be larger than the TOP register for this to be properly disabled. The lower 22 bits of the BOT address are always 0 and the lower 22 bits of the TOP register are always 1 so you need to make the upper bits of BOT larger than the upper bits of BOT. Signed-off-by: Alex

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

2023-09-20 Thread Alex Deucher
Allows the driver to disable the AGP aperture when it's not needed. Program AGP explictly for all asics, but set the flag to align with previous behavior. No functional change. v2: rework patch v3: fix broken rebase Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c

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

2023-09-20 Thread Alex Deucher
Allows the driver to disable the AGP aperture when it's not needed. Program AGP explictly for all asics, but set the flag to align with previous behavior. No functional change. v2: rework patch Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 2 +-

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

2023-09-20 Thread Alex Deucher
AGP aperture is deprecated and no longer functional. v2: fix typo (Alex) v3: just skip the agp setup call v4: revert back to the original model Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 1/3] drm/amdgpu/gmc6-8: properly disable the AGP aperture

2023-09-20 Thread Alex Deucher
The BOT register needs to be larger than the TOP register for this to be properly disabled. The lower 22 bits of the BOT address are always 0 and the lower 22 bits of the TOP register are always 1 so you need to make the upper bits of BOT larger than the upper bits of BOT. Signed-off-by: Alex

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

2023-09-20 Thread Xiaogang . Chen
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 pages from both system ram and vram of one gpu now. These chagnes are expected to improve

[PATCH v2] drm/amdkfd: fix some race conditions in vram buffer alloc/free of svm code

2023-09-20 Thread Xiaogang . Chen
From: Xiaogang Chen This patch fixes: 1: ref number of prange's svm_bo got decreased by an async call from hmm. When wait svm_bo of prange got released we shoul also wait prang->svm_bo become NULL, otherwise prange->svm_bo may be set to null after allocate new vram buffer. 2: During waiting

Re: [PATCH] drm/amdkfd: fix some race conditions in vram buffer alloc/free of svm code

2023-09-20 Thread Chen, Xiaogang
On 9/20/2023 9:55 AM, Felix Kuehling wrote: On 2023-09-20 2:17, Xiaogang.Chen wrote: From: Xiaogang Chen This patch fixes: 1: ref number of prange's svm_bo got decreased by an async call from hmm. When wait svm_bo of prange got released we shoul also wait prang->svm_bo become NULL,

[PATCH v4] drm/amdkfd: Handle errors from svm validate and map

2023-09-20 Thread Philip Yang
If new range is splited to multiple pranges with max_svm_range_pages alignment and added to update_list, svm validate and map should keep going after error to make sure prange->mapped_to_gpu flag is up to date for the whole range. svm validate and map update set prange->mapped_to_gpu after

Re: [PATCH v3] drm/amdkfd: Handle errors from svm validate and map

2023-09-20 Thread Philip Yang
On 2023-09-20 10:35, Felix Kuehling wrote: On 2023-09-20 10:20, Philip Yang wrote: On 2023-09-19 17:15, Felix Kuehling wrote: On 2023-09-19 10:21, Philip Yang wrote:

Re: [PATCH v6 6/9] drm/amdgpu: map usermode queue into MES

2023-09-20 Thread Alex Deucher
On Fri, Sep 8, 2023 at 12:20 PM Shashank Sharma wrote: > > This patch adds new functions to map/unmap a usermode queue into > the FW, using the MES ring. As soon as this mapping is done, the > queue would be considered ready to accept the workload. > > V1: Addressed review comments from Alex on

Re: [PATCH v6 9/9] drm/amdgpu: cleanup leftover queues

2023-09-20 Thread Alex Deucher
On Fri, Sep 8, 2023 at 12:25 PM Shashank Sharma wrote: > > This patch adds code to cleanup any leftover userqueues which > a user might have missed to destroy due to a crash or any other > programming error. > > Cc: Alex Deucher > Cc: Christian Koenig > Suggested-by: Bas Nieuwenhuizen >

Re: [PATCH v6 8/9] drm/amdgpu: generate doorbell index for userqueue

2023-09-20 Thread Alex Deucher
On Fri, Sep 8, 2023 at 11:55 PM Shashank Sharma wrote: > > The userspace sends us the doorbell object and the relative doobell > index in the object to be used for the usermode queue, but the FW > expects the absolute doorbell index on the PCI BAR in the MQD. This > patch adds a function to

Re: [PATCH v6 6/9] drm/amdgpu: map usermode queue into MES

2023-09-20 Thread Alex Deucher
On Fri, Sep 8, 2023 at 12:20 PM Shashank Sharma wrote: > > This patch adds new functions to map/unmap a usermode queue into > the FW, using the MES ring. As soon as this mapping is done, the > queue would be considered ready to accept the workload. > > V1: Addressed review comments from Alex on

Re: [PATCH v6 5/9] drm/amdgpu: create context space for usermode queue

2023-09-20 Thread Alex Deucher
On Fri, Sep 8, 2023 at 12:45 PM Shashank Sharma wrote: > > The FW expects us to allocate at least one page as context > space to process gang, process, GDS and FW related work. > This patch creates a joint object for the same, and calculates > GPU space offsets of these spaces. > > V1: Addressed

Re: [PATCH] drm/amd/display: fix some style issues

2023-09-20 Thread Hamza Mahfooz
On 9/20/23 09:41, Alex Deucher wrote: Fixes a few style issues: - Only calculate the dto_params and dp_hpo_inst when dccg is present. - Fix indentation - Drop empty else block Fixes: 7f7925e25828 ("drm/amd/display: Fix MST recognizes connected displays as one") Cc: Muhammad Ahmed Cc: Michel

Re: [PATCH] drm/amdkfd: fix some race conditions in vram buffer alloc/free of svm code

2023-09-20 Thread Felix Kuehling
On 2023-09-20 2:17, Xiaogang.Chen wrote: From: Xiaogang Chen This patch fixes: 1: ref number of prange's svm_bo got decreased by an async call from hmm. When wait svm_bo of prange got released we shoul also wait prang->svm_bo become NULL, otherwise prange->svm_bo may be set to null after

RE: [PATCH v6 3/9] drm/amdgpu: add new IOCTL for usermode queue

2023-09-20 Thread Sharma, Shashank
[AMD Official Use Only - General] -Original Message- From: Zhang, Yifan Sent: Wednesday, September 20, 2023 4:48 PM To: Sharma, Shashank ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian ; Yadav, Arvind ; Sharma, Shashank Subject: RE: [PATCH v6 3/9]

RE: [PATCH v6 3/9] drm/amdgpu: add new IOCTL for usermode queue

2023-09-20 Thread Zhang, Yifan
[AMD Official Use Only - General] -Original Message- From: amd-gfx On Behalf Of Shashank Sharma Sent: Saturday, September 9, 2023 12:05 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian ; Yadav, Arvind ; Sharma, Shashank Subject: [PATCH v6 3/9]

Re: [PATCH v3] drm/amdkfd: Handle errors from svm validate and map

2023-09-20 Thread Felix Kuehling
On 2023-09-20 10:20, Philip Yang wrote: On 2023-09-19 17:15, Felix Kuehling wrote: On 2023-09-19 10:21, Philip Yang wrote: If new range is splited to multiple pranges with max_svm_range_pages alignment and added to update_list, svm validate and map should keep going after error to make

Re: [PATCH v3] drm/amdkfd: Handle errors from svm validate and map

2023-09-20 Thread Philip Yang
On 2023-09-19 17:15, Felix Kuehling wrote: On 2023-09-19 10:21, Philip Yang wrote: If new range is splited to multiple pranges with max_svm_range_pages alignment and added to update_list, svm validate and map

Re: [PATCH] drm/amd/pm: Add reset option for fan_curve on smu13_0_0

2023-09-20 Thread Alex Deucher
On Tue, Sep 19, 2023 at 11:00 PM Ma, Jun wrote: > > Hi Alex, > > On 9/18/2023 10:05 PM, Alex Deucher wrote: > > On Mon, Sep 11, 2023 at 2:00 AM Ma Jun wrote: > >> > >> Add reset option for fan_curve. > >> User can use command "echo r > fan_cure" to reset the fan_curve > >> to boot value > >> >

Re: [PATCH] drm/amd/display: Check all enabled planes in dm_check_crtc_cursor

2023-09-20 Thread Alex Deucher
On Tue, Sep 12, 2023 at 6:22 AM Michel Dänzer wrote: > > From: Michel Dänzer > > It was only checking planes which had any state changes in the same > commit. However, it also needs to check other enabled planes. > > Not doing this meant that a commit might spuriously "succeed", resulting > in

[PATCH] drm/amd/display: fix some style issues

2023-09-20 Thread Alex Deucher
Fixes a few style issues: - Only calculate the dto_params and dp_hpo_inst when dccg is present. - Fix indentation - Drop empty else block Fixes: 7f7925e25828 ("drm/amd/display: Fix MST recognizes connected displays as one") Cc: Muhammad Ahmed Cc: Michel Dänzer Cc: Stylon Wang Signed-off-by:

Re: [PATCH] gpu: drm: amd: display: fix kernel-doc warnings

2023-09-20 Thread Alex Deucher
Applied. Thanks! On Tue, Sep 19, 2023 at 5:54 PM Randy Dunlap wrote: > > Hi, > > On 9/19/23 02:33, Swarup Laxman Kotiaklapudi wrote: > > Fix kernel-doc warnings discovered in AMD gpu display driver. > > Fixes these warnings: > > ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:110: warning: > >

Re: [PATCH] Revert "drm/amd/display: Introduce DML2"

2023-09-20 Thread Alex Deucher
On Wed, Sep 20, 2023 at 9:11 AM Qingqing Zhuo wrote: > > This reverts commit 50003b5aa5f55677c7d4634eea755958ba6baa58. > > [Why & How] > Revert to unblock arm and ppc compilation issues. > > Signed-off-by: Qingqing Zhuo Acked-by: Alex Deucher

[PATCH 2/2] drm/amd/pm: Add GC v9.4.3 thermal limits to hwmon

2023-09-20 Thread Lijo Lazar
Publish max operating temperature of SOC and memory as temp*_emergency nodes in hwmon. temp*_crit will show the throttle temperature limits. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git

[PATCH 1/2] drm/amd/pm: Add throttle limit for SMU v13.0.6

2023-09-20 Thread Lijo Lazar
CTF limit represents the max operating temperature and thermal limit gives the limit at which throttling starts. Add support for both limits. SOC and HBM may have different limit values.*_emergency_max gives max operating temperature and *_crit_max value represents throttle limit. Signed-off-by:

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

2023-09-20 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Hi Alex, Does driver also need to disable AGP aperture in hardware side ? (Set register GCMC_VM_AGP_BOT/TOP to make AGP address range invalid). The current changes only make the GPU not use AGP range addresses, but the hardware unit of AGP's aperture is still

RE: [PATCH 3/3] drm/amdgpu: change if condition for bad channel bitmap update

2023-09-20 Thread Zhang, Hawking
[AMD Official Use Only - General] Series is Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Zhou1, Tao Sent: Wednesday, September 20, 2023 16:37 To: amd-gfx@lists.freedesktop.org; Zhang, Hawking ; Yang, Stanley ; Li, Candice ; Wang, Yang(Kevin) ; Chai, Thomas

[PATCH 3/3] drm/amdgpu: change if condition for bad channel bitmap update

2023-09-20 Thread Tao Zhou
The amdgpu_ras_eeprom_control.bad_channel_bitmap is u32 type, but the channel index could be larger than 32. For the ASICs whose channel number is more than 32, the amdgpu_dpm_send_hbm_bad_channel_flag interface is not supported, so we simply bypass channel bitmap update under this condition. v2:

[PATCH 2/3] drm/amdgpu: fix value of some UMC parameters for UMC v12

2023-09-20 Thread Tao Zhou
Prepare for bad page retirement. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/umc_v12_0.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

[PATCH 1/3] drm/amdgpu: print channel index for UMC bad page

2023-09-20 Thread Tao Zhou
Print channel index for UMC v12. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c index c6742dd863d4..7714c2ef2cdc

Re: [PATCH] gpu: drm: amd: display: fix kernel-doc warnings

2023-09-20 Thread Randy Dunlap
Hi, On 9/19/23 02:33, Swarup Laxman Kotiaklapudi wrote: > Fix kernel-doc warnings discovered in AMD gpu display driver. > Fixes these warnings: > ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:110: warning: > Function parameter or member 'overlap_only' > not described in 'mpcc_blnd_cfg'. > >

[PATCH] drm/amd/display: Fix null pointer for res_pool->hubbub

2023-09-20 Thread Bob Zhou
Recently, the driver introduce DML2 for future ASIC support. But, some ASIC's hubbub pointer isn't set after calling dce120_create_resource_pool(). Before setting get_dchub_ref_freq(), these hubbub pointer is null, it cause the below null pointer issue. So add check whether res_pool->hubbub to fix

[PATCH] drm/amdkfd: fix some race conditions in vram buffer alloc/free of svm code

2023-09-20 Thread Xiaogang . Chen
From: Xiaogang Chen This patch fixes: 1: ref number of prange's svm_bo got decreased by an async call from hmm. When wait svm_bo of prange got released we shoul also wait prang->svm_bo become NULL, otherwise prange->svm_bo may be set to null after allocate new vram buffer. 2: During waiting

Re: [PATCH] MAINTAINERS: drm/ci: add entries for xfail files

2023-09-20 Thread Maxime Ripard
Hi, On Tue, Sep 19, 2023 at 03:22:49PM -0300, Helen Koike wrote: > DRM CI keeps track of which tests are failing, flaking or being skipped > by the ci in the expectations files. Add entries for those files to the > corresponding driver maintainer, so they can be notified when they > change. > >