[PATCH v3] drm/amdgpu: introduce new amdgpu_fence object to indicate the job embedded fence

2021-12-14 Thread Huang Rui
The job embedded fence donesn't initialize the flags at dma_fence_init(). Then we will go a wrong way in amdgpu_fence_get_timeline_name callback and trigger a null pointer panic once we enabled the trace event here. So introduce new amdgpu_fence object to indicate the job embedded fence. [ 156.13

RE: [PATCH v2] drm/amdgpu: introduce new amdgpu_fence object to indicate the job embedded fence

2021-12-14 Thread Huang, Ray
[AMD Official Use Only] Yes, exactly. AMDGPU_FENCE_FLAG_EMBED_IN_JOB_BIT is the private flag only for amdgpu. Maybe, it's cleaner to define another amdgpu_fence_ops which is dedicated for job-embedded fence. Thanks, Ray From: Grodzovsky, Andrey Sent: Wednesday, December 15, 2021 1:09 AM To:

RE: [PATCH v2] drm/amdgpu: introduce new amdgpu_fence object to indicate the job embedded fence

2021-12-14 Thread Huang, Ray
[AMD Official Use Only] > -Original Message- > From: Koenig, Christian > Sent: Tuesday, December 14, 2021 8:26 PM > To: Huang, Ray ; dri-de...@lists.freedesktop.org; > Daniel Vetter ; Sumit Semwal > > Cc: amd-gfx@lists.freedesktop.org; linux-me...@vger.kernel.org; Deucher, > Alexander ;

Re: [PATCH] drm/amd/pm: restore SMU version print statement for dGPUs

2021-12-14 Thread Deucher, Alexander
[Public] Reviewed-by: Alex Deucher From: amd-gfx on behalf of Mario Limonciello Sent: Tuesday, December 14, 2021 4:30 PM To: amd-gfx@lists.freedesktop.org Cc: Lazar, Lijo ; Limonciello, Mario Subject: [PATCH] drm/amd/pm: restore SMU version print statement f

[PATCH] drm/amd/pm: restore SMU version print statement for dGPUs

2021-12-14 Thread Mario Limonciello
This is still needed for thoes in case the firmware fails to load then the message is the only way to tell what firmware was on them Suggested-by: Lijo Lazar Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 5 + 1 file changed, 5 insertions(+) diff --gi

Re: [PATCH] drm/radeon: Fix syntax errors in comments

2021-12-14 Thread Alex Deucher
Applied. Thanks! Alex On Tue, Dec 14, 2021 at 9:54 AM Christian König wrote: > > Am 14.12.21 um 14:52 schrieb Xiang wangx: > > Delete the redundant word 'we'. > > > > Signed-off-by: Xiang wangx > > Well not a syntax error in the sense of a coding error, but valid fix > anyway :) > > Reviewed-b

Re: [PATCH v3 0/4] Enrich amdgpu docs from recent threads

2021-12-14 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Dec 13, 2021 at 6:30 PM Yann Dirson wrote: > > This series is basically bringing Alex' descriptions of the hardware and > driver internals into the doc. > > Changes in v3: > * camel case in titles (Rodrigo Siqueira) > * link DCN description to DC doc (Rodrigo Sique

Re: [PATCH] drm/amd/pm: add smu fw version check for ECC table support

2021-12-14 Thread Alex Deucher
On Tue, Dec 14, 2021 at 5:53 AM Yang Wang wrote: > > the smu firmware has been remove ECC TABLE support from 68.46.0. > > Signed-off-by: Yang Wang Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h| 2 ++ > drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c

Re: [PATCH v2] drm/amdgpu: introduce new amdgpu_fence object to indicate the job embedded fence

