[PATCH] drm/amdgpu: wait till Gfxoff allow signal completes during suspend

2022-11-03 Thread Harsh Jain
change guarantees that gfxoff is allowed before moving further in s2idle sequence to add more reliablity about gfxoff in amdgpu IP's suspend flow Signed-off-by: Harsh Jain diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index 222d3d7ea076..5b2afe34

Re: [PATCH] drm/amdkfd: Fix error handling in kfd_criu_restore_events

2022-11-03 Thread Bhardwaj, Rajneesh
[AMD Official Use Only - General] Yes it helps avoid the unbalanced lock messages seen during criu restore failures for events. Looks good to me. Reviewed-by: Rajneesh Bhardwaj Regards, Rajneesh From: amd-gfx on behalf of Felix Kuehling Sent: Thursday, Novem

RE: [PATCH] drm/amd/pm: update SMU IP v13.0.4 msg interface header

2022-11-03 Thread Zhang, Yifan
[AMD Official Use Only - General] Reviewed-by: Yifan Zhang Best Regards, Yifan -Original Message- From: Huang, Tim Sent: Thursday, November 3, 2022 4:50 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Du, Xiaojian ; Huang, Tim ; Limonciello, Mario Subje

[PATCH] drm/amd/amdgpu: Enable gfx pipe1 and fix related issues

2022-11-03 Thread Emily Deng
Starting from SIENNA CICHLID asic supports two gfx pipes, enabling two graphics queues for performance concern. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 43 + 2 files changed, 23 insertions(+)

Re: [PATCH v3] drm/amdkfd: Fix error handling in criu_checkpoint

2022-11-03 Thread Bhardwaj, Rajneesh
This one is more elegant. Looks good to me! Reviewed-and-tested-by: Rajneesh Bhardwaj On 11/3/2022 7:12 PM, Felix Kuehling wrote: Checkpoint BOs last. That way we don't need to close dmabuf FDs if something else fails later. This avoids problematic access to user mode memory in the error handl

[PATCH] drm/amdkfd: Fix error handling in kfd_criu_restore_events

2022-11-03 Thread Felix Kuehling
mutex_unlock before the exit label because all the error code paths that jump there didn't take that lock. This fixes unbalanced locking errors in case of restore errors. Fixes: 40e8a766a761 ("drm/amdkfd: CRIU checkpoint and restore events") Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/

[PATCH v3] drm/amdkfd: Fix error handling in criu_checkpoint

2022-11-03 Thread Felix Kuehling
Checkpoint BOs last. That way we don't need to close dmabuf FDs if something else fails later. This avoids problematic access to user mode memory in the error handling code path. criu_checkpoint_bos has its own error handling and cleanup that does not depend on access to user memory. In the priva

Re: [PATCH] drm/amdgpu: workaround for TLB seq race

2022-11-03 Thread Philip Yang
On 2022-11-02 10:58, Christian König wrote: It can happen that we query the sequence value before the callback had a chance to run. Work around that by grabbing the fence lock and releasing it again. Should be replaced by hw handling soon. kfd_flush_tlb is always called after waiting for map

[PATCH] drm/amd/display: don't enable DRM CRTC degamma property for DCE

2022-11-03 Thread Melissa Wen
DM maps DRM CRTC degamma to DPP (pre-blending) degamma block, but DCE doesn't support programmable degamma curve anywhere. Currently, a custom degamma is accepted by DM but just ignored by DCE driver and degamma correction isn't actually applied. There is no way to map custom degamma in DCE, theref

[linux-next:master] BUILD SUCCESS WITH WARNING 81214a573d19ae2fa5b528286ba23cd1cb17feec

2022-11-03 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 81214a573d19ae2fa5b528286ba23cd1cb17feec Add linux-next specific files for 20221103 Warning: (recently discovered and may have been fixed) drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c

Re: drm/amdgpu: workaround for TLB seq race

2022-11-03 Thread Limonciello, Mario
On 11/2/2022 09:58, Christian König wrote: It can happen that we query the sequence value before the callback had a chance to run. Work around that by grabbing the fence lock and releasing it again. Should be replaced by hw handling soon. Signed-off-by: Christian König Acked-by: Alex Deucher

[PATCH] drm/amdgpu: workaround for TLB seq race

2022-11-03 Thread Stefan Springer
Looking good after 24+hrs of use Tested-by: Stefan Springer

drm/amdgpu: workaround for TLB seq race

