Re: [PATCH 04/15] drm/amd/display: Replace msleep with udelay while read edid return defer.

2020-09-17 Thread Christian König
Am 17.09.20 um 00:18 schrieb Alex Deucher: On Wed, Sep 16, 2020 at 6:16 PM Zhuo, Qingqing wrote: [AMD Official Use Only - Internal Distribution Only] On Wed, Sep 16, 2020 at 3:42 PM Qingqing Zhuo wrote: From: jinlong zhang [why] while read edid return defer, then it enter to msleep, but

RE: [PATCH] drm/amdgpu: remove experimental flag from navi12

2020-09-17 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Evan Quan -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Wednesday, September 16, 2020 2:22 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH] drm/amdgpu: remove experimental

[PATCH] drm/amd/display: dc/clk_mgr: add support for SI parts (v3)

2020-09-17 Thread Mauro Rossi
(v1) Changelog [Why] After commit c69dd2d "drm/amd/display: Refactor clk_mgr functions" dc/clk_mgr requires these changes to add SI parts support Necessary to avoid hitting default: ASSERT(0); /* Unknown Asic */ that would cause kernel freeze [How] Add case statement for FAMILY_SI chipsets (v2)

[PATCH] drm/amd/display: fix crash/reboot while accessing sysfs files

2020-09-17 Thread Shirish S
read/writes to aux_dpcd_* sysfs entries leads to system reboot or hang. Hence fix the handling of input data and reporting of errors appropriately to the user space. Signed-off-by: Shirish S --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 10 +- 1 file changed, 5

Re: [PATCH v2 00/21] Convert all remaining drivers to GEM object functions

2020-09-17 Thread Thomas Zimmermann
Hi Am 15.09.20 um 17:25 schrieb Christian König: > Added my rb to the amdgpu and radeon patches. > > Should we pick those up through the amd branches or do you want to push > everything to drm-misc-next? > > I think the later since this should result in much merge clash. Yes, preferable, I'd

[PATCH] drm/amd/pm: Skip smu_post_init in SRIOV

2020-09-17 Thread Jingwen Chen
smu_post_init needs to enable SMU feature, while this require virtualization off. Skip it since this feature is not used in SRIOV. Signed-off-by: Jingwen Chen --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git

Re: [PATCH v1] powerplay:hwmgr - modify the return value

