Re: [PATCH 1/1] drm/amdgpu: Drop eviction lock when allocating PT BO

2022-11-02 Thread Christian König
Am 02.11.22 um 22:10 schrieb Philip Yang: Re-take the eviction lock immediately again after the allocation is completed, to fix circular locking warning with drm_buddy allocator. Move amdgpu_vm_eviction_lock/unlock/trylock to amdgpu_vm.h as they are called from multiple files. Signed-off-by:

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

2022-11-02 Thread Zhang, Hawking
[AMD Official Use Only - General] Btw, if the concern is the gfx_late_init failure caused by incorrect setting in IFWI. @Feng, Kenneth already have a workaround. Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Zhang, Hawking Sent: Thursday, November 3, 2022 14:46 To: Wa

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

2022-11-02 Thread Zhang, Hawking
[AMD Official Use Only - General] amdgpu_ras_feature_enable won't send RAS command to firmware if it is invoked from guest side. The change seems unnecessary. Regards, Hawking -Original Message- From: Wang, YuBiao Sent: Thursday, November 3, 2022 14:39 To: Wang, YuBiao ; amd-gfx@lists

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

2022-11-02 Thread Wang, YuBiao
Hi Hawking, This patch is to skip ras init in sriov case. Please help review. Thanks, Yubiao -Original Message- From: YuBiao Wang Sent: Thursday, November 3, 2022 11:12 AM To: amd-gfx@lists.freedesktop.org Cc: Andrey Grodzovsky ; Quan, Evan ; Chen, Horace ; Tuikov, Luben ; Koenig, Ch

RE: [PATCH v2 2/3] drm/amd/display: change GPU match with IP version for Vangogh

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

[PATCH v3 2/3] drm/amd/display: change GPU match with IP version for Vangogh

2022-11-02 Thread Perry Yuan
Use ip versions (10,3,1) to match the GPU after Vangogh switched to use IP discovery path. Signed-off-by: Perry Yuan --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/

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

2022-11-02 Thread Perry Yuan
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. Signed-off-by: Perry Yuan --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 --- 1 file changed, 3 deleti

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

2022-11-02 Thread Perry Yuan
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 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amd

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

2022-11-02 Thread Alex Deucher
On Thu, Nov 3, 2022 at 12:06 AM Victor Zhao wrote: > > - clear kiq ring after suspend/resume under sriov to aviod kiq ring > test failure > - update irq after resume to fix kiq interrput loss > > Signed-off-by: Victor Zhao > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ > drivers/gpu/

RE: [PATCH] drm/amd/amdgpu: temporary workaround to skip ras error for gc_v11_0_3

2022-11-02 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Kenneth Feng Sent: Thursday, November 3, 2022 11:39 To: amd-gfx@lists.freedesktop.org Cc: Feng, Kenneth Subject: [PATCH] drm/amd/amdgpu: temporary workaround to s

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

2022-11-02 Thread Zhao, Victor
[AMD Official Use Only - General] Hi Alex, This is a patch fixing the sriov suspend/resume sequence. Please help review. Thanks, Victor -Original Message- From: Victor Zhao Sent: Thursday, November 3, 2022 12:06 PM To: amd-gfx@lists.freedesktop.org; Deucher, Alexander Cc: Zhao, V

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