2022-11-03 Thread Stefan Springer
Tested-by: Stefan Springer

[PATCH v3 15/23] drm/fb-helper: Disconnect damage worker from update logic

2022-11-03 Thread Thomas Zimmermann
The fbdev helpers implement a damage worker that forwards fbdev updates to the DRM driver. The worker's update logic depends on the generic fbdev emulation. Separate the two via function pointer. The generic fbdev emulation sets struct drm_fb_helper_funcs.fb_dirty, a new callback that hides the up

[PATCH v3 17/23] drm/fb-helper: Perform all fbdev I/O with the same implementation

2022-11-03 Thread Thomas Zimmermann
Implement the fbdev's read/write helpers with the same functions. Use the generic fbdev's code as template. Convert all drivers. DRM's fb helpers must implement regular I/O functionality in struct fb_ops and possibly perform a damage update. Handle all this in the same functions and convert driver

[PATCH v3 23/23] drm/fb-helper: Clarify use of last_close and output_poll_changed

2022-11-03 Thread Thomas Zimmermann
Clarify documentation in the use of struct drm_driver.last_close and struct drm_mode_config_funcs.output_poll_changed. Those callbacks should not be said for fbdev implementations on top of struct drm_client_funcs. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_fb_helper.c | 6 --

[PATCH v3 16/23] drm/fb-helper: Call fb_sync in I/O functions

2022-11-03 Thread Thomas Zimmermann
Call struct fb_ops.fb_sync in drm_fbdev_{read,write}() to mimic the behavior of fbdev. Fbdev implementations of fb_read and fb_write in struct fb_ops invoke fb_sync to synchronize with outstanding operations before I/O. Doing the same in DRM implementations will allow us to use them throughout DRM

[PATCH v3 07/23] drm/logicvc: Don't set struct drm_driver.output_poll_changed

2022-11-03 Thread Thomas Zimmermann
Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as logicvc uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm

[PATCH v3 19/23] drm/fb-helper: Always initialize generic fbdev emulation

2022-11-03 Thread Thomas Zimmermann
Initialize the generic fbdev emulation even if it has been disabled on the kernel command line. The hotplug and mode initialization will fail accordingly. The kernel parameter can still be changed at runtime and the emulation will initialize after hotplugging the connector. Signed-off-by: Thomas

[PATCH v3 22/23] drm/fb-helper: Remove unnecessary include statements

2022-11-03 Thread Thomas Zimmermann
Remove include statements for where it is not required (i.e., most of them). In a few places include other header files that are required by the source code. v3: * fix amdgpu include statements * fix rockchip include statements Signed-off-by: Thomas Zimmermann Reviewed-by: Javie

[PATCH v3 14/23] drm/fb-helper: Rename drm_fb_helper_unregister_fbi() to use _info postfix

2022-11-03 Thread Thomas Zimmermann
Rename drm_fb_helper_unregister_fbi() to drm_fb_helper_unregister_info() as part of unifying the naming within fbdev helpers. Adapt drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/armada/armada_fbdev.c | 2 +- drive

[PATCH v3 11/23] drm/fb-helper: Cleanup include statements in header file

2022-11-03 Thread Thomas Zimmermann
Only include what we have to. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- include/drm/drm_fb_helper.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index fddd0d1af6891..e92308952

[PATCH v3 13/23] drm/fb-helper: Rename drm_fb_helper_alloc_fbi() to use _info postfix

2022-11-03 Thread Thomas Zimmermann
Rename drm_fb_helper_alloc_fbi() to drm_fb_helper_alloc_info() as part of unifying the naming within fbdev helpers. Adapt drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/armada/armada_fbdev.c | 2 +- drivers/gpu/drm

[PATCH v3 20/23] drm/fb-helper: Set flag in struct drm_fb_helper for leaking physical addresses

2022-11-03 Thread Thomas Zimmermann
Uncouple the parameter drm_leak_fbdev_smem from the implementation by setting a flag in struct drm_fb_helper. This will help to move the generic fbdev emulation into its own source file, while keeping the parameter in drm_fb_helper.c. No functional changes. Signed-off-by: Thomas Zimmermann --- d

[PATCH v3 09/23] drm/panel-ili9341: Include

2022-11-03 Thread Thomas Zimmermann
Include for devm_of_find_backlight(). Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c b/drivers/gpu/drm/panel/panel-ilitek-i

