RE: [PATCH] drm/amd/display: Not to call dpcd_set_source_specific_data during resume.

2022-01-10 Thread Mahapatra, Rajib
dpcd_set_source_specific_data is not specific to OLED panel. It is called from boot-up path also. Hersen Wu introduced it in resume-path while enabling OLED panel for Linux in below commit. So here, I guard it by calling source specific data only for OLED panel, and I can get advantage of arou

[PATCH] drm/amd/pm: correct the checks for fan attributes support

2022-01-10 Thread Evan Quan
On functionality unsupported, -EOPNOTSUPP will be returned. And we rely on that to determine the fan attributes support. Fixes: 801771de0331 ("drm/amd/pm: do not expose power implementation details to amdgpu_pm.c") Signed-off-by: Evan Quan Change-Id: I95e7e0beebd678a446221a72234cd356e14f0fcd ---

[PATCH] drm/amd/pm: only send GmiPwrDnControl msg on master die (v3)

2022-01-10 Thread Tao Zhou
PMFW only returns 0 on master die and sends NACK back on other dies for the message. v2: only send GmiPwrDnControl msg on master die instead of all dies. v3: remove the pointer check for get_socket_id and get_die_id as they should be present on Aldebaran. Signed-off-by: Tao Zhou --- .../gpu/drm

RE: [PATCH] drm/amd/pm: only send GmiPwrDnControl msg on master die (v2)

2022-01-10 Thread Zhou1, Tao
[AMD Official Use Only] > -Original Message- > From: Lazar, Lijo > Sent: Tuesday, January 11, 2022 3:00 PM > To: Zhou1, Tao ; amd-gfx@lists.freedesktop.org; Zhang, > Hawking ; Quan, Evan > Subject: Re: [PATCH] drm/amd/pm: only send GmiPwrDnControl msg on master > die (v2) > > > > On

[PATCH 3/3] drm/amdgpu: add AMDGPURESET uevent on AMD GPU reset

2022-01-10 Thread Somalapuram Amaranath
AMDGPURESET uevent added to notify userspace, collect dump_stack and amdgpu_reset_reg_dumps Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/nv.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/

[PATCH 2/3] drm/amdgpu: add debug fs for AMD GPU reset register dumps

2022-01-10 Thread Somalapuram Amaranath
Implementation of debug fs “amdgpu_reset_reg_dumps” to capture reset register status Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 64 + 1 file changed, 64 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/driv

[PATCH 1/3] drm/amdgpu: add reset register dump function for gfx_v10_0

2022-01-10 Thread Somalapuram Amaranath
Implementation of register dump function when the AMD GPU resets Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 55 +++- drivers/gpu/drm/amd/include/amd_shared.h | 2 + 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/driver

[PATCH] drm/amdgpu: limit the number of dst address in trace

2022-01-10 Thread Somalapuram Amaranath
trace_amdgpu_vm_update_ptes trace unable to log when nptes too large Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 0e7dc23f

Re: [PATCH] drm/amd/pm: only send GmiPwrDnControl msg on master die (v2)

2022-01-10 Thread Lazar, Lijo
On 1/11/2022 12:03 PM, Tao Zhou wrote: PMFW only returns 0 on master die and sends NACK back on other dies for the message. v2: only send GmiPwrDnControl msg on master die instead of all dies. Signed-off-by: Tao Zhou --- .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c| 25 -

[PATCH] drm/amd/pm: only send GmiPwrDnControl msg on master die (v2)

2022-01-10 Thread Tao Zhou
PMFW only returns 0 on master die and sends NACK back on other dies for the message. v2: only send GmiPwrDnControl msg on master die instead of all dies. Signed-off-by: Tao Zhou --- .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c| 25 --- 1 file changed, 21 insertions(+), 4 delet

RE: [PATCH] drm/amd/pm: correct the checks for fan attributes support

2022-01-10 Thread Quan, Evan
[AMD Official Use Only] > -Original Message- > From: Lazar, Lijo > Sent: Tuesday, January 11, 2022 11:32 AM > To: Quan, Evan ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: Re: [PATCH] drm/amd/pm: correct the checks for fan attributes > support > > > > On 1/11/20

[PATCH] drm/amdgpu: use spin_lock_irqsave to avoid deadlock by local interrupt