2022-11-02 Thread 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 Signed-off-by: Victor Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++ 2 files changed, 4 insertions(

[PATCH] drm/amd/amdgpu: temporary workaround to skip ras error for gc_v11_0_3

2022-11-02 Thread Kenneth Feng
temporary workaround to skip ras error for gc_v11_0_3 until IFWI release later Signed-off-by: Kenneth Feng --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v

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

2022-11-02 Thread YuBiao Wang
In sriov guest side doesn't need init ras feature, so skip it. Signed-off-by: YuBiao Wang --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index 84a76c36

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

2022-11-02 Thread Zhu, Jiadong
[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 page now takes ~1 second, >I can see it drawing li

[pull] amdgpu, amdkfd drm-fixes-6.1

2022-11-02 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 6.1. The big change here is the hang fix for the GC11 trap handler. The following changes since commit 30a0b95b1335e12efef89dd78518ed3e4a71a763: Linux 6.1-rc3 (2022-10-30 15:19:28 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/agd5

[PATCH] drm/amdgpu: Add notifier lock for KFD userptrs

2022-11-02 Thread Felix Kuehling
Add a per-process MMU notifier lock for processing notifiers from userptrs. Use that lock to properly synchronize page table updates with MMU notifiers. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 12 +- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 202 +

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

2022-11-02 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. criu_restore

[PATCH 1/1] drm/amdgpu: Drop eviction lock when allocating PT BO

2022-11-02 Thread Philip Yang
Re-take the eviction lock immediately again after the allocation is completed, to fix circular locking warning with drm_buddy allocator. Move amdgpu_vm_eviction_lock/unlock/trylock to amdgpu_vm.h as they are called from multiple files. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/a

Re: [23/33] drm/amd/display: cursor update command incomplete

2022-11-02 Thread Alex Deucher
On Tue, Nov 1, 2022 at 3:27 PM Limonciello, Mario wrote: > > On 10/20/2022 10:46, Rodrigo Siqueira wrote: > > From: Max Tseng > > > > Missing send cursor_rect width & Height into DMUB. PSR-SU would use > > these information. But missing these assignment in last refactor commit > > > > Reviewed-by

[linux-next:master] BUILD REGRESSION 61c3426aca2c71052ddcd06c32e29d92304990fd

2022-11-02 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 61c3426aca2c71052ddcd06c32e29d92304990fd Add linux-next specific files for 20221102 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202210271517.snuenhd0-...@intel.com https

Re: [PATCH v2 2/3] drm/amd/display: change GPU match with IP version for Vangogh

2022-11-02 Thread Alex Deucher
On Wed, Nov 2, 2022 at 1:00 PM Perry Yuan wrote: > > Use ip versions (10,3,1) to match the GPU after Vangogh switched to use IP > discovery path. > > Signed-off-by: Perry Yuan > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >

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

2022-11-02 Thread Perry Yuan
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. Signed-off-by: Perry Yuan --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 --- 1 file changed, 3 deleti

[PATCH v2 2/3] drm/amd/display: change GPU match with IP version for Vangogh

2022-11-02 Thread Perry Yuan
Use ip versions (10,3,1) to match the GPU after Vangogh switched to use IP discovery path. Signed-off-by: Perry Yuan --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/

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

2022-11-02 Thread Perry Yuan
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 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amd

Re: [PATCH 2/2] drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback

2022-11-02 Thread Alex Deucher
Applied the series. Thanks! Alex On Wed, Nov 2, 2022 at 11:43 AM Kees Cook wrote: > > On Wed, Nov 02, 2022 at 08:25:40AM -0700, Nathan Chancellor wrote: > > With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), > > indirect call targets are validated against the expected function

Re: [PATCH v2] [next] drm/amdgpu: Replace one-element array with flexible-array member

2022-11-02 Thread Alex Deucher
Applied. Thanks! Alex On Fri, Oct 28, 2022 at 9:31 PM Paulo Miguel Almeida wrote: > > One-element arrays are deprecated, and we are replacing them with > flexible array members instead. So, replace one-element array with > flexible-array member in struct _ATOM_FAKE_EDID_PATCH_RECORD and > refac

Re: [PATCH v2] [next] drm/radeon: Replace one-element array with flexible-array member

2022-11-02 Thread Alex Deucher
On Tue, Nov 1, 2022 at 6:41 PM Kees Cook wrote: > > On Tue, Nov 01, 2022 at 06:09:16PM -0400, Alex Deucher wrote: > > On Tue, Nov 1, 2022 at 5:54 PM Kees Cook wrote: > > > Does the ROM always only have a single byte there? This seems unlikely > > > given the member "ucFakeEDIDLength" (and the cod

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

2022-11-02 Thread Alex Deucher
On Wed, Nov 2, 2022 at 10:58 AM 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. workaround > Should be replaced by hw handling soon. > > Signed-off-by: Chr

Re: [PATCH 2/2] drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback

2022-11-02 Thread Kees Cook
On Wed, Nov 02, 2022 at 08:25:40AM -0700, Nathan Chancellor wrote: > With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), > indirect call targets are validated against the expected function > pointer prototype to make sure the call target is valid to help mitigate > ROP attacks. If

Re: [PATCH 1/2] drm/amdgpu: Fix type of second parameter in trans_msg() callback

2022-11-02 Thread Kees Cook
On Wed, Nov 02, 2022 at 08:25:39AM -0700, Nathan Chancellor wrote: > With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), > indirect call targets are validated against the expected function > pointer prototype to make sure the call target is valid to help mitigate > ROP attacks. If

[PATCH 20/22] drm/amd/display: Add margin for max vblank time for SubVP + DRR

2022-11-02 Thread Alan Liu
From: Alvin Lee [Description] - Incorporate FW delays as port of max VTOTAL calculated for SubVP + DRR cases (since it is part of the microschedule). - Also add margin for the max VTOTAL possible for SubVP + DRR cases. - Due to rounding errors in FW (integer arithmetic), the microschedule cal

[PATCH 22/22] drm/amd/display: 3.2.211

2022-11-02 Thread Alan Liu
From: Aric Cyr DC version 3.2.211 brings along the following fixes: - Wait for VBLANK during pipe programming - Adding HDMI SCDC DEVICE_ID define - Cursor update refactor: PSR-SU support condition - Update 709 gamma to 2.222 as stated in the standerd - Consider dp cable id only when data is non

[PATCH 21/22] drm/amd/display: Populate DP2.0 output type for DML pipe

2022-11-02 Thread Alan Liu
From: George Shen [Why] DCN3.2 DML logic uses a new output type for DP2.0, which will enable validation to pass for higher BW timings that require DP2.0 link rates. [How] Populate the DML pipe with DP2.0 output type if the signal type of the pipe_ctx is 128b/132b. Reviewed-by: Alvin Lee Acked-

[PATCH 18/22] drm/amd/display: Enforce minimum prefetch time for low memclk on DCN32

2022-11-02 Thread Alan Liu
From: Dillon Varone [WHY?] Data return times when using lowest memclk can be <= 60us, which can cause underflow on high bandwidth displays with a workload. [HOW?] Enforce a minimum prefetch time during validation for low memclk modes. Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Dil

[PATCH 19/22] drm/amd/display: Set correct EOTF and Gamut flag in VRR info

2022-11-02 Thread Alan Liu
From: Mike Hsieh [Why] FreeSync always use G2.2 EOTF and Native gamut [How] Set EOTF and Gamut flags accordingly Reviewed-by: Krunoslav Kovac Acked-by: Alan Liu Signed-off-by: Mike Hsieh --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 8 1 file changed, 4 insertions(+)

[PATCH 17/22] drm/amd/display: Only update link settings after successful MST link train

2022-11-02 Thread Alan Liu
From: Michael Strauss [WHY] Currently driver reduces verified link caps on DPIA devices if a link is trained at a link rate below the max rate verified during link detection. This blocks high bandwidth modes after setting a low bandwidth mode. [HOW] Only update link rate after a successful link

[PATCH 16/22] drm/amd/display: Fix gpio port mapping issue

2022-11-02 Thread Alan Liu
From: Steve Su [Why] 1. Port of gpio has different mapping. [How] 1. Add a dummy entry in mapping table. 2. Fix incorrect mask bit field access. Reviewed-by: Alvin Lee Acked-by: Alan Liu Signed-off-by: Steve Su --- .../amd/display/dc/gpio/dcn32/hw_factory_dcn32.c | 14 ++ driv

[PATCH 13/22] drm/amd/display: Fix fallback issues for DP LL 1.4a tests

2022-11-02 Thread Alan Liu
From: Mustapha Ghaddar [WHY] Unlike DP or USBC, the USB4 link does not get its own encoder and has to share therefore verify_caps is skipped. [HOW] Fix the fallback logic for automated tests and take that into consideration for LT and LS. Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by:

[PATCH 12/22] drm/amd/display: Disable DRR actions during state commit

2022-11-02 Thread Alan Liu
From: Wesley Chalmers [WHY] Committing a state while performing DRR actions can cause underflow. [HOW] Disabled features performing DRR actions during state commit. Need to follow-up on why DRR actions affect state commit. Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Wesley Chalmers

[PATCH 15/22] drm/amd/display: Fix reg timeout in enc314_enable_fifo

2022-11-02 Thread Alan Liu
From: Nicholas Kazlauskas [Why] The link enablement sequence can end up resetting the encoder while the PHY symclk isn't yet on. This means that waiting for symclk on will timeout, along with the reset bit never asserting high. This causes unnecessary delay when enabling the link and produces a

[PATCH 11/22] drm/amd/display: Disable phantom OTG after enable for plane disable

2022-11-02 Thread Alan Liu
From: Alvin Lee [Description] - Need to disable phantom OTG after it's enabled in order to restore it to it's original state. - If it's enabled and then an MCLK switch comes in we may not prefetch the correct data since the phantom OTG could already be in the middle of the frame. Reviewed-

[PATCH 14/22] drm/amd/display: Fix FCLK deviation and tool compile issues

2022-11-02 Thread Alan Liu
From: Chaitanya Dhere [Why] Recent backports from open source do not have header inclusion pattern that is consistent with inclusion style in the rest of the file. This breaks the internal tool builds as well. A recent commit erronously modified the original DML formula for calculating ActiveCloc

[PATCH 10/22] drm/amd/display: Use min transition for SubVP into MPO

2022-11-02 Thread Alan Liu
From: Alvin Lee [Description] - For SubVP transitioning into MPO, we want to use a minimal transition to prevent transient underflow - Transitioning a phantom pipe directly into a "real" pipe can result in underflow due to the HUBP still having it's "phantom" programming when HUBP is un

[PATCH 09/22] drm/amd/display: Zeromem mypipe heap struct before using it

2022-11-02 Thread Alan Liu
From: Aurabindo Pillai [Why&How] Bug was caused when moving variable from stack to heap because it was reusable and garbage was left over, so we need to zero mem. Reviewed-by: Martin Leung Acked-by: Alan Liu Signed-off-by: Aurabindo Pillai Signed-off-by: Martin Leung --- drivers/gpu/drm/amd

[PATCH 05/22] drm/amd/display: Consider dp cable id only when data is non zero

2022-11-02 Thread Alan Liu
From: Wenjing Liu Cable ID is a DP2 feature to identify max certified link rate that a cable can carry. The cable identification method requires both cable and display hardware support. Since the specs comes late, it is anticipated that the first round of DP2 cables and displays may not be fully

[PATCH 04/22] drm/amd/display: Update 709 gamma to 2.222 as stated in the standerd

2022-11-02 Thread Alan Liu
From: Nawwar Ali [WHY] Previously driver use gamma 2.2 for 709 color space, but the standard is to use gamma of 2.222 [HOW] Change it gamma to 2.222 Reviewed-by: Krunoslav Kovac Acked-by: Alan Liu Signed-off-by: Nawwar Ali --- drivers/gpu/drm/amd/display/modules/color/color_gamm

[PATCH 08/22] drm/amd/display: Allow tuning DCN314 bounding box

2022-11-02 Thread Alan Liu
From: Nicholas Kazlauskas [Why] We're missing the helpers from dcn20 that would allow overriding these with DC debug options. [How] Use dcn20_patch_bounding_box to support overriding all the relevant values. Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Nicholas Kazlauskas --- driv

[PATCH 03/22] drm/amd/display: Cursor update refactor: PSR-SU support condition

2022-11-02 Thread Alan Liu
From: Max Tseng [Why] PSR-SU requires extra conditions while cursor update. Reviewed-by: Robin Chen Acked-by: Alan Liu Signed-off-by: Max Tseng --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 48 1 file changed, 48 insertions(+) diff --git a/drivers/gpu/drm/amd/displ

[PATCH 07/22] drm/amd/display: Update SR watermarks for DCN314

2022-11-02 Thread Alan Liu
From: Nicholas Kazlauskas [Why & How] New values requested by hardware after fine-tuning. Update for all memory types. Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Nicholas Kazlauskas --- .../dc/clk_mgr/dcn314/dcn314_clk_mgr.c| 32 +-- .../amd/display/dc/dml

[PATCH 06/22] drm/amd/display: Waiting for 1 frame to fix the flash issue on PSR1

2022-11-02 Thread Alan Liu
From: Ryan Lin [Why] Needs more frames waiting before the PSR_Exit sending for the specific TCON. [How] Add relock_delay_frame_cnt to control how many frames waiting are needed before the PSR_Exit sending. The default value is 0. The Driver side can set this variable for specific TCONs. Reviewe

[PATCH 02/22] drm/amd/display: Adding HDMI SCDC DEVICE_ID define

2022-11-02 Thread Alan Liu
From: Leo Ma [Why && How] We will need to differentiate vendor behavior in the future. Reviewed-by: Chris Park Acked-by: Alan Liu Signed-off-by: Leo Ma --- drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/cor

[PATCH 01/22] drm/amd/display: Wait for VBLANK during pipe programming

2022-11-02 Thread Alan Liu
From: Alvin Lee [Description] - Wait for vblank during front end programming for global sync to ensure all double buffer updates take. - This prevents underflow in some cases. Reviewed-by: Martin Leung Acked-by: Alan Liu Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/display/dc/dcn20/d

[PATCH 00/22] DC Patches Nov 2, 2022

2022-11-02 Thread Alan Liu
This DC patchset brings improvements in multiple areas. In summary, we have: - Wait for VBLANK during pipe programming - Adding HDMI SCDC DEVICE_ID define - Cursor update refactor: PSR-SU support condition - Update 709 gamma to 2.222 as stated in the standerd - Consider dp cabl

Re: [PATCH 1/3] drm/amdgpu/gfx9: set gfx.funcs in early init

2022-11-02 Thread Christian König
Am 02.11.22 um 16:23 schrieb Alex Deucher: So the callbacks are set before we use them. Fixes: 0c9646e1a043 ("drm/amdgpu: switch to select_se_sh wrapper for gfx v9_0") Signed-off-by: Alex Deucher Reviewed-by: Christian König for the series. --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +

[PATCH 1/2] drm/amdgpu: Fix type of second parameter in trans_msg() callback

2022-11-02 Thread Nathan Chancellor
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as

[PATCH 2/2] drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback

2022-11-02 Thread Nathan Chancellor
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as

[PATCH 2/3] drm/amdgpu/gfx10: set gfx.funcs in early init

2022-11-02 Thread Alex Deucher
So the callbacks are set early in case we need them. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index af94ac580d3e.

[PATCH 3/3] drm/amdgpu/gfx11: set gfx.funcs in early init

2022-11-02 Thread Alex Deucher
So the callbacks are set early in case we need them. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index f68e13b6282c..4

[PATCH 1/3] drm/amdgpu/gfx9: set gfx.funcs in early init

2022-11-02 Thread Alex Deucher
So the callbacks are set before we use them. Fixes: 0c9646e1a043 ("drm/amdgpu: switch to select_se_sh wrapper for gfx v9_0") Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gf

Re: [PATCH] drm/amd/amdgpu: skip ras late init if it is not supported

2022-11-02 Thread Deucher, Alexander
[Public] Acked-by: Alex Deucher From: amd-gfx on behalf of Kenneth Feng Sent: Wednesday, November 2, 2022 6:14 AM To: amd-gfx@lists.freedesktop.org Cc: Feng, Kenneth Subject: [PATCH] drm/amd/amdgpu: skip ras late init if it is not supported skip ras late ini

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

2022-11-02 Thread Christian König
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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 15 +++ 1 f

Re: [PATCH] drm/amd/display: add parameter backlight_min

2022-11-02 Thread Harry Wentland
On 2022-11-01 11:33, Filip Moc wrote: > Hello Harry, > > thank you for your response. > >> amdgpu.backlight_min=2:-1 > > almost :-) > > Array elements in module parameters are separated by commas not colons. > So for cmdline it should look like this: > amdgpu.backlight_min=2,-1 > > Though y

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