2021-12-14 Thread Andrey Grodzovsky
On 2021-12-14 12:03 p.m., Andrey Grodzovsky wrote: - -    if (job != NULL) { -    /* mark this fence has a parent job */ -    set_bit(AMDGPU_FENCE_FLAG_EMBED_IN_JOB_BIT, &fence->flags); +    if (job) +    dma_fence_init(fence, &amdgpu_job_fence_ops, +   &r

Re: [PATCH v2] drm/amdgpu: introduce new amdgpu_fence object to indicate the job embedded fence

2021-12-14 Thread Andrey Grodzovsky
On 2021-12-14 6:15 a.m., Huang Rui wrote: The job embedded fence donesn't initialize the flags at dma_fence_init(). Then we will go a wrong way in amdgpu_fence_get_timeline_name callback and trigger a null pointer panic once we enabled the trace event here. So introduce new amdgpu_fence object

Re: [RFC PATCH 1/2] drm/amdgpu/UAPI: add new PROFILE IOCTL

2021-12-14 Thread Christian König
Am 14.12.21 um 16:12 schrieb Alex Deucher: On Tue, Dec 14, 2021 at 9:57 AM Christian König wrote: Am 14.12.21 um 15:53 schrieb Alex Deucher: On Sun, Dec 5, 2021 at 4:23 AM Christian König wrote: Am 03.12.21 um 17:13 schrieb Alex Deucher: On Fri, Dec 3, 2021 at 7:15 AM Christian König wrote

RE: [PATCH v2 1/2] drm/amd/amdgpu: fix psp tmr bo pin count leak in SRIOV

2021-12-14 Thread Liu, Shaoyun
[AMD Official Use Only] These workaround code looks confusing. For PSP TMR , I think guest side should avoid to load it totally since it's loaded in host side. For gart table , in current code path probably it's ok, but I think if we have a correct sequence in SRIOV , we shouldn't have th

RE: [PATCH 1/4] drm/amdgpu: Increase potential product_name to 64 characters

2021-12-14 Thread Russell, Kent
Yeah that would make things a little clearer, and make it easier to change going forward. Thanks! Kent > -Original Message- > From: Chen, Guchun > Sent: Monday, December 13, 2021 10:33 PM > To: Russell, Kent ; amd-gfx@lists.freedesktop.org > Cc: Russell, Kent > Subject: RE: [PATCH 1/4

RE: [PATCH 4/4] drm/amdgpu: Access the FRU on Aldebaran

2021-12-14 Thread Russell, Kent
I'm not aware of any Aldebaran SKUs that don't have the FRU, but I can look into it before submitting this patch. Kent > -Original Message- > From: Chen, Guchun > Sent: Monday, December 13, 2021 10:39 PM > To: Chen, Guchun ; Russell, Kent ; > amd-gfx@lists.freedesktop.org > Cc: Russell

Re: [RFC PATCH 1/2] drm/amdgpu/UAPI: add new PROFILE IOCTL

2021-12-14 Thread Alex Deucher
On Tue, Dec 14, 2021 at 9:57 AM Christian König wrote: > > Am 14.12.21 um 15:53 schrieb Alex Deucher: > > On Sun, Dec 5, 2021 at 4:23 AM Christian König > > wrote: > >> Am 03.12.21 um 17:13 schrieb Alex Deucher: > >>> On Fri, Dec 3, 2021 at 7:15 AM Christian König > >>> wrote: > Am 02.12.21

Re: [RFC PATCH 1/2] drm/amdgpu/UAPI: add new PROFILE IOCTL

2021-12-14 Thread Christian König
Am 14.12.21 um 15:53 schrieb Alex Deucher: On Sun, Dec 5, 2021 at 4:23 AM Christian König wrote: Am 03.12.21 um 17:13 schrieb Alex Deucher: On Fri, Dec 3, 2021 at 7:15 AM Christian König wrote: Am 02.12.21 um 20:19 schrieb Alex Deucher: This adds a new IOCTL currently used to implement quer

[PATCH] drm/amdkfd: Fix missing check in kfd_parse_subtype_iolink

2021-12-14 Thread Miaoqian Lin
The kmemdup() function may return NULL in case of error. Add NULL checking to prevent potential null deference. Signed-off-by: Miaoqian Lin --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd

Re: [PATCH] drm/radeon: Fix syntax errors in comments

2021-12-14 Thread Christian König
Am 14.12.21 um 14:52 schrieb Xiang wangx: Delete the redundant word 'we'. Signed-off-by: Xiang wangx Well not a syntax error in the sense of a coding error, but valid fix anyway :) Reviewed-by: Christian König --- drivers/gpu/drm/radeon/radeon_vce.c | 2 +- 1 file changed, 1 insertio

Re: [RFC PATCH 1/2] drm/amdgpu/UAPI: add new PROFILE IOCTL

2021-12-14 Thread Alex Deucher
On Sun, Dec 5, 2021 at 4:23 AM Christian König wrote: > > Am 03.12.21 um 17:13 schrieb Alex Deucher: > > On Fri, Dec 3, 2021 at 7:15 AM Christian König > > wrote: > >> Am 02.12.21 um 20:19 schrieb Alex Deucher: > >>> This adds a new IOCTL currently used to implement querying > >>> and setting the

[PATCH] drm/radeon: Fix syntax errors in comments

2021-12-14 Thread Xiang wangx
Delete the redundant word 'we'. Signed-off-by: Xiang wangx --- drivers/gpu/drm/radeon/radeon_vce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_vce.c b/drivers/gpu/drm/radeon/radeon_vce.c index 511a942e851d..ca4a36464340 100644 --- a/drivers/

Re: [PATCH] amdgpu/pm: Modify sysfs pp_dpm_sclk to have only read premission in ONEVF mode

2021-12-14 Thread Nikolic, Marina
[AMD Official Use Only] Hello, Thank you all for fast response and useful advice. I made new changes based on suggestion from @Lazar, Lijo. Though, I have made it general (any setting in sriov case) as that is in my request (details: SWDEV-313004). Please find the new

Re: [PATCH v2 2/2] drm/amd/amdgpu: fix gmc bo pin count leak in SRIOV

2021-12-14 Thread Christian König
Am 14.12.21 um 05:17 schrieb Jingwen Chen: [Why] gmc bo will be pinned during loading amdgpu and reset in SRIOV while only unpinned in unload amdgpu [How] add amdgpu_in_reset and sriov judgement to skip pin bo v2: fix wrong judgement Signed-off-by: Jingwen Chen Nirmoy already had a differen

Re: [PATCH v2] drm/amdgpu: introduce new amdgpu_fence object to indicate the job embedded fence

2021-12-14 Thread Christian König
Am 14.12.21 um 12:15 schrieb Huang Rui: The job embedded fence donesn't initialize the flags at dma_fence_init(). Then we will go a wrong way in amdgpu_fence_get_timeline_name callback and trigger a null pointer panic once we enabled the trace event here. So introduce new amdgpu_fence object t

[PATCH v2] drm/amdgpu: introduce new amdgpu_fence object to indicate the job embedded fence

2021-12-14 Thread Huang Rui
The job embedded fence donesn't initialize the flags at dma_fence_init(). Then we will go a wrong way in amdgpu_fence_get_timeline_name callback and trigger a null pointer panic once we enabled the trace event here. So introduce new amdgpu_fence object to indicate the job embedded fence. [ 156.13

[PATCH] drm/amd/pm: add smu fw version check for ECC table support

2021-12-14 Thread Yang Wang
the smu firmware has been remove ECC TABLE support from 68.46.0. Signed-off-by: Yang Wang --- drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h| 2 ++ drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 8 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm

Re: [PATCH 1/3] dma-buf: make the flags can be configured during dma fence init

2021-12-14 Thread Christian König
Am 14.12.21 um 10:44 schrieb Huang, Ray: [AMD Official Use Only] -Original Message- From: Koenig, Christian Sent: Tuesday, December 14, 2021 5:24 PM To: Huang, Ray ; dri-de...@lists.freedesktop.org; Daniel Vetter ; Sumit Semwal Cc: amd-gfx@lists.freedesktop.org; linux-me...@vger.kerne

RE: [PATCH 1/3] dma-buf: make the flags can be configured during dma fence init

2021-12-14 Thread Huang, Ray
[AMD Official Use Only] > -Original Message- > From: Koenig, Christian > Sent: Tuesday, December 14, 2021 5:24 PM > To: Huang, Ray ; dri-de...@lists.freedesktop.org; > Daniel Vetter ; Sumit Semwal > > Cc: amd-gfx@lists.freedesktop.org; linux-me...@vger.kernel.org; Deucher, > Alexander ;

Re: [PATCH 1/3] dma-buf: make the flags can be configured during dma fence init

2021-12-14 Thread Christian König
Am 14.12.21 um 10:19 schrieb Huang, Ray: [AMD Official Use Only] -Original Message- From: Koenig, Christian Sent: Tuesday, December 14, 2021 4:00 PM To: Huang, Ray ; dri-de...@lists.freedesktop.org; Daniel Vetter ; Sumit Semwal Cc: amd-gfx@lists.freedesktop.org; linux-me...@vger.kerne

RE: [PATCH 2/3] drm/amdgpu: fix the fence timeline null pointer

2021-12-14 Thread Huang, Ray
[AMD Official Use Only] > -Original Message- > From: Koenig, Christian > Sent: Tuesday, December 14, 2021 4:01 PM > To: Huang, Ray ; dri-de...@lists.freedesktop.org; > Daniel Vetter ; Sumit Semwal > > Cc: amd-gfx@lists.freedesktop.org; linux-me...@vger.kernel.org; Deucher, > Alexander ;

RE: [PATCH 1/3] dma-buf: make the flags can be configured during dma fence init

2021-12-14 Thread Huang, Ray
[AMD Official Use Only] > -Original Message- > From: Koenig, Christian > Sent: Tuesday, December 14, 2021 4:00 PM > To: Huang, Ray ; dri-de...@lists.freedesktop.org; > Daniel Vetter ; Sumit Semwal > > Cc: amd-gfx@lists.freedesktop.org; linux-me...@vger.kernel.org; Deucher, > Alexander ;

Re: [PATCH] drm/amd/pm: fix a potential gpu_metrics_table memory leak

2021-12-14 Thread Lazar, Lijo
On 12/14/2021 1:36 PM, Lang Yu wrote: Memory is allocated for gpu_metrics_table in renoir_init_smc_tables(), but not freed in int smu_v12_0_fini_smc_tables(). Free it! Fixes: 95868b85764a ("drm/amd/powerplay: add Renoir support for gpu metrics export") Signed-off-by: Lang Yu Reviewed-by:

Re: [PATCH 6/7] drm/amdgpu: Ensure kunmap is called on error

2021-12-14 Thread Ira Weiny
On Mon, Dec 13, 2021 at 09:37:32PM +0100, Christian König wrote: > Am 11.12.21 um 00:24 schrieb ira.we...@intel.com: > > From: Ira Weiny > > > > The default case leaves the buffer object mapped in error. > > > > Add amdgpu_bo_kunmap() to that case to ensure the mapping is cleaned up. > > Mhm, g

[PATCH 2/2] drm/amd/display: refine error handling for dm_dmub_sw_init()

2021-12-14 Thread Lang Yu
To avoid potential memory leaks, refine error handling for dm_dmub_sw_init(). Signed-off-by: Lang Yu --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 37 ++- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/dr

[PATCH 1/2] drm/amd/display: fix a potential dmub_srv memory leak

2021-12-14 Thread Lang Yu
Memory is allocated for dmub_srv in dm_sw_init(), but not freed in dm_sw_fini(). Free it! Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/disp

[PATCH] drm/amd/pm: fix a potential gpu_metrics_table memory leak

2021-12-14 Thread Lang Yu
Memory is allocated for gpu_metrics_table in renoir_init_smc_tables(), but not freed in int smu_v12_0_fini_smc_tables(). Free it! Fixes: 95868b85764a ("drm/amd/powerplay: add Renoir support for gpu metrics export") Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c | 3 +

Re: [PATCH 2/3] drm/amdgpu: fix the fence timeline null pointer

2021-12-14 Thread Christian König
Am 13.12.21 um 07:34 schrieb Huang Rui: Initialize the flags for embedded fence in the job at dma_fence_init(). Otherwise, we will go a wrong way in amdgpu_fence_get_timeline_name callback and trigger a null pointer panic once we enabled the trace event here. [ 156.131790] BUG: kernel NULL poin

Re: [PATCH 1/3] dma-buf: make the flags can be configured during dma fence init

2021-12-14 Thread Christian König
Am 13.12.21 um 07:34 schrieb Huang Rui: In some user scenarios, the get_timeline_name callback uses the flags to decide which way to return the timeline string name. Once the trace_dma_fence_init event is enabled, it will call get_timeline_name callback to dump the fence structure. However, at th