2022-01-10 Thread Guchun Chen
This is observed in SRIOV case with virtual KMS as display. _raw_spin_lock_irqsave+0x37/0x40 drm_handle_vblank+0x69/0x350 [drm] ? try_to_wake_up+0x432/0x5c0 ? amdgpu_vkms_prepare_fb+0x1c0/0x1c0 [amdgpu] drm_crtc_handle_vblank+0x17/0x20 [drm] amdgpu_vkms_vblank_simulate+0x4d/0x80 [amdgpu] __hrtimer

RE: [PATCH] drm/amdgpu: use spin_lock_irqsave to avoid deadlock by local interrupt

2022-01-10 Thread Zytaruk, Kelly
Thanks Guchun. Tag is okay. Kelly -Original Message- From: Chen, Guchun Sent: January 10, 2022 10:01 PM To: Zytaruk, Kelly ; amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Koenig, Christian ; Pan, Xinhui ; Huang, Qiliang (Warden) ; Zhang, Bokun Subject: RE: [PATCH] drm/amdgpu:

Re: [PATCH] drm/amd/pm: correct the checks for fan attributes support

2022-01-10 Thread Lazar, Lijo
On 1/11/2022 8:02 AM, Quan, Evan wrote: [AMD Official Use Only] -Original Message- From: Lazar, Lijo Sent: Monday, January 10, 2022 4:31 PM To: Quan, Evan ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: Re: [PATCH] drm/amd/pm: correct the checks for fan attributes

RE: [PATCH] drm/amdgpu: use spin_lock_irqsave to avoid deadlock by local interrupt

2022-01-10 Thread Chen, Guchun
[Public] Thanks Kelly. I will push this patch with a tag like "Tested-by: Zytaruk, Kelly ". Pls let me know if you have any concern. Regards, Guchun -Original Message- From: Zytaruk, Kelly Sent: Monday, January 10, 2022 11:42 PM To: Chen, Guchun ; amd-gfx@lists.freedesktop.org; Deuche

RE: [PATCH 1/3] drm/amdgpu: fix warning

2022-01-10 Thread Zhou1, Tao
[AMD Official Use Only] Thanks! The series is: Reviewed-by: Tao Zhou > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Tuesday, January 11, 2022 4:19 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Chai, Thomas > > Subject: [PATCH 1/3] drm/amdg

RE: [PATCH] drm/amd/pm: correct the checks for fan attributes support

2022-01-10 Thread Quan, Evan
[AMD Official Use Only] > -Original Message- > From: Lazar, Lijo > Sent: Monday, January 10, 2022 4:31 PM > To: Quan, Evan ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: Re: [PATCH] drm/amd/pm: correct the checks for fan attributes > support > > > > On 1/10/2022

[PATCH 1/1] Add test for new hsaKmtAvailableMemory library call

2022-01-10 Thread Daniel Phillips
Using DefaultGPUNode now instead of system memory, usage similar to other tests. Also cleaned up pSmall, which I originally intended to just let float away on the mistaken assumption that it would be cleaned up automatically at the end of the test. Basic test for the new hsaKmtAvailableMemory libr

Re: [PATCH 4/4] drm/amdgpu: Silent GCC warning

2022-01-10 Thread Alex Deucher
I just sent these same three fixes earlier today: https://patchwork.freedesktop.org/series/98695/ Alex On Mon, Jan 10, 2022 at 6:39 PM Rodrigo Siqueira wrote: > > We have the following GCC warning: > > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h:400:10: > error: ‘struct amdgpu_iv_entry’ declared ins

RE: [PATCH 3/3] drm/amdgpu: bump driver version for new CTX OP to set/get stable pstates

2022-01-10 Thread Quan, Evan
[AMD Official Use Only] Series is reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Tuesday, January 11, 2022 4:20 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: [PATCH 3/3] drm/amdgpu: bump driver version for ne

[PATCH 1/1] Add available memory ioctl for libhsakmt

2022-01-10 Thread Daniel Phillips
Add an ioctl to inquire memory available for allocation by libhsakmt per node, allowing for space consumed by page translation tables. This ioctl is the underlying mechanism for the new memory availability library call posted for review here: https://lists.freedesktop.org/archives/amd-gfx/2022

Re: [git pull] drm for 5.17-rc1 (pre-merge window pull)

2022-01-10 Thread Linus Torvalds
On Mon, Jan 10, 2022 at 5:21 PM Linus Torvalds wrote: > > It also seems to depend a bit on the screen contents - or possibly on > what else is going on. Hiding the browser window makes it happen less, > I think. But I suspect that's about "less gpu activity" than anything > else. Actually, someti

