[PATCH 2/3] drm/amdgpu: Update HDP 4.4.2 clock gating flags

2023-11-30 Thread Lijo Lazar
HDP 4.4.2 clockgating is enabled by default, update the flags accordingly. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c b/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c index

[PATCH 1/3] drm/amdgpu: Add NULL checks for function pointers

2023-11-30 Thread Lijo Lazar
Check if function is implemented before making the call. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/soc15.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index

[PATCH 3/3] drm/amdgpu: Avoid querying DRM MGCG status

2023-11-30 Thread Lijo Lazar
MP0 v13.0.6 SOCs don't support DRM MGCG. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index 9043ebf1e161..15033efec2ba 100644 ---

RE: [PATCH v2 2/2] drm/amd/amdgpu: SRIOV full reset issue with VCN

2023-11-30 Thread Deng, Emily
[AMD Official Use Only - General] Series Reviewed-by: Emily Deng >-Original Message- >From: amd-gfx On Behalf Of Bokun >Zhang >Sent: Thursday, November 30, 2023 8:21 AM >To: amd-gfx@lists.freedesktop.org >Cc: Zhang, Bokun >Subject: [PATCH v2 2/2] drm/amd/amdgpu: SRIOV full reset issue

RE: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread Zeng, Oak
See inline comments > -Original Message- > From: dri-devel On Behalf Of > zhuweixi > Sent: Thursday, November 30, 2023 5:48 AM > To: Christian König ; Zeng, Oak > ; Christian König ; linux- > m...@kvack.org; linux-ker...@vger.kernel.org; a...@linux-foundation.org; > Danilo Krummrich ;

Re: [PATCH] drm/amdgpu: disable MCBP by default

2023-11-30 Thread Deucher, Alexander
[Public] Acked-by: Alex Deucher From: amd-gfx on behalf of jiadong@amd.com Sent: Thursday, November 30, 2023 7:57 PM To: amd-gfx@lists.freedesktop.org Cc: Zhu, Jiadong Subject: [PATCH] drm/amdgpu: disable MCBP by default From: Jiadong Zhu Disable

Fwd: Thinkpad X13 AMD: Problems with external monitor wake up after suspend

2023-11-30 Thread Bagas Sanjaya
Hi, I notice a regression report on Bugzilla [1]. Quoting from it: > Since kernel version 6.1.57 I have problems with external monitor wakeup > after suspend on Thinkpad X13 AMD Gen2 Notebook. > > Notebook is in docking station with closed lid. Suspend & Resume. The > external monitor gets no

RE: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread zhuweixi
From your argument on KVM I can see that the biggest miscommunication between us is that you believed that GMEM wanted to share the whole address space. No, it is not the case. GMEM is only providing coordination via certain mmap() calls. So you are raising a case supporting GMEM again --

RE: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread zhuweixi
Thanks! I am planning to present GMEM in Linux MM Alignment Sessions so I can collect more input from the mm developers. @Christian @Oak I will also send you invitations once a presentation is scheduled. :) -Weixi -Original Message- From: David Hildenbrand Sent: Thursday, November

Re: [1/8] drm/plane-helper: Move drm_plane_helper_atomic_check() into udl

2023-11-30 Thread Sui Jingfeng
Hi, On 2023/11/28 18:45, Thomas Zimmermann wrote: The udl driver is the only caller of drm_plane_helper_atomic_check(). Move the function into the driver. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_plane_helper.c | 32 --

[PATCH] drm/amdgpu: disable MCBP by default

2023-11-30 Thread jiadong.zhu
From: Jiadong Zhu Disable MCBP(mid command buffer preemption) by default as old Mesa hangs with it. We shall not enable the feature that breaks old usermode driver. Signed-off-by: Jiadong Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 1 file changed, 4 deletions(-) diff --git

Re: Radeon regression in 6.6 kernel

2023-11-30 Thread Alex Deucher
On Wed, Nov 29, 2023 at 10:47 PM Luben Tuikov wrote: > > On 2023-11-29 22:36, Luben Tuikov wrote: > > On 2023-11-29 15:49, Alex Deucher wrote: > >> On Wed, Nov 29, 2023 at 3:10 PM Alex Deucher wrote: > >>> > >>> Actually I think I see the problem. I'll try and send out a patch > >>> later today

[PATCH] drm/amd/display: Increase frame warning limit with KASAN or KCSAN in dml

