RE: [PATCH] drm/amd/amdgpu: reserve vm invalidation engine for firmware

2022-11-17 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Jack Xiao Sent: Thursday, November 17, 2022 17:11 To: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Zhang, Hawking ; Koenig, Christian ; Pan, Xinhui ;

RE: [PATCH] drm/amd/amdgpu: reserve vm invalidation engine for firmware

2022-11-17 Thread Zhang, Hawking
[AMD Official Use Only - General] This is fixed and requested by firmware team Regards, Hawking -Original Message- From: Koenig, Christian Sent: Thursday, November 17, 2022 18:26 To: Xiao, Jack ; amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Zhang, Hawking ; Pan, Xinhui ;

[PATCH] drm/amdgpu: add drv_vram_usage_va for virt data exchange

2022-11-17 Thread Tong Liu01
For vram_usagebyfirmware_v2_2, fw_vram_reserve is not used. So fw_vram_usage_va is NULL, and cannot do virt data exchange anymore. Should add drv_vram_usage_va to do virt data exchange in vram_usagebyfirmware_v2_2 case. And refine some code style checks in pre add vram reservation logic patch

RE: [PATCH] drm/amd/display: fix compilation issue with legacy gcc

2022-11-17 Thread Chen, Guchun
Reviewed-by: Guchun Chen Regards, Guchun -Original Message- From: bobzhou Sent: Friday, November 18, 2022 9:06 AM To: amd-gfx@lists.freedesktop.org Cc: Chen, Guchun ; Zhou, Bob Subject: [PATCH] drm/amd/display: fix compilation issue with legacy gcc From: Bob zhou This patch is

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