Re: [git pull] drm for 5.17-rc1 (pre-merge window pull)

2022-01-10 Thread Linus Torvalds
On Mon, Jan 10, 2022 at 5:11 PM Alex Deucher wrote: > > We are putting together a system to try and repro the issue. Does it > happen with a single monitor or only with two? Nope. With a single monitor everything seems to look fine. And when I plug in the second monitor, it immediately starts ha

Re: [git pull] drm for 5.17-rc1 (pre-merge window pull)

2022-01-10 Thread Linus Torvalds
On Mon, Jan 10, 2022 at 2:13 PM Alex Deucher wrote: > > Sounds like something related to watermarks. That said, we haven't > really touched the display code for DCE11 cards in quite a while. Can > you provide your dmesg output? I'm not seeing anything that would look interesting, but here's the

Re: [git pull] drm for 5.17-rc1 (pre-merge window pull)

2022-01-10 Thread Alex Deucher
On Mon, Jan 10, 2022 at 8:04 PM Linus Torvalds wrote: > > On Mon, Jan 10, 2022 at 2:13 PM Alex Deucher wrote: > > > > Sounds like something related to watermarks. That said, we haven't > > really touched the display code for DCE11 cards in quite a while. Can > > you provide your dmesg output? >

Re: [PATCH 1/2] drm/amdkfd: Fix DQM asserts on Hawaii

2022-01-10 Thread Felix Kuehling
Ping. On 2021-12-08 3:25 a.m., Felix Kuehling wrote: start_nocpsch would never set dqm->sched_running on Hawaii due to an early return statement. This would trigger asserts in other functions and end up in inconsistent states. Bug: https://github.com/RadeonOpenCompute/ROCm/issues/1624 Signed-o

Re: [Patch v4 18/24] drm/amdkfd: CRIU checkpoint and restore xnack mode

2022-01-10 Thread Felix Kuehling
On 2022-01-05 10:22 a.m., philip yang wrote: On 2021-12-22 7:37 p.m., Rajneesh Bhardwaj wrote: Recoverable page faults are represented by the xnack mode setting inside a kfd process and are used to represent the device page faults. For CR, we don't consider negative values which are typically

Re: [Patch v4 24/24] drm/amdkfd: CRIU resume shared virtual memory ranges

2022-01-10 Thread Felix Kuehling
On 2021-12-22 7:37 p.m., Rajneesh Bhardwaj wrote: In CRIU resume stage, resume all the shared virtual memory ranges from the data stored inside the resuming kfd process during CRIU restore phase. Also setup xnack mode and free up the resources. Signed-off-by: Rajneesh Bhardwaj --- drivers/gpu

Re: [Patch v4 23/24] drm/amdkfd: CRIU prepare for svm resume

2022-01-10 Thread Felix Kuehling
On 2022-01-05 9:43 a.m., philip yang wrote: On 2021-12-22 7:37 p.m., Rajneesh Bhardwaj wrote: During CRIU restore phase, the VMAs for the virtual address ranges are not at their final location yet so in this stage, only cache the data required to successfully resume the svm ranges during an im

Re: [PATCH 1/1] Add test for hsaKmtAvailableMemory available memory inquiry

2022-01-10 Thread Felix Kuehling
On 2022-01-10 4:48 p.m., Daniel Phillips wrote: Basic test for the new hsaKmtAvailableMemory library call. This is a standalone test, does not modify any of the other tests just to be on the safe side. More elaborate tests coming soon. Change-Id: I738600d4b74cc5dba6b857e4c793f6b14b7d2283 Signed-

Re: [PATCH 1/1] Add hsaKmtAvailableMemory available memory inquiry to libhsakmt

2022-01-10 Thread Felix Kuehling
On 2022-01-10 4:23 p.m., Daniel Phillips wrote: Add a library call to inquire memory available for allocation per node. Uses the AMDKFD_IOC_AVAILABLE_MEMORY ioctl available in KFD ioctl version 1.7 Change-Id: Id770fc2261e9e076f2fbce7dcdac640a6354ddbe This patch is Reviewed-by: Felix Kuehling

[PATCH 4/4] drm/amdgpu: Silent GCC warning

2022-01-10 Thread Rodrigo Siqueira
We have the following GCC warning: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h:400:10: error: ‘struct amdgpu_iv_entry’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror] 400 | struct amdgpu_iv_entry *entry); Silent this warning Signed-off-by: R

[PATCH 3/4] drm/amdgpu: Drop unused variable