2023-11-30 Thread Alex Deucher
Does the same thing as: commit 6740ec97bcdb ("drm/amd/display: Increase frame warning limit with KASAN or KCSAN in dml2") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311302107.hudxvywt-...@intel.com/ Fixes: 67e38874b85b ("drm/amd/display: Increase num

[PATCH] drm/amd: Add a DC debug mask for DML2

2023-11-30 Thread Aurabindo Pillai
[Why] To enable testing/development of DML2, expose a new debug mask for future use. Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/include/amd_shared.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/include/amd_shared.h

[pull] amdgpu, amdkfd, drm drm-fixes-6.7

2023-11-30 Thread Alex Deucher
Hi Dave, Sima, Fixes for 6.7. Mostly fixes for new IPs. Also including a revert of the unexport of the currently unused prime helpers for fd/handle conversion since amdgpu will use them in 6.8 so I see no reason to remove them only to re-add them again in 6.8. The following changes since

Re: Radeon regression in 6.6 kernel

2023-11-30 Thread Alex Deucher
On Wed, Nov 29, 2023 at 10:36 PM Luben Tuikov wrote: > > On 2023-11-29 15:49, Alex Deucher wrote: > > On Wed, Nov 29, 2023 at 3:10 PM Alex Deucher wrote: > >> > >> Actually I think I see the problem. I'll try and send out a patch > >> later today to test. > > > > Does the attached patch fix it?

Re: [PATCH] drm/amd/display: Fix NULL pointer dereference at hibernate

2023-11-30 Thread Harry Wentland
On 2023-11-28 19:35, Mario Limonciello wrote: During hibernate sequence the source context might not have a clk_mgr. So don't use it to look for DML2 support. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2980 Fixes: a2815ada8616 ("drm/amd/display: Introduce DML2") Signed-off-by: Mario

Re: [PATCH] drm/radeon: check return value of radeon_ring_lock()

2023-11-30 Thread Alex Deucher
Applied. Thanks! On Tue, Aug 8, 2023 at 2:08 PM Nikita Zhandarovich wrote: > > In the unlikely event of radeon_ring_lock() failing, its errno return > value should be processed. This patch checks said return value and > prints a debug message in case of an error. > > Found by Linux Verification

Re: [PATCH] drm/radeon/r100: Fix integer overflow issues in r100_cs_track_check()

2023-11-30 Thread Alex Deucher
Applied. Thanks! On Wed, Nov 29, 2023 at 10:28 AM Nikita Zhandarovich wrote: > > It may be possible, albeit unlikely, to encounter integer overflow > during the multiplication of several unsigned int variables, the > result being assigned to a variable 'size' of wider type. > > Prevent this

Re: [PATCH] drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()

2023-11-30 Thread Alex Deucher
Applied. Thanks! On Wed, Nov 29, 2023 at 10:28 AM Nikita Zhandarovich wrote: > > While improbable, there may be a chance of hitting integer > overflow when the result of radeon_get_ib_value() gets shifted > left. > > Avoid it by casting one of the operands to larger data type (u64). > > Found

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread David Hildenbrand
On 29.11.23 09:27, zhuweixi wrote: Glad to hear that more sharable code is desirable. IMHO, for a common MM subsystem, it is more beneficial for GMEM to extend core MM instead of building a separate one. More core-mm complexity, awesome, we all love that! ;) -- Cheers, David / dhildenb

Re: [PATCH] drm/amdgpu: add shared fdinfo stats

2023-11-30 Thread Rob Clark
On Thu, Nov 30, 2023 at 5:13 AM Christian König wrote: > > Am 28.11.23 um 18:52 schrieb Rob Clark: > > On Tue, Nov 28, 2023 at 6:28 AM Alex Deucher wrote: > >> On Tue, Nov 28, 2023 at 9:17 AM Christian König > >> wrote: > >>> Am 17.11.23 um 20:56 schrieb Alex Deucher: > Add shared stats.

Re: [PATCH] drm/amdgpu: Add a new module param to disable d3cold

2023-11-30 Thread Alex Deucher
On Thu, Nov 30, 2023 at 1:29 AM Ma, Jun wrote: > > Hi Alex, > > On 11/30/2023 12:39 AM, Alex Deucher wrote: > > On Wed, Nov 29, 2023 at 11:37 AM Ma Jun wrote: > >> > >> Some platforms can't resume from d3cold state, So add a > >> new module parameter to disable d3cold state for debugging > >>

RE: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread zhuweixi
Glad to know that there is a common demand for a new syscall like hmadvise(). I expect it would also be useful for homogeneous NUMA cases. Credits to cudaMemAdvise() API which brought this idea to GMEM's design. To answer @Oak's questions about GMEM vs. HMM, Here is the major difference:

Re: [Linaro-mm-sig] Re: [PATCH] dma-buf: Correct the documentation of name and exp_name symbols

2023-11-30 Thread Christian König
Am 29.11.23 um 22:18 schrieb Alex Deucher: On Wed, Nov 22, 2023 at 1:58 PM Christian König wrote: Am 22.11.23 um 17:05 schrieb Ramesh Errabolu: Fix the documentation of struct dma_buf members name and exp_name as to how these members are to be used and accessed. Signed-off-by: Ramesh

Re: [PATCH] drm/amdgpu: add shared fdinfo stats

