[pull] amdgpu drm-fixes-5.14

2021-07-28 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.14. The following changes since commit ff1176468d368232b684f75e82563369208bc371: Linux 5.14-rc3 (2021-07-25 15:35:14 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes-5.14-2021-07-28 for you to fe

RE: [PATCH v2] drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.

2021-07-28 Thread Zhang, Yifan
Hi Alex, No, it won't break gfxoff. The "gfxoff broken" issue we saw last time has been fixed on CP firmware update for Renoir, and this patch changes doorbell range setting specifically for Renoir, not covering the other ASICs. I think it is better to change doorbell range setting per ASIC to

Re: [PATCH v4 10/13] lib: test_hmm add module param for zone device type

2021-07-28 Thread Sierra Guiza, Alejandro (Alex)
On 7/22/2021 12:26 PM, Jason Gunthorpe wrote: On Thu, Jul 22, 2021 at 11:59:17AM -0500, Sierra Guiza, Alejandro (Alex) wrote: On 7/22/2021 7:23 AM, Jason Gunthorpe wrote: On Sat, Jul 17, 2021 at 02:21:32PM -0500, Alex Sierra wrote: In order to configure device generic in test_hmm, two module

Re: [PATCH v2] drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.

2021-07-28 Thread Alex Deucher
On Wed, Jul 28, 2021 at 9:33 PM Zhang, Yifan wrote: > > Hi Alex, > > No, it won't break gfxoff. The "gfxoff broken" issue we saw last time has > been fixed on CP firmware update for Renoir, and this patch changes doorbell > range setting specifically for Renoir, not covering the other ASICs. I t

[PATCH] drm/amdgpu/display: protect dc_dsc_stream_bandwidth_in_kbps with CONFIG_DRM_AMD_DC_DCN

2021-07-28 Thread Alex Deucher
It's only used and enabled with DCN, so protect it. Fixes: b6b76b0315ed7b ("drm/amd/display: Fixed EdidUtility build errors") Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc

Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-28 Thread Dan.Sneddon
Hi Sam, On 7/28/21 12:08 PM, Sam Ravnborg wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > Hi Dan, > Just to be sure... Can you confirm that vbltest is working OK *before* this patch? >>> >>> Yes, can you please verify that

Re: Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-28 Thread Dan.Sneddon
Hi Thomas, On 7/28/21 11:17 AM, Thomas Zimmermann wrote: > Hi > > Am 28.07.21 um 20:11 schrieb Sam Ravnborg: >> Hi Dan, >> >> thanks for the quick feedback! >> >> On Wed, Jul 28, 2021 at 05:50:34PM +, dan.sned...@microchip.com >> wrote: >>> On 7/28/21 8:44 AM, Sam Ravnborg wrote: EXTERN

Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-28 Thread Dan.Sneddon
On 7/28/21 11:11 AM, Sam Ravnborg wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > Hi Dan, > > thanks for the quick feedback! > > On Wed, Jul 28, 2021 at 05:50:34PM +, dan.sned...@microchip.com wrote: >> On 7/28/21 8:44 AM, Sam Ravnbo

Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-28 Thread Dan.Sneddon
On 7/28/21 8:44 AM, Sam Ravnborg wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > Hi Dan, > > On Wed, Jul 28, 2021 at 03:11:08PM +, dan.sned...@microchip.com wrote: >> On 7/28/21 7:00 AM, Sam Ravnborg wrote: >>> [You don't often get em

Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-28 Thread Dan.Sneddon
On 7/28/21 7:00 AM, Sam Ravnborg wrote: > [You don't often get email from s...@ravnborg.org. Learn why this is > important at http://aka.ms/LearnAboutSenderIdentification.] > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > Hi Dan, > > I hope y

[PATCH] drm/amdkfd: Restore all process on post reset

2021-07-28 Thread Eric Huang
It is to fix a bug of gpu_recovery on multiple GPUs, When one gpu is reset, the application running on other gpu hangs, because kfd post reset doesn't restore the running process. And it also fixes a bug in the function kfd_process_evict_queues, when one gpu hangs, process running on other gpus can

Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-28 Thread Sam Ravnborg
Hi Dan, > > > > I think I got it - we need to set irq_enabled to true. > > The documentation says so: > > " > > * @irq_enabled: > > * > > * Indicates that interrupt handling is enabled, specifically > > vblank > > * handling. Drivers which don't use drm_ir

[PATCH] drm/amd/pm: Fix a bug in semaphore double-lock

2021-07-28 Thread Luben Tuikov
Fix a bug in smu_cmn_send_msg_without_waiting() in that this function does not need to take the smu->message_lock mutex in order to send a message down to the SMU. The mutex is acquired by the caller of this function instead. Cc: Alex Deucher Cc: Changfeng Zhu Cc: Huang Rui Fixes: e070ba49f3a76

Re: Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-28 Thread Sam Ravnborg
Hi Dan, > >> > >> Just to be sure... > >> Can you confirm that vbltest is working OK *before* this patch? > > > > Yes, can you please verify that it regressed. If so, this would mean > > that the driver misses vblank interrupts with the patch applied. > > Yes, unfortunately the vbltest works be

Re: [PATCH] drm/amdgpu: set default noretry=1 to fix kfd SVM issues for raven

2021-07-28 Thread Felix Kuehling
Doesn't this break IOMMUv2? Applications that run using IOMMUv2 for system memory access depend on correct retry handling in the SQ. Therefore noretry must be 0 on Raven. I believe the reason that SVM has trouble with retry enabled is, that IOMMUv2 is catching the page faults, so the driver never

Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-28 Thread Thomas Zimmermann
Hi Am 28.07.21 um 20:11 schrieb Sam Ravnborg: Hi Dan, thanks for the quick feedback! On Wed, Jul 28, 2021 at 05:50:34PM +, dan.sned...@microchip.com wrote: On 7/28/21 8:44 AM, Sam Ravnborg wrote: EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Re: [PATCH 02/14] drm/arm/hdlcd: Convert to Linux IRQ interfaces

2021-07-28 Thread Thomas Zimmermann
Hi Sam Am 28.07.21 um 15:31 schrieb Sam Ravnborg: Hi Thomas, On Tue, Jul 27, 2021 at 08:27:09PM +0200, Thomas Zimmermann wrote: Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM

Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-28 Thread Sam Ravnborg
Hi Dan, thanks for the quick feedback! On Wed, Jul 28, 2021 at 05:50:34PM +, dan.sned...@microchip.com wrote: > On 7/28/21 8:44 AM, Sam Ravnborg wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > > content is safe > > > > Hi Dan, > > > > On Wed, Jul 28,

Re: [PATCH 01/11] mm: Introduce a function to check for virtualization protection features

2021-07-28 Thread Borislav Petkov
On Wed, Jul 28, 2021 at 02:17:27PM +0100, Christoph Hellwig wrote: > So common checks obviously make sense, but I really hate the stupid > multiplexer. Having one well-documented helper per feature is much > easier to follow. We had that in x86 - it was called cpu_has_ where xxx is the feature bi

Re: [PATCH] drm/amd/pm: Fix a bug in semaphore double-lock

2021-07-28 Thread Alex Deucher
On Wed, Jul 28, 2021 at 11:18 AM Luben Tuikov wrote: > > Fix a bug in smu_cmn_send_msg_without_waiting() in > that this function does not need to take the > smu->message_lock mutex in order to send a message > down to the SMU. The mutex is acquired by the > caller of this function instead. > > Cc:

Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-28 Thread Sam Ravnborg
Hi Dan, On Wed, Jul 28, 2021 at 03:11:08PM +, dan.sned...@microchip.com wrote: > On 7/28/21 7:00 AM, Sam Ravnborg wrote: > > [You don't often get email from s...@ravnborg.org. Learn why this is > > important at http://aka.ms/LearnAboutSenderIdentification.] > > > > EXTERNAL EMAIL: Do not cli

Re: [PATCH] drm/amdgpu: Fix out-of-bounds read when update mapping

2021-07-28 Thread Christian König
Am 27.07.21 um 12:37 schrieb Pan, Xinhui: [AMD Official Use Only] If one GTT BO has been evicted/swapped out, it should sit in CPU domain. TTM only alloc struct ttm_resource instead of struct ttm_range_mgr_node for sysMem. Now when we update mapping for such invalidated BOs, we might walk out o

Re: [PATCH] drm/amdgpu: Fix build error reported for some config

2021-07-28 Thread Lazar, Lijo
Reviewed-by: Lijo Lazar On 7/27/2021 11:58 AM, Pratik Vishwakarma wrote: drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function ‘amdgpu_acpi_is_s0ix_active’: drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1045:32: error: ‘pm_suspend_target_state’ undeclared (first use in this function) 1045 |

Re: [PATCH 01/14] drm/amdgpu: Convert to Linux IRQ interfaces

2021-07-28 Thread Christian König
Am 27.07.21 um 20:27 schrieb Thomas Zimmermann: Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. The interrupt number retur

Re: [PATCH 14/14] drm: IRQ midlayer is now legacy

2021-07-28 Thread Sam Ravnborg
Hi Thomas, On Tue, Jul 27, 2021 at 08:27:21PM +0200, Thomas Zimmermann wrote: > Hide the DRM midlayer behind CONFIG_DRM_LEGACY, make functions use > the prefix drm_legacy_, and move declarations to drm_legacy.h. > In struct drm_device, move the fields irq and irq_enabled behind > CONFIG_DRM_LEGACY

Re: [PATCH 01/14] drm/amdgpu: Convert to Linux IRQ interfaces

2021-07-28 Thread Alex Deucher
On Wed, Jul 28, 2021 at 6:27 AM Christian König wrote: > > Am 27.07.21 um 20:27 schrieb Thomas Zimmermann: > > Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's > > IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers > > don't benefit from using it. > > > > DRM IRQ ca

Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-28 Thread Sam Ravnborg
Hi Dan, I hope you can fine to test this patch from Thomas. If this works then we can forget about my attempt to do the same. Hi Thomas, IRQ_NOTCONNECTED check seems redundant, as mentioned in another patch already. With that considered: Reviewed-by: Sam Ravnborg We shall wait for testing fro

Re: [PATCH v2] drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.

2021-07-28 Thread Alex Deucher
On Wed, Jul 28, 2021 at 2:10 AM Yifan Zhang wrote: > > If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. > Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue. > > Signed-off-by: Yifan Zhang I assume this won't break gfxoff? The last time we changed this, it brok

Re: [PATCH] drm/amdgpu: enable psp front door loading by default for cyan_skillfish2

2021-07-28 Thread Zhou1, Tao
[AMD Official Use Only] Reviewed-by: Tao Zhou mailto:tao.zh...@amd.com>> From: Huang, Ray Sent: Wednesday, July 28, 2021 5:04 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Hawking ; Zhou1, Tao ; Yu, Lang ; Gong, Curry ; Huang, Ray Subje

Re: [PATCH 02/14] drm/arm/hdlcd: Convert to Linux IRQ interfaces

2021-07-28 Thread Sam Ravnborg
Hi Thomas, On Tue, Jul 27, 2021 at 08:27:09PM +0200, Thomas Zimmermann wrote: > Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's > IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers > don't benefit from using it. > > DRM IRQ callbacks are now being called directly

Re: [PATCH 02/11] x86/sev: Add an x86 version of prot_guest_has()

2021-07-28 Thread Christoph Hellwig
On Tue, Jul 27, 2021 at 05:26:05PM -0500, Tom Lendacky via iommu wrote: > Introduce an x86 version of the prot_guest_has() function. This will be > used in the more generic x86 code to replace vendor specific calls like > sev_active(), etc. > > While the name suggests this is intended mainly for g

Re: [PATCH 01/11] mm: Introduce a function to check for virtualization protection features

2021-07-28 Thread Christoph Hellwig
On Tue, Jul 27, 2021 at 05:26:04PM -0500, Tom Lendacky via iommu wrote: > In prep for other protected virtualization technologies, introduce a > generic helper function, prot_guest_has(), that can be used to check > for specific protection attributes, like memory encryption. This is > intended to e

Re: [PATCH] drm/amdgpu: set default noretry=1 to fix kfd SVM issues for raven

2021-07-28 Thread Alex Deucher
On Wed, Jul 28, 2021 at 2:36 AM Changfeng wrote: > > From: changzhu > > From: Changfeng > > It can't find any issues with noretry=1 except two SVM migrate issues. > Oppositely, it will cause most SVM cases fail with noretry=0. > The two SVM migrate issues also happen with noretry=0. So it can se

[PATCH] drm/amdgpu: enable psp front door loading by default for cyan_skillfish2

2021-07-28 Thread Huang Rui
The function is ready on psp firmware, and enable it by default. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.

linux-next: build failure after merge of the amdgpu tree

2021-07-28 Thread Mark Brown
Hi all, After merging the amdgpu tree, today's linux-next build (x86 allmodconfig) failed like this: ERROR: modpost: "dc_dsc_stream_bandwidth_in_kbps" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! Probably caused by commit b6b76b0315ed7b ("drm/amd/display: Fixed EdidUtility build errors"

Re: [PATCH 00/11] Implement generic prot_guest_has() helper function

2021-07-28 Thread Christian König
Am 28.07.21 um 00:26 schrieb Tom Lendacky: This patch series provides a generic helper function, prot_guest_has(), to replace the sme_active(), sev_active(), sev_es_active() and mem_encrypt_active() functions. It is expected that as new protected virtualization technologies are added to the kern

[PATCH] drm/amdgpu: set default noretry=1 to fix kfd SVM issues for raven

2021-07-28 Thread Changfeng
From: changzhu From: Changfeng It can't find any issues with noretry=1 except two SVM migrate issues. Oppositely, it will cause most SVM cases fail with noretry=0. The two SVM migrate issues also happen with noretry=0. So it can set default noretry=1 for raven firstly to fix most SVM fails. Ch

[PATCH v2] drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.

2021-07-28 Thread Yifan Zhang
If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue. Signed-off-by: Yifan Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/dr

RE: [PATCH] drm/amdgpu: adjust fence driver enable sequence

2021-07-28 Thread Zhang, Hawking
[AMD Official Use Only] Per discussion, please reuse existing amdgpu_fence_driver_fini_hw/fini_sw by changing their name to hw_fini/sw_fini as the patch you worked out in topic branch. With that addressed, the patch is Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- Fr

RE: [PATCH] drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.

2021-07-28 Thread Chen, Jiansong (Simon)
[AMD Official Use Only] A coding style issue, "Do not unnecessarily use braces where a single statement will do." Regards, Jiansong -Original Message- From: amd-gfx On Behalf Of Yifan Zhang Sent: Wednesday, July 28, 2021 11:40 AM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Yifan Subje

[PATCH] drm/amdgpu: adjust fence driver enable sequence

2021-07-28 Thread Likun Gao
From: Likun Gao Fence driver was enabled per ring when sw init on per IP block before. Change to enable all the fence driver at the same time after amdgpu_device_ip_init finished. Rename some function related to fence to make it reasonable for read. Signed-off-by: Likun Gao --- drivers/gpu/drm

[PATCH] drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.

2021-07-28 Thread Yifan Zhang
If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue. Signed-off-by: Yifan Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/