2020-09-17 Thread Christian König
Am 17.09.20 um 05:46 schrieb Xiaoliang Pang: modify the return value is -EINVAL Maybe better write something like "The correct return value should be -EINVAL." With that done feel free to add my acked-by. Christian. Fixes: f83a9991648bb("drm/amd/powerplay: add Vega10 powerplay support

Re: [PATCH v2 01/21] drm/amdgpu: Introduce GEM object functions

2020-09-17 Thread Thomas Zimmermann
Hi Am 15.09.20 um 17:05 schrieb Christian König: > Am 15.09.20 um 16:59 schrieb Thomas Zimmermann: >> GEM object functions deprecate several similar callback interfaces in >> struct drm_driver. This patch replaces the per-driver callbacks with >> per-instance callbacks in amdgpu. The only

RE: [PATCH] drm/amd/pm: Skip smu_post_init in SRIOV

2020-09-17 Thread Chen, Guchun
[AMD Public Use] Why not moving the check in smu_post_init, and return 0 at the first early stage if it's SRIOV case? Regards, Guchun -Original Message- From: amd-gfx On Behalf Of Jingwen Chen Sent: Thursday, September 17, 2020 4:11 PM To: amd-gfx@lists.freedesktop.org Cc: Chen,

RE: [PATCH 3/3] drm/amdgpu: add xgmi perfmons for arcturus

2020-09-17 Thread Kim, Jonathan
Hi Harish. Thanks for the review. As discussed offline, patch 2 has a problem where attr groups array is global but allocation is done per-device causing problems with mem free and pmu unregister. I'm sending out a second series that should fix this and simplify the solution as well as

Re: [PATCH] Revert "drm/radeon: handle PCIe root ports with addressing limitations"

2020-09-17 Thread Christoph Hellwig
On Wed, Sep 16, 2020 at 06:16:25PM -0400, Alex Deucher wrote: > On Wed, Sep 16, 2020 at 3:04 AM Christoph Hellwig wrote: > > > > On Tue, Sep 15, 2020 at 02:46:07PM -0400, Alex Deucher wrote: > > > This change breaks tons of systems. > > > > Did you do at least some basic root causing on why? Do

[PATCH 2/3] drm/amdgpu: add per device user friendly xgmi events for vega20

2020-09-17 Thread Jonathan Kim
Non-outbound data metrics are non useful so mark them as legacy. Bucket new perf counters into device and not device ip. Bind events to chip instead of IP. Report available event counters and not number of hw counter banks. Move DF public macros to private since not needed outside of IP version.

[PATCH 3/3] drm/amdgpu: add xgmi perfmons for arcturus

2020-09-17 Thread Jonathan Kim
Add xgmi perfmons for Arcturus. Signed-off-by: Jonathan Kim v2: Resend for re-review with alignment for v3 in patch 2. --- drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c | 41 - drivers/gpu/drm/amd/amdgpu/df_v3_6.c| 3 ++ 2 files changed, 43 insertions(+), 1 deletion(-)

[PATCH 1/3] drm/amdgpu: fix xgmi perfmon a-b-a problem

2020-09-17 Thread Jonathan Kim
Mapping hw counters per event config will cause ABA problems so map per event instead. v2: Discontinue starting perf counters if add fails. Make it clear what's happening with pmc_start. Signed-off-by: Jonathan Kim --- drivers/gpu/drm/amd/amdgpu/amdgpu_df.h | 6 +-

[PATCH 0/1] Convert to using devm_drm_dev_alloc() (v2)

2020-09-17 Thread Luben Tuikov
This is based on top of Daniel's documentation patch and it applies cleanly onto amd-staging-drm-next. I'm also running this live. This version removes explicit drm_dev_put(), as it seems that devres acts as a garbage collector. Luben Tuikov (1): drm/amdgpu: Convert to using

[PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc() (v2)

2020-09-17 Thread Luben Tuikov
Convert to using devm_drm_dev_alloc(), as drm_dev_init() is going away. v2: Remove drm_dev_put() since a) devres doesn't do refcounting, see Documentation/driver-api/driver-model/devres.rst, Section 4, paragraph 1; and since b) devres acts as garbage collector when the DRM

[PATCH] drm/amdgpu: use function pointer for gfxhub functions

2020-09-17 Thread Oak Zeng
gfxhub functions are now called from function pointers, instead of from asic-specific functions. Signed-off-by: Oak Zeng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 3 +- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c

[PATCH] drm/amd/pm: Skip smu_post_init in SRIOV

2020-09-17 Thread Jingwen Chen
smu_post_init needs to enable SMU feature, while this require virtualization off. Skip it since this feature is not used in SRIOV. v2: move the check to the early stage of smu_post_init. v3: fix typo Signed-off-by: Jingwen Chen --- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 3 +++ 1

Re: [PATCH v2 18/21] drm/vkms: Introduce GEM object functions

2020-09-17 Thread Melissa Wen
Hi Thomas, On 09/15, Thomas Zimmermann wrote: > GEM object functions deprecate several similar callback interfaces in > struct drm_driver. This patch replaces the per-driver callbacks with > per-instance callbacks in vkms. > > Signed-off-by: Thomas Zimmermann Thanks! Looks fine. Reviewed-by:

[PATCH] drm/amd/pm: Skip smu_post_init in SRIOV

2020-09-17 Thread Jingwen Chen
smu_post_init needs to enable SMU feature, while this require virtualization off. Skip it since this feature is not used in SRIOV. v2: move the check to the early stage of smu_post_init. Signed-off-by: Jingwen Chen --- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 3 +++ 1 file changed, 3

Re: [PATCH v2 0/4] Enlarge tracepoints in the display component

2020-09-17 Thread Daniel Vetter
On Wed, Sep 16, 2020 at 11:27:27AM -0400, Kazlauskas, Nicholas wrote: > On 2020-09-16 5:12 a.m., Daniel Vetter wrote: > > On Fri, Sep 11, 2020 at 10:59:23AM -0400, Rodrigo Siqueira wrote: > > > Debug issues related to display can be a challenge due to the complexity > > > around this topic and

RE: [PATCH] drm/amd/pm: Skip smu_post_init in SRIOV

2020-09-17 Thread Chen, JingWen
[AMD Public Use] Done in v2 Best Regards, JingWen Chen > -Original Message- > From: Chen, Guchun > Sent: Thursday, September 17, 2020 4:21 PM > To: Chen, JingWen ; amd- > g...@lists.freedesktop.org > Cc: Chen, JingWen > Subject: RE: [PATCH] drm/amd/pm: Skip smu_post_init in SRIOV > >

Re: [PATCH v2 14/21] drm/tegra: Introduce GEM object functions

2020-09-17 Thread Thierry Reding
On Tue, Sep 15, 2020 at 04:59:51PM +0200, Thomas Zimmermann wrote: > GEM object functions deprecate several similar callback interfaces in > struct drm_driver. This patch replaces the per-driver callbacks with > per-instance callbacks in tegra. > > Signed-off-by: Thomas Zimmermann > --- >

RE: [PATCH] drm/amd/pm: Skip smu_post_init in SRIOV

2020-09-17 Thread Deng, Emily
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Emily.Deng >-Original Message- >From: amd-gfx On Behalf Of >Jingwen Chen >Sent: Thursday, September 17, 2020 5:43 PM >To: amd-gfx@lists.freedesktop.org >Cc: Chen, JingWen >Subject: [PATCH] drm/amd/pm: Skip smu_post_init

Re: [PATCH] drm/amd/pm: apply dummy reads workaround for CDR enabled only

2020-09-17 Thread Deucher, Alexander
[AMD Official Use Only - Internal Distribution Only] Acked-by: Alex Deucher From: Quan, Evan Sent: Thursday, September 17, 2020 10:36 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Quan, Evan Subject: [PATCH] drm/amd/pm: apply dummy reads

Re: [PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc() (v2)

2020-09-17 Thread Alex Deucher
On Thu, Sep 17, 2020 at 6:13 PM Luben Tuikov wrote: > > Convert to using devm_drm_dev_alloc(), > as drm_dev_init() is going away. > > v2: Remove drm_dev_put() since > a) devres doesn't do refcounting, see > Documentation/driver-api/driver-model/devres.rst, > Section 4, paragraph 1;

[PATCH] drm/amd/pm: apply dummy reads workaround for CDR enabled only

2020-09-17 Thread Evan Quan
For CDR disabled case, the dummy reads workaround is not needed. Change-Id: I474619b3d82792151870811c289ab311028de211 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH 2/2] drm/amdgpu: Fix dead lock issue for vblank