2022-01-10 Thread Rodrigo Siqueira
This commit fix the following GCC warning: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:945:6: error: unused variable ‘i’ [-Werror=unused-variable] Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amd

[PATCH 1/4] drm/amdgpu: Treat warning as an error

2022-01-10 Thread Rodrigo Siqueira
We have one internal CI that builds our kernel with the -Werror flag; as a result, when we try to sync our branch with amd-staging-drm-next we get some failures due to warnings. This commit tries to alleviate this problem by forcing a warning to be treated as an error. Signed-off-by: Rodrigo Sique

[PATCH 2/4] drm/amdgpu: Fix compilation warning due to double semicolon

2022-01-10 Thread Rodrigo Siqueira
There is a double semicolon that makes GCC complain about the following warning: amdgpu_xgmi.c:953:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 953 | struct ta_ras_trigger_error_input *block_info; Drop the extra semicolon to get rid of the GCC w

[PATCH 0/4] Use -Werror by default and fix compilation warnings

2022-01-10 Thread Rodrigo Siqueira
We have an internal CI in the display team that uses a stable version of amd-staging-drm-next to run a set of tests (from compilation to IGT); usually, we have to create this stable version manually. We are trying to automate this process, but we are getting failures because we compile display code

Re: [PATCH 1/1] Add available memory ioctl for libhsakmt

2022-01-10 Thread Felix Kuehling
On 2022-01-10 3:54 p.m., Daniel Phillips wrote: From: Daniel Phillips This is weird. Looks like you've set up the your user email in your .gitconfig incorrectly. Or you changed it after you commited this patch locally. Add an ioctl to inquire memory available for allocation by libhsakmt

Re: [Patch v4 13/24] drm/amdkfd: CRIU checkpoint and restore queue mqds

2022-01-10 Thread Felix Kuehling
On 2021-12-22 7:37 p.m., Rajneesh Bhardwaj wrote: From: David Yat Sin Checkpoint contents of queue MQD's on CRIU dump and restore them during CRIU restore. Signed-off-by: David Yat Sin David has an update for this patch to fix up the doorbell offset in the restored SDMA MQD. Regards,   F

Re: [Patch v4 07/24] drm/amdkfd: CRIU Implement KFD resume ioctl

2022-01-10 Thread Felix Kuehling
On 2021-12-22 7:36 p.m., Rajneesh Bhardwaj wrote: This adds support to create userptr BOs on restore and introduces a new ioctl to restart memory notifiers for the restored userptr BOs. When doing CRIU restore MMU notifications can happen anytime after we call amdgpu_mn_register. Prevent MMU noti

Re: [Patch v4 21/24] drm/amdkfd: CRIU Discover svm ranges

2022-01-10 Thread philip yang
On 2021-12-22 7:37 p.m., Rajneesh Bhardwaj wrote: A KFD process may contain a number of virtual address ranges for shared virtual memory management and each such range can have many SVM attributes spanning across various nodes within the process boundary. Thi

Re: [Patch v4 06/24] drm/amdkfd: CRIU Implement KFD restore ioctl

2022-01-10 Thread Felix Kuehling
On 2021-12-22 7:36 p.m., Rajneesh Bhardwaj wrote: This implements the KFD CRIU Restore ioctl that lays the basic foundation for the CRIU restore operation. It provides support to create the buffer objects corresponding to Non-Paged system memory mapped for GPU and/or CPU access and lays basic fou

Re: [Patch v4 04/24] drm/amdkfd: CRIU Implement KFD process_info ioctl

2022-01-10 Thread Felix Kuehling
On 2021-12-22 7:36 p.m., Rajneesh Bhardwaj wrote: This IOCTL is expected to be called as a precursor to the actual Checkpoint operation. This does the basic discovery into the target process seized by CRIU and relays the information to the userspace that utilizes it to start the Checkpoint operat

[PATCH v3 06/10] lib: test_hmm add ioctl to get zone device type

2022-01-10 Thread Alex Sierra
new ioctl cmd added to query zone device type. This will be used once the test_hmm adds zone device coherent type. Signed-off-by: Alex Sierra --- lib/test_hmm.c | 14 ++ lib/test_hmm_uapi.h | 8 2 files changed, 22 insertions(+) diff --git a/lib/test_hmm.c b/lib/test_

[PATCH v3 08/10] lib: add support for device coherent type in test_hmm

