[PATCH] drm/amd/pm: Enable bad memory page/channel recording support for smu v13_0_0

2022-11-18 Thread Candice Li
Send message to SMU to update bad memory page and bad channel info. Signed-off-by: Candice Li Reviewed-by: Evan Quan --- .../pm/swsmu/inc/pmfw_if/smu_v13_0_0_ppsmc.h | 8 +++- drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 4 +- .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 39 +++

[PATCH AUTOSEL 5.15 24/27] Revert "drm/amdgpu: Revert "drm/amdgpu: getting fan speed pwm for vega10 properly""

2022-11-18 Thread Sasha Levin
From: Asher Song [ Upstream commit 30b8e7b8ee3be003e0df85c857c5cd0e0bd58b82 ] This reverts commit 4545ae2ed3f2f7c3f615a53399c9c8460ee5bca7. The origin patch "drm/amdgpu: getting fan speed pwm for vega10 properly" works fine. Test failure is caused by test case self. Signed-off-by: Asher Song

[PATCH AUTOSEL 6.0 40/44] drm/amd/display: only fill dirty rectangles when PSR is enabled

2022-11-18 Thread Sasha Levin
From: Hamza Mahfooz [ Upstream commit 675d84621a24490e1de3d59a4992a17fa9ff92b5 ] Currently, we are calling fill_dc_dirty_rects() even if PSR isn't supported by the relevant link in amdgpu_dm_commit_planes(), this is undesirable especially because when drm.debug is enabled we are printing message

[PATCH AUTOSEL 6.0 39/44] drm/amdgpu: Drop eviction lock when allocating PT BO

2022-11-18 Thread Sasha Levin
From: Philip Yang [ Upstream commit e034a0d9aaee5c9129d5dfdfdfcab988a953412d ] 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 f

[PATCH AUTOSEL 6.0 38/44] drm/amdgpu: Unlock bo_list_mutex after error handling

2022-11-18 Thread Sasha Levin
From: Philip Yang [ Upstream commit 64f65135c41a75f933d3bca236417ad8e9eb75de ] 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 gen

[PATCH AUTOSEL 6.0 37/44] Revert "drm/amdgpu: Revert "drm/amdgpu: getting fan speed pwm for vega10 properly""

2022-11-18 Thread Sasha Levin
From: Asher Song [ Upstream commit 30b8e7b8ee3be003e0df85c857c5cd0e0bd58b82 ] This reverts commit 4545ae2ed3f2f7c3f615a53399c9c8460ee5bca7. The origin patch "drm/amdgpu: getting fan speed pwm for vega10 properly" works fine. Test failure is caused by test case self. Signed-off-by: Asher Song

[PATCH AUTOSEL 6.0 36/44] drm/amd/display: Fix gpio port mapping issue