2022-11-17 Thread Quan, Evan
[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: Deucher, Alexander ; Quan, Evan > ; yangyingli...@huawei.com > Subject: [PATCH] drm/amdgpu: fix

[PATCH] drm/amd/display: fix compilation issue with legacy gcc

2022-11-17 Thread bobzhou
From: Bob zhou This patch is used to fix following compilation issue with legacy gcc error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = flag_vlevel; i < context->bw_ctx.dml.soc.num_states; i++) { Signed-off-by: Bob zhou ---

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

2022-11-17 Thread Felix Kuehling
Am 2022-11-17 um 17:30 schrieb Chen, Xiaogang: [AMD Official Use Only - General] This patch is: Reviewed-by: Xiaogang Chen Thanks, I'll need to rebase this on Christian's latest userptr patch. I'll send out an updated patch later. Regards,   Felix -Original Message- From:

Re: [PATCH -next] drm/amd/display: fix kernel-doc issues in dc.h

2022-11-17 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Nov 17, 2022 at 2:39 PM Harry Wentland wrote: > > > > On 11/17/22 12:20, Randy Dunlap wrote: > > Fix these kernel-doc complaints: > > > > drivers/gpu/drm/amd/display/dc/dc.h:505: warning: cannot understand > > function prototype: 'struct dc_clocks ' > > dc.h:472:

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

2022-11-17 Thread Chen, Xiaogang
[AMD Official Use Only - General] This patch is: Reviewed-by: Xiaogang Chen -Original Message- From: amd-gfx On Behalf Of Felix Kuehling Sent: Wednesday, November 2, 2022 9:00 PM To: amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: Add notifier lock for KFD userptrs Caution:

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

2022-11-17 Thread Felix Kuehling
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 when splitting hmm range into smaller ones which

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

2022-11-17 Thread Alex Deucher
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-bounds in read_indirect_azalia_reg+0x1d4/0x2a0 > [amdgpu] >

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

2022-11-17 Thread 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 when splitting hmm range into smaller ones which is not more 64GB for each walk_page_range. [

Re: [PATCH -next] drm/amd/display: fix kernel-doc issues in dc.h

2022-11-17 Thread Harry Wentland
On 11/17/22 12:20, Randy Dunlap wrote: > Fix these kernel-doc complaints: > > drivers/gpu/drm/amd/display/dc/dc.h:505: warning: cannot understand function > prototype: 'struct dc_clocks ' > dc.h:472: warning: Enum value 'MPC_SPLIT_AVOID' not described in enum > 'pipe_split_policy' >

Re: [PATCH] drm/amdkfd: Release the topology_lock in error case

2022-11-17 Thread Felix Kuehling
Looks good. Feel free to send the revised patch to amd-gfx. I'll review it. Thanks,   Felix Am 2022-11-17 um 02:33 schrieb Ma, Jun: Hi Felix, I just tested your patch. It works fine on my test set with the following little fix. Regards, Ma Jun diff --git

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

2022-11-17 Thread Leo Li
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 fill them into dirty_rects in

[PATCH -next] drm/amd/display: fix kernel-doc issues in dc.h

2022-11-17 Thread Randy Dunlap
Fix these kernel-doc complaints: drivers/gpu/drm/amd/display/dc/dc.h:505: warning: cannot understand function prototype: 'struct dc_clocks ' dc.h:472: warning: Enum value 'MPC_SPLIT_AVOID' not described in enum 'pipe_split_policy' dc.h:472: warning: Enum value 'MPC_SPLIT_AVOID_MULT_DISP' not

Re: [PATCH 2/3] drm/amdgpu: stop freeing PSP buffers during suspend

2022-11-17 Thread Alex Deucher
Hey Christian, Do you have a preference on which solution we go with? I'm inclined to go with my patch just because it's more self-contained and easier to deal with for stable, but I could be convinced otherwise. Alex On Wed, Nov 16, 2022 at 11:38 AM Alex Deucher wrote: > > I was thinking

Re: [PATCH 2/3] drm/amdgpu: stop freeing PSP buffers during suspend

2022-11-17 Thread Guilherme G. Piccoli
Hi Christian, thanks for the fix! It worked fine on Steam Deck running the game Cuphead, feel free to add my: Tested-by: Guilherme G. Piccoli

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

2022-11-17 Thread Guilherme G. Piccoli
Hey Christian, very interesting idea! I've tested it alone (without patch 2) and was able to see the PSP code freeing buffers during suspend, leading to a resume failure later. Feel free to add my: Tested-by: Guilherme G. Piccoli Cheers, Guilherme

Re: [PATCH] drm/amdkfd: enable cooperative launch for gfx10.3

2022-11-17 Thread Felix Kuehling
Am 2022-10-12 um 15:07 schrieb Jonathan Kim: FW fix available to enable cooperative launch for GFX10.3. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] Revert "drm/amd/display: fix dpms_off issue when disabling bios mode"

2022-11-17 Thread Mike Lothian
On Thu, 17 Nov 2022 at 14:49, Alex Deucher wrote: > > This reverts commit 5aa663752ff6f844c6bfc97d89231e98884ae769. > > This causes a blank screen on boot on an Asus G513QY / 6800M laptop. > > Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2259 > Cc: Aric Cyr > Cc: Tom Chung > Cc:

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

2022-11-17 Thread Yang Yingliang
As comment of pci_get_domain_bus_and_slot() says, it returns a pci device with refcount increment, when finish using it, the caller must decrement the reference count by calling pci_dev_put(). So before returning from amdgpu_device_resume|suspend_display_audio(), pci_dev_put() is called to avoid

Re: [PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2022-11-17 Thread Dmitry Osipenko
On 11/17/22 18:09, Christian König wrote: > Am 17.11.22 um 15:41 schrieb Dmitry Osipenko: >> [SNIP] >>> drm_sched_entity_flush() should be called from the flush callback from >>> the file_operations structure of panfrost. See amdgpu_flush() and >>> amdgpu_ctx_mgr_entity_flush(). This makes sure

Re: [PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2022-11-17 Thread Christian König
Am 17.11.22 um 15:41 schrieb Dmitry Osipenko: [SNIP] drm_sched_entity_flush() should be called from the flush callback from the file_operations structure of panfrost. See amdgpu_flush() and amdgpu_ctx_mgr_entity_flush(). This makes sure that we wait for all entities of the process/file

[PATCH] Revert "drm/amd/display: fix dpms_off issue when disabling bios mode"

2022-11-17 Thread Alex Deucher
This reverts commit 5aa663752ff6f844c6bfc97d89231e98884ae769. This causes a blank screen on boot on an Asus G513QY / 6800M laptop. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2259 Cc: Aric Cyr Cc: Tom Chung Cc: Zhongwei Zhang Cc: Harry Wentland Signed-off-by: Alex Deucher ---

Re: [PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2022-11-17 Thread Dmitry Osipenko
On 11/17/22 16:11, Christian König wrote: > Am 17.11.22 um 14:00 schrieb Dmitry Osipenko: >> On 11/17/22 15:59, Dmitry Osipenko wrote: >>> On 11/17/22 15:55, Christian König wrote: Am 17.11.22 um 13:47 schrieb Dmitry Osipenko: > On 11/17/22 12:53, Christian König wrote: >> Am 17.11.22

Re: [PATCH 04/29] drm/amd/display: fix dpms_off issue when disabling bios mode

2022-11-17 Thread Mike Lothian
On Wed, 9 Nov 2022 at 06:15, Tom Chung wrote: > > From: Zhongwei Zhang > > [Why] > disable_vbios_mode_if_required() will set dpms_off to false > during boot when pixel clk dismatches with driver requires. > This will cause extra backlight on and off if OS call 2 > times setmode. > > [How] > Set

Re: [PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2022-11-17 Thread Dmitry Osipenko
On 11/17/22 15:59, Dmitry Osipenko wrote: > On 11/17/22 15:55, Christian König wrote: >> Am 17.11.22 um 13:47 schrieb Dmitry Osipenko: >>> On 11/17/22 12:53, Christian König wrote: Am 17.11.22 um 03:36 schrieb Dmitry Osipenko: > Hi, > > On 10/14/22 11:46, Christian König wrote:

Re: [PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2022-11-17 Thread Dmitry Osipenko
On 11/17/22 12:53, Christian König wrote: > Am 17.11.22 um 03:36 schrieb Dmitry Osipenko: >> Hi, >> >> On 10/14/22 11:46, Christian König wrote: >>> +/* Remove the entity from the scheduler and kill all pending jobs */ >>> +static void drm_sched_entity_kill(struct drm_sched_entity *entity) >>> +{

Re: [PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2022-11-17 Thread Dmitry Osipenko
On 11/17/22 15:55, Christian König wrote: > Am 17.11.22 um 13:47 schrieb Dmitry Osipenko: >> On 11/17/22 12:53, Christian König wrote: >>> Am 17.11.22 um 03:36 schrieb Dmitry Osipenko: Hi, On 10/14/22 11:46, Christian König wrote: > +/* Remove the entity from the scheduler and

Re: [PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2022-11-17 Thread Christian König
Am 17.11.22 um 14:00 schrieb Dmitry Osipenko: On 11/17/22 15:59, Dmitry Osipenko wrote: On 11/17/22 15:55, Christian König wrote: Am 17.11.22 um 13:47 schrieb Dmitry Osipenko: On 11/17/22 12:53, Christian König wrote: Am 17.11.22 um 03:36 schrieb Dmitry Osipenko: Hi, On 10/14/22 11:46,

Re: [PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2022-11-17 Thread Christian König
Am 17.11.22 um 13:47 schrieb Dmitry Osipenko: On 11/17/22 12:53, Christian König wrote: Am 17.11.22 um 03:36 schrieb Dmitry Osipenko: Hi, On 10/14/22 11:46, Christian König wrote: +/* Remove the entity from the scheduler and kill all pending jobs */ +static void drm_sched_entity_kill(struct

Re: [PATCH] drm/amd/amdgpu: reserve vm invalidation engine for firmware

2022-11-17 Thread Christian König
Am 17.11.22 um 10:11 schrieb Jack Xiao: If mes enabled, reserve VM invalidation engine 5 for firmware. Signed-off-by: Jack Xiao --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c

Re: [PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2022-11-17 Thread Christian König
Am 17.11.22 um 03:36 schrieb Dmitry Osipenko: Hi, On 10/14/22 11:46, Christian König wrote: +/* Remove the entity from the scheduler and kill all pending jobs */ +static void drm_sched_entity_kill(struct drm_sched_entity *entity) +{ + struct drm_sched_job *job; + struct dma_fence

[PATCH] drm/amd/amdgpu: reserve vm invalidation engine for firmware

2022-11-17 Thread Jack Xiao
If mes enabled, reserve VM invalidation engine 5 for firmware. Signed-off-by: Jack Xiao --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index

Re: [PATCH v3 0/6] Add support for atomic async page-flips

2022-11-17 Thread Simon Ser
Ville, any news on this?

Re: [PATCH 0/7] DYNAMIC_DEBUG fixups for rc

2022-11-17 Thread Greg KH
On Fri, Nov 11, 2022 at 03:17:08PM -0700, Jim Cromie wrote: > hi Jason, Greg, DRM-folk, > > drm.debug-on-dyndbg has a regression due to a chicken-&-egg problem; > drm.debug is applied to enable dyndbg callsites before the dependent > modules' callsites are available to be enabled. > > My "fixes"

Re: [PATCH 1/7] drm: mark drm.debug-on-dyndbg as BROKEN for now

2022-11-17 Thread Greg KH
On Fri, Nov 11, 2022 at 03:17:09PM -0700, Jim Cromie wrote: > drm.debug-on-dyndbg has a regression, due to a chicken-egg > initialization problem: > > 1- modprobe i915 >i915 needs drm.ko, which is loaded 1st > > 2- "modprobe drm drm.debug=0x1ff" (virtual/implied) >drm.debug is set

[PATCH] drm/amd/display: rewrite the check for mods

2022-11-17 Thread Jiasheng Jiang
When the *mods is NULL, it should be better to return error immediately, rather than continue with redundant operations. Signed-off-by: Jiasheng Jiang --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 2/2] drm/amd/display: Remove set but unused variable cursor_bpp

2022-11-17 Thread Jiapeng Chong
Variable cursor_bpp is not effectively used in the function, so delete it. drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c:217:10: warning: variable ‘cursor_bpp’ set but not used. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3120 Reported-by: Abaci Robot Signed-off-by:

[PATCH 1/2] drm/amd/display: Remove set but unused variable 'TPreMargin'

2022-11-17 Thread Jiapeng Chong
Variable TPreMargin is not effectively used in the function, so delete it. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:3478:10: warning: variable ‘TPreMargin’ set but not used. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3144 Reported-by: Abaci Robot