2022-01-10 Thread Alex Sierra
Device Coherent type uses device memory that is coherently accesible by the CPU. This could be shown as SP (special purpose) memory range at the BIOS-e820 memory enumeration. If no SP memory is supported in system, this could be faked by setting CONFIG_EFI_FAKE_MEMMAP. Currently, test_hmm only sup

[PATCH v3 10/10] tools: update test_hmm script to support SP config

2022-01-10 Thread Alex Sierra
Add two more parameters to set spm_addr_dev0 & spm_addr_dev1 addresses. These two parameters configure the start SP addresses for each device in test_hmm driver. Consequently, this configures zone device type as coherent. Signed-off-by: Alex Sierra --- v2: Add more mknods for device coherent type

[PATCH v3 07/10] lib: test_hmm add module param for zone device type

2022-01-10 Thread Alex Sierra
In order to configure device coherent in test_hmm, two module parameters should be passed, which correspond to the SP start address of each device (2) spm_addr_dev0 & spm_addr_dev1. If no parameters are passed, private device type is configured. Signed-off-by: Alex Sierra --- lib/test_hmm.c

[PATCH v3 09/10] tools: update hmm-test to support device coherent type

2022-01-10 Thread Alex Sierra
Test cases such as migrate_fault and migrate_multiple, were modified to explicit migrate from device to sys memory without the need of page faults, when using device coherent type. Snapshot test case updated to read memory device type first and based on that, get the proper returned results migrat

[PATCH v3 02/10] mm: add device coherent vma selection for memory migration

2022-01-10 Thread Alex Sierra
This case is used to migrate pages from device memory, back to system memory. Device coherent type memory is cache coherent from device and CPU point of view. Signed-off-by: Alex Sierra --- v2: condition added when migrations from device coherent pages. --- include/linux/migrate.h | 1 + mm/migr

[PATCH v3 04/10] drm/amdkfd: add SPM support for SVM

2022-01-10 Thread Alex Sierra
When CPU is connected throug XGMI, it has coherent access to VRAM resource. In this case that resource is taken from a table in the device gmc aperture base. This resource is used along with the device type, which could be DEVICE_PRIVATE or DEVICE_COHERENT to create the device page map region. Sig

[PATCH v3 01/10] mm: add zone device coherent type memory support

2022-01-10 Thread Alex Sierra
Device memory that is cache coherent from device and CPU point of view. This is used on platforms that have an advanced system bus (like CAPI or CXL). Any page of a process can be migrated to such memory. However, no one should be allowed to pin such memory so that it can always be evicted. Signed

[PATCH v3 03/10] mm/gup: fail get_user_pages for LONGTERM dev coherent type

2022-01-10 Thread Alex Sierra
Avoid long term pinning for Coherent device type pages. This could interfere with their own device memory manager. For now, we are just returning error for PIN_LONGTERM Coherent device type pages. Eventually, these type of pages will get migrated to system memory, once the device migration pages su

[PATCH v3 05/10] drm/amdkfd: coherent type as sys mem on migration to ram

2022-01-10 Thread Alex Sierra
Coherent device type memory on VRAM to RAM migration, has similar access as System RAM from the CPU. This flag sets the source from the sender. Which in Coherent type case, should be set as MIGRATE_VMA_SELECT_DEVICE_COHERENT. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling --- drivers/gp

[PATCH v3 00/10] Add MEMORY_DEVICE_COHERENT for coherent device memory mapping

2022-01-10 Thread Alex Sierra
This patch series introduces MEMORY_DEVICE_COHERENT, a type of memory owned by a device that can be mapped into CPU page tables like MEMORY_DEVICE_GENERIC and can also be migrated like MEMORY_DEVICE_PRIVATE. Christoph, the suggestion to incorporate Ralph Campbell’s refcount cleanup patch into our

Re: [git pull] drm for 5.17-rc1 (pre-merge window pull)

2022-01-10 Thread Alex Deucher
On Mon, Jan 10, 2022 at 5:05 PM Daniel Vetter wrote: > > On Mon, Jan 10, 2022 at 10:30 PM Linus Torvalds > wrote: > > > > On Thu, Jan 6, 2022 at 10:12 PM Dave Airlie wrote: > > > > > > git://anongit.freedesktop.org/drm/drm tags/drm-next-2022-01-07 > > > > Gaah. I merged things and it built cle

Re: [Patch v4 03/24] drm/amdkfd: CRIU Introduce Checkpoint-Restore APIs