2022-11-02 Thread Felix Kuehling
Am 2022-11-01 um 22:19 schrieb Bhardwaj, Rajneesh: On 11/1/2022 3:15 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 handling code path. criu_checkpoint_bos

Re: [6.1][regression] after commit dd80d9c8eecac8c516da5b240d01a35660ba6cb6 some games (Cyberpunk 2077, Forza Horizon 4/5) hang at start

2022-11-02 Thread Christian König
Am 02.11.22 um 14:36 schrieb Mikhail Gavrilov: On Tue, Nov 1, 2022 at 10:52 PM Christian König wrote: Let's focus on one problem at a time. The issue here is that somehow userptr handling became racy after we removed the lock, but I don't see why. We need to fix this ASAP since it is probably

Re: [6.1][regression] after commit dd80d9c8eecac8c516da5b240d01a35660ba6cb6 some games (Cyberpunk 2077, Forza Horizon 4/5) hang at start

2022-11-02 Thread Mikhail Gavrilov
On Tue, Nov 1, 2022 at 10:52 PM Christian König wrote: > > Let's focus on one problem at a time. > > The issue here is that somehow userptr handling became racy after we > removed the lock, but I don't see why. > > We need to fix this ASAP since it is probably a much wider problem and > the additi

Re: [RESEND PATCH] drm/amd/amdgpu: Replace kmap() with kmap_local_page()