2023-11-30 Thread Christian König
Am 28.11.23 um 18:52 schrieb Rob Clark: On Tue, Nov 28, 2023 at 6:28 AM Alex Deucher wrote: On Tue, Nov 28, 2023 at 9:17 AM Christian König wrote: Am 17.11.23 um 20:56 schrieb Alex Deucher: Add shared stats. Useful for seeing shared memory. Signed-off-by: Alex Deucher ---

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread Christian König
Am 30.11.23 um 08:22 schrieb zhuweixi: Add @Oak to the KFD discussion. I will reply separately elaborating your questions on GMEM's difference from HMM/MMU notifiers. Christian, thanks for pointing me to that AMDKFD discussion. I have read the discussion around the AMDKFD skeleton patch and

Re: [PATCH v5 00/32] drm/amd/display: add AMD driver-specific properties for color mgmt

2023-11-30 Thread Daniel Vetter
On Tue, 28 Nov 2023 at 23:11, Harry Wentland wrote: > > On 2023-11-16 14:57, Melissa Wen wrote: > > Hello, > > > > This series extends the current KMS color management API with AMD > > driver-specific properties to enhance the color management support on > > AMD Steam Deck. The key additions to

RE: [PATCH] drm/amdgpu: enable mca debug mode on APU by default

2023-11-30 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Wang, Yang(Kevin) Sent: Thursday, November 30, 2023 18:46 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Wang, Yang(Kevin) Subject: [PATCH] drm/amdgpu: enable mca debug mode

Re: [PATCH] drm/amdgpu: Add a new module param to disable d3cold

2023-11-30 Thread Lazar, Lijo
On 11/30/2023 4:17 PM, Ma, Jun wrote: Hi Lijo, On 11/30/2023 5:18 PM, Lazar, Lijo wrote: On 11/30/2023 11:59 AM, Ma, Jun wrote: Hi Alex, On 11/30/2023 12:39 AM, Alex Deucher wrote: On Wed, Nov 29, 2023 at 11:37 AM Ma Jun wrote: Some platforms can't resume from d3cold state, So add a

Re: [PATCH] drm/amdgpu: Add a new module param to disable d3cold

2023-11-30 Thread Ma, Jun
Hi Lijo, On 11/30/2023 5:18 PM, Lazar, Lijo wrote: > > > On 11/30/2023 11:59 AM, Ma, Jun wrote: >> Hi Alex, >> >> On 11/30/2023 12:39 AM, Alex Deucher wrote: >>> On Wed, Nov 29, 2023 at 11:37 AM Ma Jun wrote: Some platforms can't resume from d3cold state, So add a new module

[PATCH] drm/amdgpu: enable mca debug mode on APU by default

2023-11-30 Thread Yang Wang
enable MCA debug mode on APU device by default. Signed-off-by: Yang Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index

Re: [PATCH] drm/amdgpu: Add a new module param to disable d3cold

2023-11-30 Thread Ma, Jun
Hi Mario, On 11/29/2023 11:35 PM, Mario Limonciello wrote: > On 11/29/2023 02:51, Ma Jun wrote: >> Some platforms can't resume from d3cold state, So add a >> new module parameter to disable d3cold state for debugging >> purpose or workaround. >> >> Signed-off-by: Ma Jun >> --- > > This patch is

RE: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread zhuweixi
Add @Oak to the KFD discussion. I will reply separately elaborating your questions on GMEM's difference from HMM/MMU notifiers. Christian, thanks for pointing me to that AMDKFD discussion. I have read the discussion around the AMDKFD skeleton patch and found the previous discussion in the

[PATCH] drm/radeon: check the alloc_workqueue return value in radeon_crtc_init()

2023-11-30 Thread Yang Yingliang
From: Yang Yingliang check the alloc_workqueue return value in radeon_crtc_init() to avoid null-ptr-deref. Fixes: fa7f517cb26e ("drm/radeon: rework page flip handling v4") Signed-off-by: Yang Yingliang --- drivers/gpu/drm/radeon/radeon_display.c | 7 ++- 1 file changed, 6 insertions(+), 1

Re: [PATCH] drm/amdgpu: Add a new module param to disable d3cold

2023-11-30 Thread Lazar, Lijo
On 11/30/2023 11:59 AM, Ma, Jun wrote: Hi Alex, On 11/30/2023 12:39 AM, Alex Deucher wrote: On Wed, Nov 29, 2023 at 11:37 AM Ma Jun wrote: Some platforms can't resume from d3cold state, So add a new module parameter to disable d3cold state for debugging purpose or workaround. Doesn't

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread Christian König
Hi Oak, yeah, #4 is indeed a really good point and I think Felix will agree to that as well. HMM is basically still missing a way to advise device attributes for the CPU address space. Both migration strategy as well as device specific information (like cache preferences) fall into this

Re: [PATCH 3/3] drm/amd/display: Support DRM_AMD_DC_FP on RISC-V

2023-11-30 Thread Conor Dooley
On Wed, Nov 29, 2023 at 05:42:24PM -0700, Nathan Chancellor wrote: > On Thu, Nov 23, 2023 at 02:23:01PM +, Conor Dooley wrote: > > On Tue, Nov 21, 2023 at 07:05:15PM -0800, Samuel Holland wrote: > > > RISC-V uses kernel_fpu_begin()/kernel_fpu_end() like several other > > > architectures.