[PATCH v3 05/23] drm/imx/dcss: Don't set struct drm_driver.output_poll_changed

2022-11-03 Thread Thomas Zimmermann
Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as DCSS uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm_pr

[PATCH v3 12/23] drm/fb_helper: Rename field fbdev to info in struct drm_fb_helper

2022-11-03 Thread Thomas Zimmermann
Rename struct drm_fb_helper.fbdev to info. The current name is misleading as it overlaps with generic fbdev naming conventions. Adapt to the usual naming in fbdev drivers by calling the field 'info'. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --

[PATCH v3 21/23] drm/fb-helper: Move generic fbdev emulation into separate source file

2022-11-03 Thread Thomas Zimmermann
Move the generic fbdev implementation into its own source and header file. Adapt drivers. No functional changes, but some of the internal helpers have been renamed to fit into the drm_fbdev_ naming scheme. v3: * rename drm_fbdev.{c,h} to drm_fbdev_generic.{c,h} * rebase onto vmwgfx

[PATCH v3 10/23] drm/tve200: Include

2022-11-03 Thread Thomas Zimmermann
Include for of_match_ptr(). Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/tve200/tve200_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c index 04db72e3fa9c2..611785e

[PATCH v3 18/23] drm/fb_helper: Minimize damage-helper overhead

2022-11-03 Thread Thomas Zimmermann
Pull the test for fb_dirty into the caller to avoid extra work if no callback has been set. In this case no damage handling is required and no damage area needs to be computed. Print a warning if the damage worker runs without getting an fb_dirty callback. Signed-off-by: Thomas Zimmermann Reviewe

[PATCH v3 08/23] drm/rockchip: Don't set struct drm_driver.output_poll_changed

2022-11-03 Thread Thomas Zimmermann
Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as rockchip uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in dr

[PATCH v3 04/23] drm/amdgpu: Don't set struct drm_driver.output_poll_changed

2022-11-03 Thread Thomas Zimmermann
Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as amdgpu uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm_

[PATCH v3 01/23] drm/komeda: Don't set struct drm_driver.lastclose

2022-11-03 Thread Thomas Zimmermann
Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as komeda uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann Reviewed-by: Ja

[PATCH v3 06/23] drm/ingenic: Don't set struct drm_driver.output_poll_changed

2022-11-03 Thread Thomas Zimmermann
Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as ingenic uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm

[PATCH v3 02/23] drm/mcde: Don't set struct drm_driver.lastclose

2022-11-03 Thread Thomas Zimmermann
Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as mcde uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann Reviewed-by: Javi

[PATCH v3 03/23] drm/vboxvideo: Don't set struct drm_driver.lastclose

2022-11-03 Thread Thomas Zimmermann
Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as vboxvideo uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann Reviewed-by:

[PATCH v3 00/23] drm/fb-helper: Untangle fbdev emulation and helpers

2022-11-03 Thread Thomas Zimmermann
Separate generic fbdev emulation from the helper code that is shared among the various fbdev implementations within DRM. Affects many drivers. It has become apparent that our fully generic fbdev emulation will never produce optimal results for all drivers. In its current form, it is also hard to m

RE: [PATCH v3 3/3] drm/amdgpu: remove the DID of Vangogh from pciidlist

2022-11-03 Thread Yuan, Perry
[AMD Official Use Only - General] Hi Alex. > -Original Message- > From: Alex Deucher > Sent: Thursday, November 3, 2022 9:15 PM > To: Yuan, Perry > Cc: Deucher, Alexander ; Liang, Richard qi > ; Huang, Shimmer > ; amd-gfx@lists.freedesktop.org; Liu, Kun > > Subject: Re: [PATCH v3 3/3]

[PATCH 1/1] drm/amdgpu: Unlock bo_list_mutex after error handling

2022-11-03 Thread Philip Yang
Get below kernel WARNING backtrace when pressing ctrl-C to kill kfdtest application. If amdgpu_cs_parser_bos returns error after taking bo_list_mutex, as caller amdgpu_cs_ioctl will not unlock bo_list_mutex, this generates the kernel WARNING. Add unlock bo_list_mutex after amdgpu_cs_parser_bos er

Re: [PATCH v4 1/1] drm/amd/display: add DCN support for ARM64