2022-11-18 Thread Sasha Levin
From: Steve Su [ Upstream commit c0b2753f5db281b07013899c79b5f06a614055f9 ] [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 Tested-by: Daniel W

[PATCH AUTOSEL 6.0 35/44] drm/amd/display: Fix FCLK deviation and tool compile issues

2022-11-18 Thread Sasha Levin
From: Chaitanya Dhere [ Upstream commit 0d5c5c210a4d4e655feb93b379647f0b179cdafe ] [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 erronousl

[PATCH AUTOSEL 6.0 34/44] drm/amd/display: Zeromem mypipe heap struct before using it

2022-11-18 Thread Sasha Levin
From: Aurabindo Pillai [ Upstream commit ab4b35008db9b7ae747679250e5c26d7c3a90cea ] [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

[PATCH AUTOSEL 6.0 27/44] drm/amdgpu: Fix the lpfn checking condition in drm buddy

2022-11-18 Thread Sasha Levin
From: Ma Jun [ Upstream commit e0b26b9482461e9528552f54fa662c2269f75b3f ] Because the value of man->size is changed during suspend/resume process, use mgr->mm.size instead of man->size here for lpfn checking. Signed-off-by: Ma Jun Suggested-by: Christian König Link: https://patchwork.freedes

Re: [PATCH 22/22] SWDEV-1 - dc: 3.2.213

2022-11-18 Thread Chang, Brian
[AMD Official Use Only - General] Ok Get Outlook for Android From: Alex Deucher Sent: Saturday, November 19, 2022 4:12:38 AM To: Chang, Brian Cc: amd-gfx@lists.freedesktop.org ; Wang, Chao-kai (Stylon) ; Cyr, Aric ; Li, Sun peng (Leo) ;

[PATCH 3/6] drm/amdkfd: Improve amdgpu_vm_handle_moved

2022-11-18 Thread Felix Kuehling
Let amdgpu_vm_handle_moved update all BO VA mappings of BOs reserved by the caller. This will be useful for handling extra BO VA mappings in KFD VMs that are managed through the render node API. Signed-off-by: Felix Kuehling Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.

[PATCH 4/6] drm/amdgpu: Attach eviction fence on alloc

2022-11-18 Thread Felix Kuehling
Instead of attaching the eviction fence when a KFD BO is first mapped, attach it when it is allocated or imported. This in preparation to allow KFD BOs to be mapped using the render node API. Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 63 ++-

[PATCH 6/6] drm/amdgpu: Do bo_va ref counting for KFD BOs

2022-11-18 Thread Felix Kuehling
This is needed to correctly handle BOs imported into the GEM API, which would otherwise get added twice to the same VM. Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 28 +++ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 2/6] drm/amdkfd: Implement DMA buf fd export from KFD

2022-11-18 Thread Felix Kuehling
Exports a DMA buf fd of a given KFD buffer handle. This is intended for being able to import KFD BOs into GEM contexts to leverage the amdgpu_bo_va API for more flexible virtual address mappings. It will also be used for the new upstreamable RDMA solution coming to UCX and RCCL. The corresponding

[PATCH 5/6] drm/amdgpu: update mappings not managed by KFD

2022-11-18 Thread Felix Kuehling
When restoring after an eviction, use amdgpu_vm_handle_moved to update BO VA mappings in KFD VMs that are not managed through the KFD API. This should allow using the render node API to create more flexible memory mappings in KFD VMs. v2: Sync with pd fence after all page table updates v3: Update

[PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2022-11-18 Thread Felix Kuehling
Use proper amdgpu_gem_prime_import function to handle all kinds of imports. Remember the dmabuf reference to enable proper multi-GPU attachment to multiple VMs without erroneously re-exporting the underlying BO multiple times. Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdgpu/amdgpu_amdkf

[PATCH 0/6] Enable KFD to use render node BO mappings

2022-11-18 Thread Felix Kuehling
This patch series enables KFD to interoperate more closely with DRM render nodes. ROCm user mode already uses DRM render nodes to create its GPU VM contexts and to CPU-map its GEM buffer objects. This patch series adds an API to let KFD export its BOs as DMABufs, so they can be imported into the DR

[PATCH v2] drm/amd/display: add FB_DAMAGE_CLIPS support

2022-11-18 Thread Hamza Mahfooz
Currently, userspace doesn't have a way to communicate selective updates to displays. So, enable support for FB_DAMAGE_CLIPS for DCN ASICs newer than DCN301, convert DRM damage clips to dc dirty rectangles and fill them into dirty_rects in fill_dc_dirty_rects(). Signed-off-by: Hamza Mahfooz --- v

Re: [PATCH] drm/amd/dc/dce120: Fix audio register mapping, stop triggering KASAN

2022-11-18 Thread Harry Wentland
On 11/18/22 15:25, Alex Deucher wrote: > On Thu, Nov 17, 2022 at 4:40 PM Alex Deucher wrote: >> >> On Mon, Nov 14, 2022 at 5:21 PM Lyude Paul wrote: >>> >>> There's been a very long running bug that seems to have been neglected for >>> a while, where amdgpu consistently triggers a KASAN error

Re: [PATCH] drm/amd/dc/dce120: Fix audio register mapping, stop triggering KASAN

2022-11-18 Thread Alex Deucher
On Thu, Nov 17, 2022 at 4:40 PM Alex Deucher wrote: > > On Mon, Nov 14, 2022 at 5:21 PM Lyude Paul wrote: > > > > There's been a very long running bug that seems to have been neglected for > > a while, where amdgpu consistently triggers a KASAN error at start: > > > > BUG: KASAN: global-out-of-

Re: [PATCH] drm/amdgpu: fix pci device refcount leak

2022-11-18 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Nov 17, 2022 at 8:55 PM Quan, Evan wrote: > > [AMD Official Use Only - General] > > Reviewed-by: Evan Quan > > > -Original Message- > > From: Yang Yingliang > > Sent: Thursday, November 17, 2022 11:00 PM > > To: amd-gfx@lists.freedesktop.org > > Cc: Deuch

Re: [PATCH 22/22] SWDEV-1 - dc: 3.2.213

2022-11-18 Thread Alex Deucher
Please fix the subject. E.g., drm/amd/display: dc: 3.2.213 or something like that. On Fri, Nov 18, 2022 at 12:02 PM brichang wrote: > > From: Aric Cyr > > Signed-off-by: Aric Cyr > > This version brings along following fixes: > -Add configuration 2 for ABM 2.3/2.4. > -Add margin for HUBP for S

Re: [PATCH] drm/amdgpu/dm/mst: Fix uninitialized var in pre_compute_mst_dsc_configs_for_state()

2022-11-18 Thread Alex Deucher
Applied. Thanks! Alex On Fri, Nov 18, 2022 at 3:03 PM Harry Wentland wrote: > > On 11/18/22 14:54, Lyude Paul wrote: > > Coverity noticed this one, so let's fix it. > > > > Signed-off-by: Lyude Paul > > Reviewed-by: Harry Wentland > > Harry > > > --- > > drivers/gpu/drm/amd/display/amdgpu_dm

Re: [PATCH v2 1/4] drm/amdgpu/mst: Stop ignoring error codes and deadlocking

2022-11-18 Thread Alex Deucher
On Fri, Nov 18, 2022 at 2:53 PM Lyude Paul wrote: > > JFYI - I'm not sure of the correct commit ID to add for the Fixes: tag since > it's in your branch, so I'll omit that and let you add it into the patch Yeah, I'll add that. Many thanks! Alex > > On Fri, 2022-11-18 at 14:47 -0500, Lyude Paul

Re: [PATCH] drm/amdgpu/dm/mst: Fix uninitialized var in pre_compute_mst_dsc_configs_for_state()

2022-11-18 Thread Harry Wentland
On 11/18/22 14:54, Lyude Paul wrote: > Coverity noticed this one, so let's fix it. > > Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/dri

Re: [v3] drm/amdgpu/mst: Stop ignoring error codes and deadlocking

2022-11-18 Thread Lyude Paul
On Fri, 2022-11-18 at 13:54 -0600, Limonciello, Mario wrote: > On 11/18/2022 13:25, Lyude Paul wrote: > > It appears that amdgpu makes the mistake of completely ignoring the return > > values from the DP MST helpers, and instead just returns a simple > > true/false. In this case, it seems to have c

Re: [v3] drm/amdgpu/mst: Stop ignoring error codes and deadlocking

2022-11-18 Thread Limonciello, Mario
On 11/18/2022 13:25, Lyude Paul wrote: It appears that amdgpu makes the mistake of completely ignoring the return values from the DP MST helpers, and instead just returns a simple true/false. In this case, it seems to have come back to bite us because as a result of simply returning false from co

[PATCH] drm/amdgpu/dm/mst: Fix uninitialized var in pre_compute_mst_dsc_configs_for_state()

2022-11-18 Thread Lyude Paul
Coverity noticed this one, so let's fix it. Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amd

Re: [PATCH v2 1/4] drm/amdgpu/mst: Stop ignoring error codes and deadlocking

2022-11-18 Thread Lyude Paul
JFYI - I'm not sure of the correct commit ID to add for the Fixes: tag since it's in your branch, so I'll omit that and let you add it into the patch On Fri, 2022-11-18 at 14:47 -0500, Lyude Paul wrote: > of course, will do in just a moment > > On Fri, 2022-11-18 at 14:46 -0500, Alex Deucher wrot

Re: [PATCH v2 1/4] drm/amdgpu/mst: Stop ignoring error codes and deadlocking

2022-11-18 Thread Lyude Paul
of course, will do in just a moment On Fri, 2022-11-18 at 14:46 -0500, Alex Deucher wrote: > I've already picked this up. Can you send a follow up patch with just > the coverity fix? > > Alex > > On Fri, Nov 18, 2022 at 2:17 PM Lyude Paul wrote: > > > > JFYI, Coverity pointed out one more iss

Re: [PATCH v2 1/4] drm/amdgpu/mst: Stop ignoring error codes and deadlocking

2022-11-18 Thread Alex Deucher
I've already picked this up. Can you send a follow up patch with just the coverity fix? Alex On Fri, Nov 18, 2022 at 2:17 PM Lyude Paul wrote: > > JFYI, Coverity pointed out one more issue with this series so I'm going to > send out a respin real quick to fix it. It's just a missing variable >

[PATCH v3] drm/amdgpu/mst: Stop ignoring error codes and deadlocking

2022-11-18 Thread Lyude Paul
It appears that amdgpu makes the mistake of completely ignoring the return values from the DP MST helpers, and instead just returns a simple true/false. In this case, it seems to have come back to bite us because as a result of simply returning false from compute_mst_dsc_configs_for_state(), amdgpu

Re: [PATCH v2 1/4] drm/amdgpu/mst: Stop ignoring error codes and deadlocking

2022-11-18 Thread Lyude Paul
JFYI, Coverity pointed out one more issue with this series so I'm going to send out a respin real quick to fix it. It's just a missing variable assignment (we leave ret unassigned by mistake in pre_compute_mst_dsc_configs()) so I will carry over your r-b on it. On Wed, 2022-11-16 at 04:39 +, L

Re: [PATCH 3/3] drm/amdgpu: WARN when freeing kernel memory during suspend

2022-11-18 Thread Alex Deucher
On Wed, Nov 16, 2022 at 11:01 AM Christian König wrote: > > When buffers are freed during suspend there is no guarantee that > they can be re-allocated during resume. > > The PSP subsystem seems to be quite buggy regarding this, so add > a WARN_ON() to point out those bugs. > > Signed-off-by: Chri

Coverity: pre_compute_mst_dsc_configs_for_state(): Uninitialized variables

2022-11-18 Thread coverity-bot
Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20221118 as part of the linux-next scan project: https://scan.coverity.com/projects/linux-next-weekly-scan You're getting this email because you were associated with the identified lin

[pull] amdgpu, amdkfd, radeon drm-next-6.2

2022-11-18 Thread Alex Deucher
Hi Dave, Daniel, More new stuff for 6.2. This includes last week's PR, plus the fix for ARM32, plus a few new things. The following changes since commit a143bc517bf31c4575191efbaac216a11ec016e0: Merge branch '00.06-gr-ampere' of https://gitlab.freedesktop.org/skeggsb/nouveau into drm-next (2

[PATCH 22/22] SWDEV-1 - dc: 3.2.213

2022-11-18 Thread brichang
From: Aric Cyr Signed-off-by: Aric Cyr This version brings along following fixes: -Add configuration 2 for ABM 2.3/2.4. -Add margin for HUBP for SubVp + DRR. -Fix no display after resume from WB/CB. -Limit HW cursor size to be less than 64 x 64 bytes when the stream is >= 4K. -Lower watermarks

[PATCH 19/22] drm/amd/display: Use new num clk levels struct for max mclk index

2022-11-18 Thread brichang
From: Dillon Varone [WHY?] When calculating watermark and dlg values, the max mclk level index and associated speed are needed to find the correlated dummy latency value. Currently the incorrect index is given due to a clock manager refactor. [HOW?] Use num_memclk_level from num_entries_per_clk

[PATCH 20/22] drm/amd/display: Revert check for phantom BPP

2022-11-18 Thread brichang
From: Alvin Lee [Description] Revert change since enabling SubVP on 8K60 single cable results in corruption Reviewed-by: Nevenko Stupar Reviewed-by: Martin Leung Acked-by: Brian Chang Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 +- 1 file

[PATCH 21/22] drm/amd/display: Fix rotated cursor offset calculation

2022-11-18 Thread brichang
From: David Galiffi [Why] Underflow is observed when cursor is still enabled when the cursor rectangle is outside the bounds of it's surface viewport. [How] Update parameters used to determine when cursor should be disabled. Reviewed-by: Martin Leung Acked-by: Brian Chang Signed-off-by: David

[PATCH 18/22] drm/amd/display: Avoid setting pixel rate divider to N/A

2022-11-18 Thread brichang
From: Taimur Hassan [Why] Pixel rate divider values should never be set to N/A (0xF) as the K1/K2 field is only 1/2 bits wide. [How] Set valid divider values for virtual and FRL/DP2 cases. Reviewed-by: Nicholas Kazlauskas Acked-by: Brian Chang Signed-off-by: Taimur Hassan --- drivers/gpu/dr

[PATCH 15/22] drm/amd/display: Add debug options for increasing phantom lines

2022-11-18 Thread brichang
From: Alvin Lee [Description] - Add debug option for increasing number of phantom lines Reviewed-by: Nevenko Stupar Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn32/dc

[PATCH 14/22] drm/amd/display: No display after resume from WB/CB[modify]

2022-11-18 Thread brichang
From: Tsung-hua Lin [why] First MST sideband message returns AUX_RET_ERROR_HPD_DISCON on certain intel platform. Aux transaction considered failure if HPD unexpected pulled low. The actual aux transaction success in such case, hence do not return error. [how] Not returning error when AUX_RET_ERR

[PATCH 17/22] drm/amd/display: Fix display corruption w/ VSR enable

2022-11-18 Thread brichang
From: Ilya Bakoulin [Why] Brief corruption is observed on hotplug/unplug with certain display configurations when VSR is enabled. [How] Work around the issue by avoiding 2to1 ODM when stream plane_count is 0. Reviewed-by: Dillon Varone Acked-by: Brian Chang Signed-off-by: Ilya Bakoulin ---

[PATCH 11/22] drm/amd/display: Use viewport height for subvp mall allocation size

2022-11-18 Thread brichang
From: Dillon Varone [WHY?] MALL allocation size depends on the viewport height, not the addressable vertical lines, which will not match when scaling. [HOW?] Base MALL allocation size calculations off viewport height. Reviewed-by: Alvin Lee Reviewed-by: Martin Leung Acked-by: Brian Chang Sig

[PATCH 16/22] drm/amd/display: Retain phantom plane/stream if validation fails

2022-11-18 Thread brichang
From: Alvin Lee [Description] - If we fail validation, we should retain the phantom stream/planes - Full updates assume that phantom pipes will be fully removed, but if validation fails we keep the phantom pipes - Therefore we have to retain the plane/stream if validation fails (since the

[PATCH 10/22] drm/amd/display: Check if PSR enabled when entering MALL

2022-11-18 Thread brichang
From: Alvin Lee [Description] - When attempting to enter MALL SS when a PSR panel is connected, we have to check that the PSR panel has already entered PSR because the vsync interrupt call is per display index (can be called for the non-PSR panel first) - Also don't override link settings

[PATCH 13/22] drm/amd/display: Phase 1 Add Bw Allocation source and header files

2022-11-18 Thread brichang
From: Mustapha Ghaddar [WHY] To implement BW Allocation as per USB4 spec chapter 10.7 [HOW] Implement the DP-Tx portion of the logic to interact with DPIA Reviewed-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Mustapha Ghaddar --- drivers/gpu/drm/amd/display/dc/

[PATCH 12/22] drm/amd/display: Add YCBCR2020 coefficients to CSC matrix

2022-11-18 Thread brichang
From: Rodrigo Siqueira When some of the IGT tests are executed in DCN31, it is possible to see multiple occurrences of this warning: WARNING: CPU: 9 PID: 3482 at drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dcn30/dcn30_dpp.c:154 dpp3_program_post_csc+0x196/0x220 [amdgpu] [..] PU: 9 PID: 3482 Co

[PATCH 09/22] drm/amd/display: Add check for DET fetch latency hiding for dcn32

2022-11-18 Thread brichang
From: Dillon Varone [WHY?] Some configurations are constructed with very marginal DET buffers relative to the worst possible time required to fetch a swath. [HOW?] Add a check to see that the DET buffer allocated for each pipe can hide the latency for all pipes to fetch at least one swath. Revi

[PATCH 07/22] drm/amd/display: Update soc bounding box for dcn32/dcn321

2022-11-18 Thread brichang
From: Dillon Varone [Description] New values for soc bounding box and dummy pstate. Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Dillon Varone --- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 8 --

[PATCH 08/22] drm/amd/display: Use dummy pstate latency for subvp when needed on dcn32

2022-11-18 Thread brichang
From: Dillon Varone [WHY?] Prefetch is not budgetting time for dummy pstate when using subvp and low uclk. [HOW?] Override fclk change latency to use dummy pstate latency when calculating prefetch schedule for subvp configs with low uclk. Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-

[PATCH 05/22] drm/amd/display: Update Z8 watermarks for DCN314

2022-11-18 Thread brichang
From: Nicholas Kazlauskas [Why & How] Update from HW, need to lower watermarks for enter/enter+exit latency. Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 d

[PATCH 06/22] drm/amd/display: Add Z8 allow states to z-state support list

2022-11-18 Thread brichang
From: Nicholas Kazlauskas [Why] Even if we block Z9 based on crossover threshold it's possible to allow for Z8. [How] There's support for this on DCN314, so update the support types to include a z8 only and z8_z10 only state. Update the decide_zstate_support function to allow for specifying the

[PATCH 04/22] drm/amd/display: Limit HW cursor size of >= 4k

2022-11-18 Thread brichang
From: Alvin Lee [Description] - For SubVP, we cannot support HW cursor if it's greater than 64 x 64 x 4 bytes in size - However, on certain config changes (i.e. pixel format) we can exit SubVP (then change to HW cursor) then re-enter SubVP without changing back to SW cursor because there is

[PATCH 03/22] drm/amd/display: No display after resume from WB/CB

2022-11-18 Thread brichang
From: Tsung-hua Lin [why] First MST sideband message returns AUX_RET_ERROR_HPD_DISCON on certain intel platform. Aux transaction considered failure if HPD unexpected pulled low. The actual aux transaction success in such case, hence do not return error. [how] Not returning error when AUX_RET_ERR

[PATCH 02/22] drm/amd/display: Add margin on DRR vblank start for subvp

2022-11-18 Thread brichang
From: "Lee, Alvin" [Description] - Add margin for HUBP "jitter" for SubVp + DRR case - Also do a min transition even if MPO is added on a non SubVP pipe (i.e. added on DRR pipe for SubVP + DRR) Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/disp

[PATCH 00/22] DC Patches November 19, 2022

2022-11-18 Thread brichang
This DC patchset brings improvements in multiple areas. In summary, we highlight: *Add configuration 2 for ABM 2.3/2.4. *Add margin for HUBP for SubVp + DRR. *Fix no display after resume from WB/CB. *Limit HW cursor size to be less than 64 x 64 bytes when the stream is >= 4K. *Lower watermarks fo

[PATCH 01/22] drm/amd/display: new ABM config 2

2022-11-18 Thread brichang
From: Camille Cho [Why & How] Add configuration 2 for ABM 2.3/2.4 to suit customer preferences, which is to lower the brightness curves in 80%-100% range compared to the existing default config 0. Reviewed-by: Josip Pavic Acked-by: Brian Chang Signed-off-by: Camille Cho --- .../gpu/drm/amd/d

Re: [PATCH] drm/amdgpu: handle gang submit before VMID

2022-11-18 Thread Christian König
Pushed to drm-misc-fixes, should be picked up for the next rc. Let me know if you run into any more problems with that. Thanks, Christian. Am 18.11.22 um 16:36 schrieb Timur Kristóf: Can you guys please push this into the next 6.1 RC? This solves a significant issue with gang submit. On Fri,

Re: [PATCH] drm/amdgpu/psp: don't free PSP buffers on suspend

2022-11-18 Thread Christian König
Am 16.11.22 um 17:40 schrieb Alex Deucher: We can reuse the same buffers on resume. Signed-off-by: Alex Deucher Reviewed-by: Christian König But I would like to ad the WARN_ON() to not free anything during suspend on newer kernels as well. --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c |

Re: [PATCH] drm/amdgpu: handle gang submit before VMID

2022-11-18 Thread Timur Kristóf
Can you guys please push this into the next 6.1 RC? This solves a significant issue with gang submit. On Fri, 2022-11-18 at 16:30 +0100, Christian König wrote: > Otherwise it can happen that not all gang members can get a VMID > assigned and we deadlock. > > Signed-off-by: Christian König > Test

Re: [PATCH] drm/amdgpu/psp: don't free PSP buffers on suspend

2022-11-18 Thread Alex Deucher
On Wed, Nov 16, 2022 at 11:40 AM Alex Deucher wrote: > > We can reuse the same buffers on resume. > > Signed-off-by: Alex Deucher Anyone want to give me an RB or AB? Thanks, Alex > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 56 + > 1 file changed, 29 insertions(+

Re: [PATCH] drm/amdgpu: handle gang submit before VMID

2022-11-18 Thread Alex Deucher
On Fri, Nov 18, 2022 at 10:30 AM Christian König wrote: > > Otherwise it can happen that not all gang members can get a VMID > assigned and we deadlock. > > Signed-off-by: Christian König > Tested-by: Timur Kristóf > Acked-by: Timur Kristóf > Fixes: 68ce8b242242 ("drm/amdgpu: add gang submit ba

[PATCH] drm/amdgpu: handle gang submit before VMID

2022-11-18 Thread Christian König
Otherwise it can happen that not all gang members can get a VMID assigned and we deadlock. Signed-off-by: Christian König Tested-by: Timur Kristóf Acked-by: Timur Kristóf Fixes: 68ce8b242242 ("drm/amdgpu: add gang submit backend v2") --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 6 +++--- 1 fi

Re: [PATCH] drm/amd/display: add FB_DAMAGE_CLIPS support

2022-11-18 Thread Hamza Mahfooz
Hey Leo, On 11/17/22 12:31, Leo Li wrote: On 11/15/22 15:24, Hamza Mahfooz wrote: Currently, userspace doesn't have a way to communicate selective updates to displays. So, enable support for FB_DAMAGE_CLIPS for DCN ASICs newer than DCN301, convert DRM damage clips to dc dirty rectangles and f

Re: [PATCH] drm/amdgpu: update documentation of parameter amdgpu_gtt_size

2022-11-18 Thread Christian König
Reviewed-by: Christian König Am 18.11.22 um 15:52 schrieb Deucher, Alexander: [Public] Reviewed-by: Alex Deucher *From:* Yin, ZhenGuo (Chris) *Sent:* Friday, November 18, 2022 3:49 AM *To:* amd-gfx@lists.freedesktop.o

Re: [PATCH] drm/amdgpu: update documentation of parameter amdgpu_gtt_size

2022-11-18 Thread Deucher, Alexander
[Public] Reviewed-by: Alex Deucher From: Yin, ZhenGuo (Chris) Sent: Friday, November 18, 2022 3:49 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Chen, Jingwen ; Yin, ZhenGuo (Chris) Subject: [PATCH] drm/amdgpu: update documentation of parameter

Re: [PATCH v2] amdgpu: nbio_v7_4: Add pointer check

2022-11-18 Thread Alex Deucher
On Fri, Nov 18, 2022 at 9:11 AM Denis Arefev wrote: > > Return value of a function 'amdgpu_ras_find_obj' is dereferenced > at nbio_v7_4.c:325 without checking for null > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Denis Arefev > --- > drivers/gpu/drm/am

Re: [PATCH] drm/amdgpu: add mb for si

2022-11-18 Thread 李真能
在 2022/11/18 17:18, Michel Dänzer 写道: On 11/18/22 09:01, Christian König wrote: Am 18.11.22 um 08:48 schrieb Zhenneng Li: During reboot test on arm64 platform, it may failure on boot, so add this mb in smc. The error message are as follows: [    6.996395][ 7] [  T295] [drm:amdgpu_device_ip_l

[PATCH v2] amdgpu: nbio_v7_4: Add pointer check

2022-11-18 Thread Denis Arefev
Return value of a function 'amdgpu_ras_find_obj' is dereferenced at nbio_v7_4.c:325 without checking for null Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 3 +++ 1 file changed, 3 insertions(+) diff

Re: [PATCH] drm/amdgpu: fix stall on CPU when allocate large system memory

2022-11-18 Thread James Zhu
On 2022-11-17 17:03, Felix Kuehling wrote: Am 2022-11-17 um 16:38 schrieb James Zhu: When applications try to allocate large system (more than > 128GB), "stall cpu" is reported. for such large system memory, walk_page_range takes more than 20s usually. The warning message can be removed whe

[PATCH] drm/amdgpu: fix for suspend/resume kiq fence fallback under sriov

2022-11-18 Thread Shikang Fan
- in device_resume, sriov configure interrupt should be in full access, so release_full_gpu should be done after kfd_resume. - remove the previous workaround solution for sriov. Signed-off-by: Shikang Fan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 +++--- 1 file change

Re: [PATCH] drm/amdgpu: add mb for si

2022-11-18 Thread Michel Dänzer
On 11/18/22 09:01, Christian König wrote: > Am 18.11.22 um 08:48 schrieb Zhenneng Li: >> During reboot test on arm64 platform, it may failure on boot, >> so add this mb in smc. >> >> The error message are as follows: >> [    6.996395][ 7] [  T295] [drm:amdgpu_device_ip_late_init [amdgpu]] *ERROR* >

[PATCH] drm/amdgpu: add mb for si

2022-11-18 Thread Zhenneng Li
During reboot test on arm64 platform, it may failure on boot, so add this mb in smc. The error message are as follows: [6.996395][ 7] [ T295] [drm:amdgpu_device_ip_late_init [amdgpu]] *ERROR* late_init of IP block failed -22 [7.006919][ 7] [ T295] amdgpu

[PATCH] drm/amdgpu: update documentation of parameter amdgpu_gtt_size

2022-11-18 Thread ZhenGuo Yin
Fixes: f7ba887f606b ("drm/amdgpu: Adjust logic around GTT size (v3)") Signed-off-by: ZhenGuo Yin --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c ind

Re: [PATCH] drm/amdgpu: add mb for si

2022-11-18 Thread Christian König
Am 18.11.22 um 08:48 schrieb Zhenneng Li: During reboot test on arm64 platform, it may failure on boot, so add this mb in smc. The error message are as follows: [6.996395][ 7] [ T295] [drm:amdgpu_device_ip_late_init [amdgpu]] *ERROR* late_init of IP block failed