2020-09-17 Thread Emily . Deng
Always start vblank timer, but only calls vblank function when vblank is enabled. This is used to fix the dead lock issue. When drm_crtc_vblank_off want to disable vblank, it first get event_lock, and then call hrtimer_cancel, but hrtimer_cancel want to wait timer handler function finished. Timer

[PATCH 1/2] drm/amdgpu/sriov: Add one parameter for mcbp debug

2020-09-17 Thread Emily . Deng
For debug convenient, add sriov_mcbp parameter. Signed-off-by: Emily.Deng Change-Id: I84019eb4344e00d85b2ecc853145aabb312412fe --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 9 + drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 ++-

RE: [PATCH 2/3] SWDEV-220451 - Query guest's information by VF2PF message - Guest side - part 2

2020-09-17 Thread Liu, Monk
[AMD Official Use Only - Internal Distribution Only] Those three patches are Reviewed-by: Monk Liu _ Monk Liu|GPU Virtualization Team |AMD -Original Message- From: amd-gfx On Behalf Of Bokun Zhang Sent: Wednesday, September 16, 2020 10:57 PM To:

[PATCH 1/2] drm/amd/pm: Skip use smc fw data in SRIOV

2020-09-17 Thread Jingwen Chen
smc fw is not needed in SRIOV, thus driver should not try to get smc fw data. Signed-off-by: Jingwen Chen --- .../gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c| 61 ++- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c

[PATCH 2/2] drm/amd: Skip not used microcode loading in SRIOV

2020-09-17 Thread Jingwen Chen
smc, sdma, sos and asd fw is not used in SRIOV. Skip them to accelerate sw_init. Signed-off-by: Jingwen Chen --- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 16 +--- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 3 +++ drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 3 +++