2022-01-10 Thread Felix Kuehling
On 2021-12-22 7:36 p.m., Rajneesh Bhardwaj wrote: Checkpoint-Restore in userspace (CRIU) is a powerful tool that can snapshot a running process and later restore it on same or a remote machine but expects the processes that have a device file (e.g. GPU) associated with them, provide necessary dri

Re: [git pull] drm for 5.17-rc1 (pre-merge window pull)

2022-01-10 Thread Daniel Vetter
On Mon, Jan 10, 2022 at 10:30 PM Linus Torvalds wrote: > > On Thu, Jan 6, 2022 at 10:12 PM Dave Airlie wrote: > > > > git://anongit.freedesktop.org/drm/drm tags/drm-next-2022-01-07 > > Gaah. I merged things and it built cleanly, and I pushed it out. > > But then I actually *booted* it, and that

[PATCH 1/1] Add test for hsaKmtAvailableMemory available memory inquiry

2022-01-10 Thread Daniel Phillips
Basic test for the new hsaKmtAvailableMemory library call. This is a standalone test, does not modify any of the other tests just to be on the safe side. More elaborate tests coming soon. Change-Id: I738600d4b74cc5dba6b857e4c793f6b14b7d2283 Signed-off-by: Daniel Phillips --- tests/kfdtest/src/KF

[PATCH 1/1] Add hsaKmtAvailableMemory available memory inquiry to libhsakmt

2022-01-10 Thread Daniel Phillips
Add a library call to inquire memory available for allocation per node. Uses the AMDKFD_IOC_AVAILABLE_MEMORY ioctl available in KFD ioctl version 1.7 Change-Id: Id770fc2261e9e076f2fbce7dcdac640a6354ddbe --- include/hsakmt.h | 11 +++ include/linux/kfd_ioctl.h | 18 +++

Re: [PATCH] drm/amdkfd: Check for null pointer after calling kmemdup

2022-01-10 Thread Felix Kuehling
On 2022-01-05 10:56 a.m., Felix Kuehling wrote: Am 2022-01-05 um 4:09 a.m. schrieb Jiasheng Jiang: As the possible failure of the allocation, kmemdup() may return NULL pointer. Therefore, it should be better to check the 'props2' in order to prevent the dereference of NULL pointer. Fixes: 3a871

Re: [PATCH] drm/amdkfd: make SPDX License expression more sound

2022-01-10 Thread Felix Kuehling
On 2022-01-05 2:27 p.m., Felix Kuehling wrote: Am 2021-12-16 um 4:45 a.m. schrieb Lukas Bulwahn: Commit b5f57384805a ("drm/amdkfd: Add sysfs bitfields and enums to uAPI") adds include/uapi/linux/kfd_sysfs.h with the "GPL-2.0 OR MIT WITH Linux-syscall-note" SPDX-License expression. The command

Re: [PATCH] drm/amdgpu: Fix unused variable warning

2022-01-10 Thread Luben Tuikov
Okay, no problem. I was actually wondering whether to add it, since it wasn't a technical failure... Regards, Luben On 2022-01-10 15:49, Deucher, Alexander wrote: [Public]

Re: [PATCH 1/1] Add available memory ioctl for libhsakmt

2022-01-10 Thread Deucher, Alexander
[Public] This is missing your signed-off-by. Additionally, for UAPI changes, we need a link the patches for the userspace component that will make use of it. Alex From: amd-gfx on behalf of Daniel Phillips Sent: Monday, January 10, 2022 3:54 PM To: amd-gfx@l

[PATCH 1/1] Add available memory ioctl for libhsakmt

2022-01-10 Thread Daniel Phillips
From: Daniel Phillips Add an ioctl to inquire memory available for allocation by libhsakmt per node, allowing for space consumed by page translation tables. --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c| 14 ++ drivers/gp

Re: [PATCH] drm/amdgpu: Fix unused variable warning

2022-01-10 Thread Deucher, Alexander
[Public] Please add: Fixes: 36324c09d848 ("drm/amdgpu: Modify sdma block to fit for the unified ras block data and ops") With that, Reviewed-by: Alex Deucher From: Tuikov, Luben Sent: Monday, January 10, 2022 3:32 PM To: amd-gfx@lists.freedesktop.org Cc: Tuiko

[PATCH] drm/amdgpu: Add interface to load SRIOV cap FW

2022-01-10 Thread Bokun Zhang
- Add interface to load SRIOV cap FW. If the FW does not exist, simply skip this FW loading routine. This FW will only be loaded under SRIOV. Other driver setup will not be affected. By adding this interface, it will make us easier to prepare SRIOV Linux guest driver for different users.

