Re: [PATCH v2 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Simon Ser
Hi, Maybe it would be a good idea to state the intended use-case in the commit message? And explain why the current (driver-specific IIRC) APIs aren't enough? Since this introduces new uAPI, can you point to a user-space patch which uses the new uAPI? See this link for more info on DRM

Re: [PATCH v2] drm/amkfd: bail out early if no get_atc_vmid_pasid_mapping_info

2022-03-08 Thread Felix Kuehling
Am 2022-03-08 um 21:22 schrieb Yifan Zhang: it makes no sense to continue with an undefined vmid. Fixes: d21bcfc01eb1 (drm/amdkfd: judge get_atc_vmid_pasid_mapping_info before call) Signed-off-by: Yifan Zhang Reported-by: Nathan Chancellor Reviewed-by: Felix Kuehling ---

[PATCH v2] drm/amkfd: bail out early if no get_atc_vmid_pasid_mapping_info

2022-03-08 Thread Yifan Zhang
it makes no sense to continue with an undefined vmid. Fixes: d21bcfc01eb1 (drm/amdkfd: judge get_atc_vmid_pasid_mapping_info before call) Signed-off-by: Yifan Zhang Reported-by: Nathan Chancellor --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 21 +++ 1 file changed, 12

RE: [PATCH] drm/amkfd: bail out early if no get_atc_vmid_pasid_mapping_info

2022-03-08 Thread Chen, Guchun
I think you need to add a "Fixes" tag in this patch. Regards, Guchun -Original Message- From: amd-gfx On Behalf Of Yifan Zhang Sent: Wednesday, March 9, 2022 10:10 AM To: amd-gfx@lists.freedesktop.org Cc: nat...@kernel.org; Zhang, Yifan ; Kuehling, Felix Subject: [PATCH] drm/amkfd:

[PATCH] drm/amkfd: bail out early if no get_atc_vmid_pasid_mapping_info

2022-03-08 Thread Yifan Zhang
it makes no sense to continue with an undefined vmid. Signed-off-by: Yifan Zhang Reported-by: Nathan Chancellor --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 21 +++ 1 file changed, 12 insertions(+), 9 deletions(-) diff --git

Re: [PATCH] drm/amdgpu: Add support for drm_privacy_screen

2022-03-08 Thread Hans de Goede
Hi, On 3/8/22 21:56, Sean Paul wrote: > From: Sean Paul > > This patch adds the necessary hooks to make amdgpu aware of privacy > screens. On devices with privacy screen drivers (such as thinkpad-acpi), > the amdgpu driver will defer probe until it's ready and then sync the sw > and hw state on

Re: [PATCH] drm/amdgpu: Add support for drm_privacy_screen

2022-03-08 Thread Hans de Goede
Hi, On 3/8/22 23:07, Harry Wentland wrote: > > > On 2022-03-08 17:02, Hans de Goede wrote: >> Hi, >> >> On 3/8/22 21:56, Sean Paul wrote: >>> From: Sean Paul >>> >>> This patch adds the necessary hooks to make amdgpu aware of privacy >>> screens. On devices with privacy screen drivers (such as

Re: [PATCH] drm/amdgpu: Add support for drm_privacy_screen

2022-03-08 Thread Harry Wentland
On 2022-03-08 17:02, Hans de Goede wrote: > Hi, > > On 3/8/22 21:56, Sean Paul wrote: >> From: Sean Paul >> >> This patch adds the necessary hooks to make amdgpu aware of privacy >> screens. On devices with privacy screen drivers (such as thinkpad-acpi), >> the amdgpu driver will defer probe

Re: [PATCH v2] drm/amdkfd: CRIU export dmabuf handles for GTT BOs

2022-03-08 Thread Felix Kuehling
Am 2022-03-08 um 16:08 schrieb David Yat Sin: Export dmabuf handles for GTT BOs so that their contents can be accessed using SDMA during checkpoint/restore. Signed-off-by: David Yat Sin Looks good to me. Please also post a link to the user mode change for this. Note that the user mode

[PATCH v2] drm/amdkfd: CRIU export dmabuf handles for GTT BOs

2022-03-08 Thread David Yat Sin
Export dmabuf handles for GTT BOs so that their contents can be accessed using SDMA during checkpoint/restore. Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 12 include/uapi/linux/kfd_ioctl.h | 3 ++- 2 files changed, 10 insertions(+), 5

[PATCH] drm/amdgpu: Add support for drm_privacy_screen

2022-03-08 Thread Sean Paul
From: Sean Paul This patch adds the necessary hooks to make amdgpu aware of privacy screens. On devices with privacy screen drivers (such as thinkpad-acpi), the amdgpu driver will defer probe until it's ready and then sync the sw and hw state on each commit the connector is involved and enabled.

Re: [PATCH 1/2] drm/amdkfd: judge get_atc_vmid_pasid_mapping_info before call

2022-03-08 Thread Felix Kuehling
Am 2022-03-08 um 12:11 schrieb Nathan Chancellor: On Thu, Mar 03, 2022 at 04:05:13PM +0800, Yifan Zhang wrote: Fix the NULL point issue: [ 3076.255609] BUG: kernel NULL pointer dereference, address: [ 3076.255624] #PF: supervisor instruction fetch in kernel mode [

Re: [PATCH] drm/amdkfd: CRIU export dmabuf handles for GTT BOs

2022-03-08 Thread Felix Kuehling
Am 2022-03-08 um 14:11 schrieb David Yat Sin: Export dmabuf handles for GTT BOs so that their contents can be accessed using SDMA during checkpoint/restore. This deserves a minor version bump. The plugin should depend on that bumped version when it starts using dmabuf handles for GTT BOs.

Re: [PATCH v2] drm/amdgpu: add workarounds for Raven VCN TMZ issue

2022-03-08 Thread James Zhu
+BoYuan I am not sure if we need add ENCRYPT check when allocate surface if is supposed to be TMZ protected . For example: VAStatus *vlVaHandleSurfaceAllocate*(vlVaDriver *drv, vlVaSurface *surface,   struct pipe_video_buffer *templat,   const

[PATCH] drm/amdkfd: CRIU export dmabuf handles for GTT BOs

2022-03-08 Thread David Yat Sin
Export dmabuf handles for GTT BOs so that their contents can be accessed using SDMA during checkpoint/restore. Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

Re: [PATCH 2/2] drm/amdgpu: add work function for GPU reset event

2022-03-08 Thread Andrey Grodzovsky
On 2022-03-08 12:20, Somalapuram, Amaranath wrote: On 3/8/2022 10:00 PM, Sharma, Shashank wrote: Hello Andrey On 3/8/2022 5:26 PM, Andrey Grodzovsky wrote: On 2022-03-07 11:26, Shashank Sharma wrote: From: Shashank Sharma This patch adds a work function, which will get scheduled in

[PATCH v2 2/2] drm/amdgpu: add work function for GPU reset event

2022-03-08 Thread Shashank Sharma
From: Shashank Sharma This patch adds a work function, which sends a GPU reset uevent and some contextual infomration, like the PID and some status flags. This work should be scheduled during a GPU reset. The userspace can do some recovery and post-processing work based on this event and

[PATCH v2 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Shashank Sharma
From: Shashank Sharma This patch adds a new sysfs event, which will indicate the userland about a GPU reset, and can also provide some information like: - process ID of the process involved with the GPU reset - process name of the involved process - the GPU status info (using flags) This patch

RE: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Limonciello, Mario
[AMD Official Use Only] > -Original Message- > From: Sharma, Shashank > Sent: Tuesday, March 8, 2022 12:09 > To: Limonciello, Mario ; Grodzovsky, Andrey > ; Lazar, Lijo ; Shashank > Sharma ; amd- > g...@lists.freedesktop.org; S-k, Shyam-sundar ; > Goswami, Sanket > Cc: Deucher,

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Sharma, Shashank
Hey Mario, On 3/8/2022 6:27 PM, Limonciello, Mario wrote: On 3/8/2022 10:57, Sharma, Shashank wrote: On 3/8/2022 5:55 PM, Andrey Grodzovsky wrote: You can read on their side here - https://www.phoronix.com/scan.php?page=news_item=AMD-STB-Linux-5.17 and see their patch. THey don't have as

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Limonciello, Mario
On 3/8/2022 10:57, Sharma, Shashank wrote: On 3/8/2022 5:55 PM, Andrey Grodzovsky wrote: You can read on their side here - https://www.phoronix.com/scan.php?page=news_item=AMD-STB-Linux-5.17 and see their patch. THey don't have as clean interface as we do to retrieve the buffer and currently

Re: [PATCH 2/2] drm/amdgpu: add work function for GPU reset event

2022-03-08 Thread Somalapuram, Amaranath
On 3/8/2022 10:00 PM, Sharma, Shashank wrote: Hello Andrey On 3/8/2022 5:26 PM, Andrey Grodzovsky wrote: On 2022-03-07 11:26, Shashank Sharma wrote: From: Shashank Sharma This patch adds a work function, which will get scheduled in event of a GPU reset, and will send a uevent to user with

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Andrey Grodzovsky
On 2022-03-08 12:04, Somalapuram, Amaranath wrote: On 3/8/2022 10:27 PM, Sharma, Shashank wrote: On 3/8/2022 5:55 PM, Andrey Grodzovsky wrote: You can read on their side here - https://www.phoronix.com/scan.php?page=news_item=AMD-STB-Linux-5.17 and see their patch. THey don't have as

Re: [PATCH 1/2] drm/amdkfd: judge get_atc_vmid_pasid_mapping_info before call

2022-03-08 Thread Nathan Chancellor
On Thu, Mar 03, 2022 at 04:05:13PM +0800, Yifan Zhang wrote: > Fix the NULL point issue: > > [ 3076.255609] BUG: kernel NULL pointer dereference, address: > [ 3076.255624] #PF: supervisor instruction fetch in kernel mode > [ 3076.255637] #PF: error_code(0x0010) - not-present page

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Somalapuram, Amaranath
On 3/8/2022 10:27 PM, Sharma, Shashank wrote: On 3/8/2022 5:55 PM, Andrey Grodzovsky wrote: You can read on their side here - https://www.phoronix.com/scan.php?page=news_item=AMD-STB-Linux-5.17 and see their patch. THey don't have as clean interface as we do to retrieve the buffer and

Re: [PATCH] drm: remove min_order BUG_ON check

2022-03-08 Thread Matthew Auld
On 08/03/2022 13:59, Arunpravin wrote: On 07/03/22 10:11 pm, Matthew Auld wrote: On 07/03/2022 14:37, Arunpravin wrote: place BUG_ON(order < min_order) outside do..while loop as it fails Unigine Heaven benchmark. Unigine Heaven has buffer allocation requests for example required pages are

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Sharma, Shashank
On 3/8/2022 5:55 PM, Andrey Grodzovsky wrote: You can read on their side here - https://www.phoronix.com/scan.php?page=news_item=AMD-STB-Linux-5.17 and see their patch. THey don't have as clean interface as we do to retrieve the buffer and currently it's hard-coded for debugfs dump but it

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Andrey Grodzovsky
You can read on their side here - https://www.phoronix.com/scan.php?page=news_item=AMD-STB-Linux-5.17 and see their patch. THey don't have as clean interface as we do to retrieve the buffer and currently it's hard-coded for debugfs dump but it looks like pretty straight forward to expose their

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Sharma, Shashank
I have a very limited understanding of PMC driver and its interfaces, so I would just go ahead and rely on Andrey's judgement/recommendation on this :) - Shashank On 3/8/2022 5:39 PM, Andrey Grodzovsky wrote: As long as PMC driver provides clear interface to retrieve the info there should be

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Sharma, Shashank
On 3/8/2022 12:56 PM, Sharma, Shashank wrote: On 3/8/2022 11:32 AM, Christian König wrote: Am 08.03.22 um 10:31 schrieb Sharma, Shashank: On 3/8/2022 8:06 AM, Christian König wrote: Am 07.03.22 um 17:26 schrieb Shashank Sharma: From: Shashank Sharma This patch adds a new sysfs

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Andrey Grodzovsky
As long as PMC driver provides clear interface to retrieve the info there should be no issue to call either amdgpu interface or PMC interface using IS_APU (or something alike in the code) We probably should add a wrapper function around this logic in amdgpu. Andrey On 2022-03-08 11:36, Lazar,

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Lazar, Lijo
[AMD Official Use Only] +Mario I guess that means the functionality needs to be present in amdgpu for APUs also. Presently, this is taken care by PMC driver for APUs. Thanks, Lijo From: amd-gfx on behalf of Andrey Grodzovsky Sent: Tuesday, March 8, 2022

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Andrey Grodzovsky
On 2022-03-08 11:35, Sharma, Shashank wrote: On 3/8/2022 5:25 PM, Andrey Grodzovsky wrote: On 2022-03-07 11:26, Shashank Sharma wrote: From: Shashank Sharma This patch adds a new sysfs event, which will indicate the userland about a GPU reset, and can also provide some information like:

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Sharma, Shashank
On 3/8/2022 5:25 PM, Andrey Grodzovsky wrote: On 2022-03-07 11:26, Shashank Sharma wrote: From: Shashank Sharma This patch adds a new sysfs event, which will indicate the userland about a GPU reset, and can also provide some information like: - which PID was involved in the GPU reset -

Re: [PATCH 2/2] drm/amdgpu: add work function for GPU reset event

2022-03-08 Thread Sharma, Shashank
Hello Andrey On 3/8/2022 5:26 PM, Andrey Grodzovsky wrote: On 2022-03-07 11:26, Shashank Sharma wrote: From: Shashank Sharma This patch adds a work function, which will get scheduled in event of a GPU reset, and will send a uevent to user with some reset context infomration, like a PID and

Re: [PATCH v2] drm/amdgpu: add workarounds for Raven VCN TMZ issue

2022-03-08 Thread Leo Liu
On 2022-03-08 11:18, Leo Liu wrote: On 2022-03-08 04:16, Christian König wrote: Am 08.03.22 um 09:06 schrieb Lang Yu: On 03/08/ , Christian König wrote: Am 08.03.22 um 08:33 schrieb Lang Yu: On 03/08/ , Christian König wrote: Am 08.03.22 um 04:39 schrieb Lang Yu: It is a hardware issue

Re: [PATCH 2/2] drm/amdgpu: add work function for GPU reset event

2022-03-08 Thread Andrey Grodzovsky
On 2022-03-07 11:26, Shashank Sharma wrote: From: Shashank Sharma This patch adds a work function, which will get scheduled in event of a GPU reset, and will send a uevent to user with some reset context infomration, like a PID and some flags. Where is the actual scheduling of the work

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Andrey Grodzovsky
On 2022-03-07 11:26, Shashank Sharma wrote: From: Shashank Sharma This patch adds a new sysfs event, which will indicate the userland about a GPU reset, and can also provide some information like: - which PID was involved in the GPU reset - what was the GPU status (using flags) This patch

Re: [PATCH v2] drm/amdgpu: add workarounds for Raven VCN TMZ issue

2022-03-08 Thread Leo Liu
On 2022-03-08 04:16, Christian König wrote: Am 08.03.22 um 09:06 schrieb Lang Yu: On 03/08/ , Christian König wrote: Am 08.03.22 um 08:33 schrieb Lang Yu: On 03/08/ , Christian König wrote: Am 08.03.22 um 04:39 schrieb Lang Yu: It is a hardware issue that VCN can't handle a GTT backing

Re: [PATCH 2/2] drm/amdkfd: CRIU Refactor restore BO function

2022-03-08 Thread Felix Kuehling
Am 2022-03-08 um 10:28 schrieb David Yat Sin: Refactor CRIU restore BO to reduce identation before adding support for IPC. Update the commit message. There is no IPC support on the public branch. The refactoring is still welcome to improve the readability and maintainability of the code.

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Somalapuram, Amaranath
On 3/8/2022 5:26 PM, Sharma, Shashank wrote: On 3/8/2022 11:32 AM, Christian König wrote: Am 08.03.22 um 10:31 schrieb Sharma, Shashank: On 3/8/2022 8:06 AM, Christian König wrote: Am 07.03.22 um 17:26 schrieb Shashank Sharma: From: Shashank Sharma This patch adds a new sysfs event,

[PATCH 1/2] drm/amdkfd: CRIU remove sync and TLB flush on restore

2022-03-08 Thread David Yat Sin
When the process is getting restored, the queues are not mapped yet, so there is no VMID assigned for this process and no TLBs to flush. Signed-off-by: David Yat Sin Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 30 +--- 1 file changed, 1

[PATCH 2/2] drm/amdkfd: CRIU Refactor restore BO function

2022-03-08 Thread David Yat Sin
Refactor CRIU restore BO to reduce identation before adding support for IPC. Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 271 +++ 1 file changed, 129 insertions(+), 142 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c

Re: [PATCH v2] drm/amdgpu: add workarounds for Raven VCN TMZ issue

2022-03-08 Thread Alex Deucher
On Tue, Mar 8, 2022 at 4:16 AM Christian König wrote: > > Am 08.03.22 um 09:06 schrieb Lang Yu: > > On 03/08/ , Christian König wrote: > >> Am 08.03.22 um 08:33 schrieb Lang Yu: > >>> On 03/08/ , Christian König wrote: > Am 08.03.22 um 04:39 schrieb Lang Yu: > > It is a hardware issue

Re: [Intel-gfx] [PATCH] drm: remove min_order BUG_ON check

2022-03-08 Thread Arunpravin
On 07/03/22 8:15 pm, Jani Nikula wrote: > On Mon, 07 Mar 2022, Arunpravin wrote: >> place BUG_ON(order < min_order) outside do..while >> loop as it fails Unigine Heaven benchmark. >> >> Unigine Heaven has buffer allocation requests for >> example required pages are 161 and alignment request >>

Re: [PATCH] drm: remove min_order BUG_ON check

2022-03-08 Thread Arunpravin
On 07/03/22 9:23 pm, Christian König wrote: > Am 07.03.22 um 15:37 schrieb Arunpravin: >> place BUG_ON(order < min_order) outside do..while >> loop as it fails Unigine Heaven benchmark. >> >> Unigine Heaven has buffer allocation requests for >> example required pages are 161 and alignment

Re: [PATCH] drm/amd/display: fix dp kvm can't light up

2022-03-08 Thread Yin, Tianci (Rico)
[AMD Official Use Only] Thank you very much Harry! Regards, Rico From: Wentland, Harry Sent: Tuesday, March 8, 2022 21:55 To: Yin, Tianci (Rico) ; amd-gfx@lists.freedesktop.org Cc: Wang, Yu (Charlie) ; Zhuo, Qingqing (Lillian) ; Liu, Wenjing ; Chen, Guchun

Re: [PATCH] drm/amd/display: fix dp kvm can't light up

2022-03-08 Thread Harry Wentland
On 2022-03-08 01:50, Tianci Yin wrote: > From: "Tianci.Yin" > > [why] > The DP KVM failed to light up, since the lttpr_mode is not reset to > default value when failed to read LTTPR capabilities, and the > variable max_link_rate retains a initial value zero, this cause variable > link_rate be

Re: [PATCH] drm: remove min_order BUG_ON check

2022-03-08 Thread Arunpravin
On 07/03/22 10:11 pm, Matthew Auld wrote: > On 07/03/2022 14:37, Arunpravin wrote: >> place BUG_ON(order < min_order) outside do..while >> loop as it fails Unigine Heaven benchmark. >> >> Unigine Heaven has buffer allocation requests for >> example required pages are 161 and alignment request

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Sharma, Shashank
On 3/8/2022 11:32 AM, Christian König wrote: Am 08.03.22 um 10:31 schrieb Sharma, Shashank: On 3/8/2022 8:06 AM, Christian König wrote: Am 07.03.22 um 17:26 schrieb Shashank Sharma: From: Shashank Sharma This patch adds a new sysfs event, which will indicate the userland about a GPU

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Christian König
Am 08.03.22 um 10:31 schrieb Sharma, Shashank: On 3/8/2022 8:06 AM, Christian König wrote: Am 07.03.22 um 17:26 schrieb Shashank Sharma: From: Shashank Sharma This patch adds a new sysfs event, which will indicate the userland about a GPU reset, and can also provide some information like:

RE: [PATCH] drm/amdgpu: align ip discovery naming with legacy ASICs

2022-03-08 Thread Huang, Ray
[AMD Official Use Only] Acked-by: Huang Rui -Original Message- From: Zhang, Yifan Sent: Tuesday, March 8, 2022 2:21 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Huang, Ray ; Zhang, Yifan Subject: [PATCH] drm/amdgpu: align ip discovery naming with legacy ASICs There

Re: [PATCH 2/2] drm/amdgpu: add work function for GPU reset event

2022-03-08 Thread Sharma, Shashank
On 3/8/2022 8:15 AM, Christian König wrote: Am 07.03.22 um 17:26 schrieb Shashank Sharma: From: Shashank Sharma This patch adds a work function, which will get scheduled in event of a GPU reset, and will send a uevent to user with some reset context infomration, like a PID and some flags.

Re: [PATCH 1/2] drm: Add GPU reset sysfs event

2022-03-08 Thread Sharma, Shashank
On 3/8/2022 8:06 AM, Christian König wrote: Am 07.03.22 um 17:26 schrieb Shashank Sharma: From: Shashank Sharma This patch adds a new sysfs event, which will indicate the userland about a GPU reset, and can also provide some information like: - which PID was involved in the GPU reset -

Re: [PATCH v2] drm/amdgpu: add workarounds for Raven VCN TMZ issue

2022-03-08 Thread Christian König
Am 08.03.22 um 09:06 schrieb Lang Yu: On 03/08/ , Christian König wrote: Am 08.03.22 um 08:33 schrieb Lang Yu: On 03/08/ , Christian König wrote: Am 08.03.22 um 04:39 schrieb Lang Yu: It is a hardware issue that VCN can't handle a GTT backing stored TMZ buffer on Raven. Move such a TMZ