Re: [PATCH 04/15] drm/amd/display: Replace msleep with udelay while read edid return defer.

2020-09-17 Thread Alex Deucher
On Thu, Sep 17, 2020 at 4:26 AM Christian König wrote: > > Am 17.09.20 um 00:18 schrieb Alex Deucher: > > On Wed, Sep 16, 2020 at 6:16 PM Zhuo, Qingqing > > wrote: > >> [AMD Official Use Only - Internal Distribution Only] > >> > >> On Wed, Sep 16, 2020 at 3:42 PM Qingqing Zhuo > >> wrote: >

RE: [PATCH 04/15] drm/amd/display: Replace msleep with udelay while read edid return defer.

2020-09-17 Thread Zhuo, Qingqing
[AMD Official Use Only - Internal Distribution Only] Am 17.09.20 um 00:18 schrieb Alex Deucher: >> On Wed, Sep 16, 2020 at 6:16 PM Zhuo, Qingqing wrote: >>> [AMD Official Use Only - Internal Distribution Only] >>> >>>On Wed, Sep 16, 2020 at 3:42 PM Qingqing Zhuo wrote: From: jinlong zhang

RE: [PATCH v3 2/3] drm/amdkfd: Add process eviction counters to sysfs

2020-09-17 Thread Cox, Philip
[AMD Official Use Only - Internal Distribution Only] > > +static struct attribute *procfs_stats_attrs[] = { > > + NULL > > +}; > > We could probably use this to populate the attributes in stats automatically > instead of calling sysfs_create_file and sysfs_remove_file manually. Then we > may

[PATCH] drm/amd/display: Delete duplicated argument to '&&' or '||'

2020-09-17 Thread Ye Bin
Fixes coccicheck warnig: drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.c:282:12-42: duplicated argument to && or || drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c:3240:12-42: duplicated argument to && or ||

Re: [PATCH] drm/amd/display: dc/clk_mgr: add support for SI parts (v3)

2020-09-17 Thread Alex Deucher
Applied with a slight cleanup to the commit message. Thanks! Alex On Thu, Sep 17, 2020 at 3:33 AM Mauro Rossi wrote: > > (v1) Changelog > > [Why] > After commit c69dd2d "drm/amd/display: Refactor clk_mgr functions" > dc/clk_mgr requires these changes to add SI parts support > Necessary to

Re: [PATCH] drm/amd/display: Delete duplicated argument to '&&' or '||'

2020-09-17 Thread Alex Deucher
On Thu, Sep 17, 2020 at 11:09 AM Ye Bin wrote: > > Fixes coccicheck warnig: > drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.c:282:12-42: > duplicated argument to && or || > drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c:3240:12-42: > duplicated argument to && or

Re: [PATCH v1] powerplay:hwmgr - modify the return value

2020-09-17 Thread Alex Deucher
On Thu, Sep 17, 2020 at 4:28 AM Christian König wrote: > > Am 17.09.20 um 05:46 schrieb Xiaoliang Pang: > > modify the return value is -EINVAL > > Maybe better write something like "The correct return value should be > -EINVAL." With that done feel free to add my acked-by. Applied with updated

RE: [PATCH] drm/amd/pm: Skip smu_post_init in SRIOV

2020-09-17 Thread Chen, Guchun
[AMD Public Use] You want to call it in SRIOV case or in bare-metal case? Regards, Guchun -Original Message- From: amd-gfx On Behalf Of Jingwen Chen Sent: Thursday, September 17, 2020 5:17 PM To: amd-gfx@lists.freedesktop.org Cc: Chen, JingWen Subject: [PATCH] drm/amd/pm: Skip

RE: [PATCH] drm/amd/pm: Skip smu_post_init in SRIOV

2020-09-17 Thread Chen, JingWen
[AMD Public Use] Typo fixed in v3 Best Regards, JingWen Chen > -Original Message- > From: Chen, Guchun > Sent: Thursday, September 17, 2020 5:40 PM > To: Chen, JingWen ; amd- > g...@lists.freedesktop.org > Cc: Chen, JingWen > Subject: RE: [PATCH] drm/amd/pm: Skip smu_post_init in