2022-11-03 Thread Ao Zhong
Awesome, thanks! Rodrigo Siqueira Jordao schrieb am Do. 3. Nov. 2022 um 15:21: > > > On 2022-11-01 12:31, Nathan Chancellor wrote: > > On Tue, Nov 01, 2022 at 10:36:08AM -0400, Rodrigo Siqueira Jordao wrote: > >> > >> > >> On 2022-10-31 15:37, Ao Zhong wrote: > >>> After moving all FPU code to t

Re: [PATCH v4 1/1] drm/amd/display: add DCN support for ARM64

2022-11-03 Thread Rodrigo Siqueira Jordao
On 2022-11-01 12:31, Nathan Chancellor wrote: On Tue, Nov 01, 2022 at 10:36:08AM -0400, Rodrigo Siqueira Jordao wrote: On 2022-10-31 15:37, Ao Zhong wrote: After moving all FPU code to the DML folder, we can enable DCN support for the ARM64 platform. Remove the -mgeneral-regs-only CFLAG fr

Re: [PATCH] drm/amd/pm: update SMU IP v13.0.4 msg interface header

2022-11-03 Thread Alex Deucher
Acked-by: Alex Deucher On Thu, Nov 3, 2022 at 4:50 AM Tim Huang wrote: > > Some of the unused messages that were used earlier in development have > been freed up as spare messages, no intended functional changes. > > Signed-off-by: Mario Limonciello > Signed-off-by: Tim Huang > --- > .../amd/

Re: [PATCH v3 3/3] drm/amdgpu: remove the DID of Vangogh from pciidlist

2022-11-03 Thread Alex Deucher
On Thu, Nov 3, 2022 at 2:24 AM Perry Yuan wrote: > > change the vangogh family to use IP discovery path to initialize IP > list, this needs to remove the DID from the PCI ID list to allow the IP > discovery path to set all the IP versions correctly. As a follow up patch, it may make sense to remo

Re: [PATCH v3 1/3] drm/amdgpu: add Vangogh APU flag to IP discovery path

2022-11-03 Thread Alex Deucher
Series is: Reviewed-by: Alex Deucher On Thu, Nov 3, 2022 at 2:24 AM Perry Yuan wrote: > > Add the missing apu flag for Vangogh when using IP discovery code path > to initialize IPs > > Signed-off-by: Perry Yuan > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + > 1 file changed, 1 in

Re: [PATCH 4/5] drm/amdgpu: MCBP based on DRM scheduler (v8)

2022-11-03 Thread Michel Dänzer
On 2022-11-03 03:58, Zhu, Jiadong wrote: > [AMD Official Use Only - General] > >> The bad news is that this series still makes some things very slow. The most >> extreme examples so far are glxgears (runs at ~400 fps now, ~7000 fps >> before, i.e. almost 20x slowdown) and hexchat (scrolling one

[PATCH] drm/amd/pm: update SMU IP v13.0.4 msg interface header

2022-11-03 Thread Tim Huang
Some of the unused messages that were used earlier in development have been freed up as spare messages, no intended functional changes. Signed-off-by: Mario Limonciello Signed-off-by: Tim Huang --- .../amd/pm/swsmu/inc/pmfw_if/smu_v13_0_4_ppsmc.h | 15 +++ 1 file changed, 7 inserti

RE: [PATCH] drm/amdgpu: Disable GFX RAS feature for SRIOV case

2022-11-03 Thread Zhang, Hawking
[AMD Official Use Only - General] No worries. Let's know if you run into any RAS issue in SRIOV environment. Regards, Hawking -Original Message- From: Wang, YuBiao Sent: Thursday, November 3, 2022 15:56 To: Zhang, Hawking ; amd-gfx@lists.freedesktop.org; Feng, Kenneth Cc: Xiao, Jack

RE: [PATCH] drm/amdgpu: Disable GFX RAS feature for SRIOV case

2022-11-03 Thread Wang, YuBiao
Hi Hawking, Yes I now noticed that. I was sending this patch since I found it as a regression on my side. So this is caused by IFWI regression instead of a sriov-only bug. Sorry for the misunderstanding. Thanks! Regards, Yubiao -Original Message- From: Zhang, Hawking Sent: Thursday,

Re: [PATCH] drm/amdgpu: fix for suspend/resume sequence under sriov

2022-11-03 Thread Christian König
Am 03.11.22 um 05:06 schrieb Victor Zhao: - clear kiq ring after suspend/resume under sriov to aviod kiq ring test failure - update irq after resume to fix kiq interrput loss Good to see that somebody takes a look into this. Is that enough to get suspend/resume with SRIOV going? Signed-off