[PATCH] drm/amdgpu: Fix unused variable warning

2022-01-10 Thread Luben Tuikov
Fix this: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c: In function ‘amdgpu_ras_query_error_status’: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:945:6: warning: unused variable ‘i’ [-Wunused-variable] 945 | int i; Cc: Alex Deucher Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Luben Tuikov --- d

[PATCH 3/3] drm/amdgpu: bump driver version for new CTX OP to set/get stable pstates

2022-01-10 Thread Alex Deucher
So mesa and tools know when this is available. Mesa MR: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/207 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dr

[PATCH 2/3] drm/amdgpu/UAPI: add new CTX OP to get/set stable pstates

2022-01-10 Thread Alex Deucher
Add a new CTX ioctl operation to set stable pstates for profiling. When creating traces for tools like RGP or using SPM or doing performance profiling, it's required to enable a special stable profiling power state on the GPU. These profiling states set fixed clocks and disable certain other power

[PATCH 1/3] drm/amdgpu/pm: move additional logic into amdgpu_dpm_force_performance_level

2022-01-10 Thread Alex Deucher
This is part of the forced performance level. Move it from the sysfs handler into amdgpu_dpm_force_performance_level. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 61 - drivers/gpu/drm/amd/pm/amdgpu_pm.c | 50 --- 2 files

[PATCH 2/3] drm/amdgpu: add a forward declaration for struct amdgpu_iv_entry

2022-01-10 Thread Alex Deucher
To prevent: warning: ‘struct amdgpu_iv_entry’ declared inside parameter list will not be visible outside of this definition or declaration Fixes: 0f60e1036d85 ("drm/amdgpu: Modify the compilation failed problem when other ras blocks' .h include amdgpu_ras.h") Cc: yipechai Signed-off-by: Alex De

[PATCH 1/3] drm/amdgpu: fix warning

2022-01-10 Thread Alex Deucher
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] Fixes: 8c50db2f64ee ("drm/amdgpu: Adjust error inject function code style in amdgpu_ras.c") Cc: yipechai Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 2 +- 1 file changed, 1 inse

[PATCH 3/3] drm/amdgpu: remove unused variable

2022-01-10 Thread Alex Deucher
No longer used. remove it. Fixes: 36324c09d848 ("drm/amdgpu: Modify sdma block to fit for the unified ras block data and ops") Cc: yipechai Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amd

Re: [PATCH] drm/amd/display: invalid parameter check in dmub_hpd_callback

2022-01-10 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Jan 10, 2022 at 11:34 AM Harry Wentland wrote: > > On 2022-01-09 13:42, José Expósito wrote: > > The function performs a check on the "adev" input parameter, however, it > > is used before the check. > > > > Initialize the "dev" variable after the sanity check to a

Re: [PATCH] drm/ttm: Don't inherit GEM object VMAs in child process

2022-01-10 Thread Bhardwaj, Rajneesh
Hi Christian I have reverted the change from the amd-staging-drm-next as per the discussion.  Thank you. Regards Rajneesh On 1/4/2022 1:08 PM, Felix Kuehling wrote: [+Adrian] Am 2021-12-23 um 2:05 a.m. schrieb Christian König: Am 22.12.21 um 21:53 schrieb Daniel Vetter: On Mon, Dec 20

Re: [PATCH] drm/amd/display: invalid parameter check in dmub_hpd_callback