Re: [PATCH v3 2/3] drm/amdkfd: Add process eviction counters to sysfs

2020-09-17 Thread Felix Kuehling
Am 2020-09-17 um 9:11 a.m. schrieb Cox, Philip: > [AMD Official Use Only - Internal Distribution Only] > >>> +static struct attribute *procfs_stats_attrs[] = { >>> + NULL >>> +}; >> We could probably use this to populate the attributes in stats automatically >> instead of calling

[PATCH] drm/amd/display: [FIX] update clock under two conditions

2020-09-17 Thread Qingqing Zhuo
[Why] Update clock only when non-seamless boot stream exists creates regression on multiple scenerios. [How] Update clock in two conditions 1. Non-seamless boot stream exist. 2. Stream_count = 0 Fixes:06f9b1475d98("drm/amd/display: update clock when non-seamless boot stream exist")

RE: [PATCH 04/15] drm/amd/display: Replace msleep with udelay while read edid return defer.

2020-09-17 Thread Zhang, Jinlong
HI Christian While #include , it prompt ..\..\..\..\..\dc\dce\dce_aux.c(31): fatal error C1083: Cannot open include file: 'linux/delay.h': No such file or directory Could you help to check how to include the header of void usleep_range(unsigned long min, unsigned long max); -Original

Re: [PATCH 04/15] drm/amd/display: Replace msleep with udelay while read edid return defer.

2020-09-17 Thread Christian König
No idea what that is. I can include delay.h just fine in the rest of the driver. Must be something DC specific. Regards, Christian. Am 17.09.20 um 16:39 schrieb Zhang, Jinlong: HI Christian While #include , it prompt ..\..\..\..\..\dc\dce\dce_aux.c(31): fatal error C1083: Cannot open

RE: [PATCH 04/15] drm/amd/display: Replace msleep with udelay while read edid return defer.

2020-09-17 Thread Zhuo, Qingqing
[AMD Official Use Only - Internal Distribution Only] Hi Jinlong, This is a public thread for upstream review purpose mainly. Let's sync internally for your issue. Thanks, Lillian -Original Message- From: Koenig, Christian Sent: Thursday, September 17, 2020 10:46 AM To: Zhang,

Re: [PATCH v2 16/21] drm/vgem: Introduce GEM object functions

2020-09-17 Thread Melissa Wen
Hi Thomas, On 09/15, Thomas Zimmermann wrote: > GEM object functions deprecate several similar callback interfaces in > struct drm_driver. This patch replaces the per-driver callbacks with > per-instance callbacks in vgem. The only exception is gem_prime_mmap, > which is non-trivial to convert. >

Re: [PATCH 04/15] drm/amd/display: Replace msleep with udelay while read edid return defer.

2020-09-17 Thread Alex Deucher
On Thu, Sep 17, 2020 at 10:39 AM Zhang, Jinlong wrote: > > HI Christian > While #include , it prompt > ..\..\..\..\..\dc\dce\dce_aux.c(31): fatal error C1083: Cannot open include > file: 'linux/delay.h': No such file or directory > Could you help to check how to include the header of void >

[PATCH 3/3] drm/amd/amdkfd: Surface files in Sysfs to allow users to get number of compute units that are in use.

2020-09-17 Thread Ramesh Errabolu
[Why] Allow user to know how many compute units (CU) are in use at any given moment. [How] Surface files in Sysfs that allow user to determine the number of compute units that are in use for a given process. One Sysfs file is used per device. Signed-off-by: Ramesh Errabolu ---

[PATCH 2/3] drm/amd/amdgpu: Define and implement a function that collects number of waves that are in flight.

2020-09-17 Thread Ramesh Errabolu
[Why] Allow user to know how many compute units (CU) are in use at any given moment. [How] Read registers of SQ that give number of waves that are in flight of various queues. Use this information to determine number of CU's in use. Signed-off-by: Ramesh Errabolu ---

[PATCH 1/3] drm/amd/amdgpu: Prepare implementation to support reporting of CU usage

2020-09-17 Thread Ramesh Errabolu
[Why] Allow user to know number of compute units (CU) that are in use at any given moment. [How] Read registers of SQ that give number of waves that are in flight of various queues. Use this information to determine number of CU's in use. Signed-off-by: Ramesh Errabolu ---