2022-11-02 Thread Alex Deucher
On Tue, Nov 1, 2022 at 7:21 PM Fabio M. De Francesco wrote: > > On lunedì 17 ottobre 2022 18:53:24 CET Alex Deucher wrote: > > Applied. Thanks! > > > > The same report about which I just wrote in my previous email to you is also > referring to this patch which later changed status to "Not Applica

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

2022-11-02 Thread Michel Dänzer
[ Dropping Andrey's no longer working address from Cc ] On 2022-11-01 11:09, Michel Dänzer wrote: > On 2022-11-01 10:58, Zhu, Jiadong wrote: >> >>> Patch 3 assigns preempt_ib in gfx_v9_0_sw_ring_funcs_gfx, but not in >>> gfx_v9_0_ring_funcs_gfx. mux->real_ring in amdgpu_mcbp_trigger_preempt >>

Re: [PATCH v2 17/21] drm/fb-helper: Perform all fbdev I/O with the same implementation

2022-11-02 Thread Javier Martinez Canillas
On 11/2/22 11:33, Thomas Zimmermann wrote: [...] >> >>> +static ssize_t __drm_fb_helper_write(struct fb_info *info, const char >>> __user *buf, size_t count, >>> +loff_t *ppos, drm_fb_helper_write_screen >>> write_screen) >>> +{ >> >> [...] >> >>> + /* >>> +

Re: [PATCH v2 17/21] drm/fb-helper: Perform all fbdev I/O with the same implementation

2022-11-02 Thread Thomas Zimmermann
Hi Am 02.11.22 um 10:32 schrieb Javier Martinez Canillas: On 10/24/22 13:19, Thomas Zimmermann wrote: 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 st

[PATCH] drm/amd/amdgpu: skip ras late init if it is not supported

2022-11-02 Thread Kenneth Feng
skip ras late init on gc_11_0_3 if it is not supported, in order to prevent the hardware init exception. Signed-off-by: Kenneth Feng --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gp

Re: [PATCH v2 21/21] drm/fb-helper: Remove unnecessary include statements

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > 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. > > Signed-off-by: Thomas Zimmermann > --- Reviewed-by: Javier Martinez Canillas --

Re: [PATCH v2 20/21] drm/fb-helper: Move generic fbdev emulation into separate source file

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > Move the generic fbdev implementation into its own source and header > file. Adapt drivers. No functonal changes, but some of the internal > helpers have been renamed to fit into the drm_fbdev_ naming scheme. > > Signed-off-by: Thomas Zimmermann > ---

Re: [PATCH v2 19/21] drm/fb-helper: Always initialize generic fbdev emulation

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > 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

Re: [PATCH v2 18/21] drm/fb_helper: Minimize damage-helper overhead

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > 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

Re: [PATCH v2 17/21] drm/fb-helper: Perform all fbdev I/O with the same implementation

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > 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. Ha

Re: [PATCH v2 16/21] drm/fb-helper: Call fb_sync in I/O functions

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > 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 imple

Re: [PATCH v2 15/21] drm/fb-helper: Disconnect damage worker from update logic

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > 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_h

Re: [PATCH v2] [next] drm/radeon: Replace one-element array with flexible-array member

2022-11-02 Thread Kees Cook
On Tue, Nov 01, 2022 at 06:09:16PM -0400, Alex Deucher wrote: > On Tue, Nov 1, 2022 at 5:54 PM Kees Cook wrote: > > Does the ROM always only have a single byte there? This seems unlikely > > given the member "ucFakeEDIDLength" (and the code below). > > I'm not sure. I'm mostly concerned about th

Re: [PATCH] drm/radeon: Replace kmap() with kmap_local_page()

2022-11-02 Thread Kees Cook
On Wed, Nov 02, 2022 at 12:11:53AM +0100, Fabio M. De Francesco wrote: > On lunedì 17 ottobre 2022 18:52:10 CET Alex Deucher wrote: > > Applied. Thanks! > > Many thanks to you! > > However, about a week ago, I received a report saying that this patch is "Not > Applicable". > > That email was

Re: [RESEND PATCH] drm/amd/amdgpu: Replace kmap() with kmap_local_page()

2022-11-02 Thread Fabio M. De Francesco
On lunedì 17 ottobre 2022 18:53:24 CET Alex Deucher wrote: > Applied. Thanks! > The same report about which I just wrote in my previous email to you is also referring to this patch which later changed status to "Not Applicable". It points to https://patchwork.linuxtv.org/project/linux-media/pa

Re: [PATCH] drm/radeon: Replace kmap() with kmap_local_page()

2022-11-02 Thread Fabio M. De Francesco
On lunedì 17 ottobre 2022 18:52:10 CET Alex Deucher wrote: > Applied. Thanks! Many thanks to you! However, about a week ago, I received a report saying that this patch is "Not Applicable". That email was also referring to another patch, for which I'll reply in its own thread. That report ha