2022-01-10 Thread Harry Wentland
On 2022-01-09 13:42, José Expósito wrote: > The function performs a check on the "adev" input parameter, however, it > is used before the check. > > Initialize the "dev" variable after the sanity check to avoid a possible > NULL pointer dereference. > > Fixes: e27c41d5b0681 ("drm/amd/display: Sup

Re: [PATCH] drm/amd/display: Not to call dpcd_set_source_specific_data during resume.

2022-01-10 Thread Harry Wentland
On 2022-01-10 04:06, Rajib Mahapatra wrote: > [Why] > During resume path, dpcd_set_source_specific_data is taking > extra time when core_link_write_dpcd fails on DP_SOURCE_OUI+0x03 > and DP_SOURCE_MINIMUM_HBLANK_SUPPORTED. Here,aux->transfer fails > with multiple retries and consume sigficantamount

Re: [PATCH] drm/amd/display: Not to call dpcd_set_source_specific_data during resume.

2022-01-10 Thread Deucher, Alexander
[Public] Seems reasonable. Acked-by: Alex Deucher From: Mahapatra, Rajib Sent: Monday, January 10, 2022 4:06 AM To: Wu, Hersen ; Wentland, Harry ; Deucher, Alexander Cc: amd-gfx@lists.freedesktop.org ; S, Shirish ; Mahapatra, Rajib Subject: [PATCH] drm/amd/d

Re: [PATCH] drm/amdgpu: use spin_lock_irqsave to avoid deadlock by local interrupt

2022-01-10 Thread Deucher, Alexander
[AMD Official Use Only] Acked-by: Alex Deucher From: Chen, Guchun Sent: Monday, January 10, 2022 12:13 AM To: amd-gfx@lists.freedesktop.org ; Deucher, Alexander ; Koenig, Christian ; Pan, Xinhui ; Zytaruk, Kelly ; Huang, Qiliang (Warden) ; Zhang, Bokun Cc: C

RE: [PATCH] drm/amdgpu: use spin_lock_irqsave to avoid deadlock by local interrupt

2022-01-10 Thread Zytaruk, Kelly
I can confirm that the fault no longer occurs when the patch is implemented. Thanks, Kelly -Original Message- From: Chen, Guchun Sent: January 10, 2022 12:14 AM To: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Koenig, Christian ; Pan, Xinhui ; Zytaruk, Kelly ; Huang, Qiliang (

[bug report] drm/amd/display: define link res and make it accessible to all link interfaces

2022-01-10 Thread Dan Carpenter
Hello Wenjing Liu, The patch ef30f441f6ac: "drm/amd/display: define link res and make it accessible to all link interfaces" from Nov 25, 2021, leads to the following Smatch static checker warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:4586 dc_link_set_drive_settings() w

Re: [PATCH] drm/amd/amdgpu: Add pcie indirect support to amdgpu_mm_wreg_mmio_rlc()

2022-01-10 Thread Alex Deucher
On Sun, Jan 9, 2022 at 5:27 AM Zhang, Hawking wrote: > > [AMD Official Use Only] > > RE - Actually, for older asics, we shouldn't we be using mmINDEX/mmDATA > rather than the pcie indirect registers? Or is that handled already somehow? > > I remember we checked this with hw team before (might tw

Re: [PATCH] drm/amdgpu: not return error on the init_apu_flags

2022-01-10 Thread Huang Rui
On Mon, Jan 10, 2022 at 10:25:57AM +0800, Liang, Prike wrote: > In some APU project we needn't always assign flags to identify each other, > so we may not need return an error. > > Change-Id: I92c1acb9ffbdba7e9a68469163911801db262412 > Signed-off-by: Prike Liang > Reviewed-by: Alex Deucher Plea

[PATCH] drm/amd/display: invalid parameter check in dmub_hpd_callback

2022-01-10 Thread José Expósito
The function performs a check on the "adev" input parameter, however, it is used before the check. Initialize the "dev" variable after the sanity check to avoid a possible NULL pointer dereference. Fixes: e27c41d5b0681 ("drm/amd/display: Support for DMUB HPD interrupt handling") Addresses-Coveri

[PATCH] drm/amd/display: Not to call dpcd_set_source_specific_data during resume.

2022-01-10 Thread Rajib Mahapatra
[Why] During resume path, dpcd_set_source_specific_data is taking extra time when core_link_write_dpcd fails on DP_SOURCE_OUI+0x03 and DP_SOURCE_MINIMUM_HBLANK_SUPPORTED. Here,aux->transfer fails with multiple retries and consume sigficantamount time during S0i3 resume. [How] Not to call dpcd_set_

Re: [PATCH] drm/amd/pm: correct the checks for fan attributes support

2022-01-10 Thread Lazar, Lijo
On 1/10/2022 1:25 PM, Quan, Evan wrote: [AMD Official Use Only] -Original Message- From: Lazar, Lijo Sent: Monday, January 10, 2022 3:36 PM To: Quan, Evan ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: Re: [PATCH] drm/amd/pm: correct the checks for fan attributes

Re: [PATCH v7 1/6] drm: move the buddy allocator from i915 into common drm

2022-01-10 Thread Christian König
Am 09.01.22 um 15:19 schrieb Arunpravin: +// SPDX-License-Identifier: MIT +MODULE_DESCRIPTION("DRM Buddy Allocator"); +MODULE_LICENSE("GPL"); I'm not an expert on this, but maybe we should use "Dual MIT/GPL" here? The code is certainly MIT licensed. Regards, Christian.