Re: [PATCH] drm/amdgpu/vcn:enable priority queues for encoder

2021-08-10 Thread Sahu, Satyajit
On 8/10/2021 6:12 PM, Das, Nirmoy wrote: On 8/10/2021 11:38 AM, Sahu, Satyajit wrote: On 8/10/2021 2:01 PM, Das, Nirmoy wrote: On 8/10/2021 9:09 AM, Satyajit Sahu wrote: VCN and VCE support multiple queues with different priority. Use differnt encoder queue based on the priority set by

Re: Req: about Polaris with RKL platform

2021-08-10 Thread Koba Ko
On Tue, Aug 10, 2021 at 11:09 PM Alex Deucher wrote: > > On Tue, Aug 10, 2021 at 12:57 AM Koba Ko wrote: > > > > On Tue, Aug 10, 2021 at 12:45 PM Mario Limonciello > > wrote: > > > > > > > > > > > > On Mon, Aug 9, 2021 at 9:37 AM Alex Deucher wrote: > > >> > > >> On Mon, Aug 9, 2021 at 9:59

RE: [PATCH] drm/amdkfd: CWSR with software scheduler

2021-08-10 Thread Kasiviswanathan, Harish
[AMD Official Use Only] Just few comments inline. With that acknowledged Reviewed-by: Harish Kasiviswanathan -Original Message- From: amd-gfx On Behalf Of Mukul Joshi Sent: Monday, August 9, 2021 4:41 PM To: amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix ; Cornwall, Jay ; Joshi,

Re: [PATCH 07/11] treewide: Replace the use of mem_encrypt_active() with prot_guest_has()

2021-08-10 Thread Kuppuswamy, Sathyanarayanan
On 8/10/21 12:48 PM, Tom Lendacky wrote: On 8/10/21 1:45 PM, Kuppuswamy, Sathyanarayanan wrote: On 7/27/21 3:26 PM, Tom Lendacky wrote: diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index de01903c3735..cafed6456d45 100644 --- a/arch/x86/kernel/head64.c +++

Re: [PATCH 07/11] treewide: Replace the use of mem_encrypt_active() with prot_guest_has()

2021-08-10 Thread Tom Lendacky
On 8/10/21 1:45 PM, Kuppuswamy, Sathyanarayanan wrote: > > > On 7/27/21 3:26 PM, Tom Lendacky wrote: >> diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c >> index de01903c3735..cafed6456d45 100644 >> --- a/arch/x86/kernel/head64.c >> +++ b/arch/x86/kernel/head64.c >> @@ -19,7

Re: [PATCH 2/2] drm/amd/pm: graceful exit on restore fan mode failure (v2)

2021-08-10 Thread Alex Deucher
Series is: Reviewed-by: Alex Deucher On Tue, Aug 10, 2021 at 3:15 PM Ryan Taylor wrote: > > Attempt od settings restore and disable restore flag on restore fan mode > failure. > > v2: Update fan mode to auto and fan speed to zero (Lijo) > > Reviewed-by: Lijo Lazar > Signed-off-by: Ryan Taylor

[PATCH 1/2] drm/amd/pm: restore fan_mode AMD_FAN_CTRL_NONE on resume (v2)

2021-08-10 Thread Ryan Taylor
Adds missing edge case to smu_restore_dpm_user_profile. v2: Don't restore fan mode auto (Lijo) Reviewed-by: Lijo Lazar Signed-off-by: Ryan Taylor --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH 2/2] drm/amd/pm: graceful exit on restore fan mode failure (v2)

2021-08-10 Thread Ryan Taylor
Attempt od settings restore and disable restore flag on restore fan mode failure. v2: Update fan mode to auto and fan speed to zero (Lijo) Reviewed-by: Lijo Lazar Signed-off-by: Ryan Taylor --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 5 +++-- 1 file changed, 3 insertions(+), 2

Re: [PATCH 07/11] treewide: Replace the use of mem_encrypt_active() with prot_guest_has()

2021-08-10 Thread Kuppuswamy, Sathyanarayanan
On 7/27/21 3:26 PM, Tom Lendacky wrote: diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index de01903c3735..cafed6456d45 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include

[PATCH 5.13 081/175] drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled

2021-08-10 Thread Greg Kroah-Hartman
From: Randy Dunlap commit 5706cb3c910cc8283f344bc37a889a8d523a2c6d upstream. 'pm_suspend_target_state' is only available when CONFIG_PM_SLEEP is set/enabled. OTOH, when both SUSPEND and HIBERNATION are not set, PM_SLEEP is not set, so this variable cannot be used.

Re: [PATCH v4] drm/amd/amdgpu embed hw_fence into amdgpu_job

2021-08-10 Thread Andrey Grodzovsky
Reviewed-by: Andrey Grodzovsky Andrey On 2021-08-09 11:22 p.m., Jingwen Chen wrote: From: Jack Zhang Why: Previously hw fence is alloced separately with job. It caused historical lifetime issues and corner cases. The ideal situation is to take fence to manage both job and fence's lifetime,

Re: [PATCH] drm/amdkfd: fix random KFDSVMRangeTest.SetGetAttributesTest test failure

2021-08-10 Thread Felix Kuehling
Am 2021-08-10 um 12:43 a.m. schrieb Yifan Zhang: > KFDSVMRangeTest.SetGetAttributesTest randomly fails in stress test. > > Note: Google Test filter = KFDSVMRangeTest.* > [==] Running 18 tests from 1 test case. > [--] Global test environment set-up. > [--] 18 tests from

Re: Req: about Polaris with RKL platform

2021-08-10 Thread Alex Deucher
On Tue, Aug 10, 2021 at 12:57 AM Koba Ko wrote: > > On Tue, Aug 10, 2021 at 12:45 PM Mario Limonciello wrote: > > > > > > > > On Mon, Aug 9, 2021 at 9:37 AM Alex Deucher wrote: > >> > >> On Mon, Aug 9, 2021 at 9:59 AM Koba Ko wrote: > >> > > >> > Previously, AMD had an issue about noise with

[PATCH AUTOSEL 5.4 13/13] drm/amd/display: Fix Dynamic bpp issue with 8K30 with Navi 1X

2021-08-10 Thread Sasha Levin
From: Bing Guo [ Upstream commit 06050a0f01dbac2ca33145ef19a72041206ea983 ] Why: In DCN2x, HW doesn't automatically divide MASTER_UPDATE_LOCK_DB_X by the number of pipes ODM Combined. How: Set MASTER_UPDATE_LOCK_DB_X to the value that is adjusted by the number of pipes ODM Combined.

[PATCH AUTOSEL 5.10 20/20] drm/amd/display: workaround for hard hang on HPD on native DP

2021-08-10 Thread Sasha Levin
From: Qingqing Zhuo [ Upstream commit c4152b297d56d3696ad0a9003169bc5b98ad7b72 ] [Why] HPD disable and enable sequences are not mutually exclusive on Linux. For HPDs that spans over 1s (i.e. HPD low = 1s), part of the disable sequence (specifically, a request to SMU to lower refclk) could come

[PATCH AUTOSEL 5.10 19/20] drm/amd/display: Fix Dynamic bpp issue with 8K30 with Navi 1X

2021-08-10 Thread Sasha Levin
From: Bing Guo [ Upstream commit 06050a0f01dbac2ca33145ef19a72041206ea983 ] Why: In DCN2x, HW doesn't automatically divide MASTER_UPDATE_LOCK_DB_X by the number of pipes ODM Combined. How: Set MASTER_UPDATE_LOCK_DB_X to the value that is adjusted by the number of pipes ODM Combined.

[PATCH AUTOSEL 5.10 12/20] drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.

2021-08-10 Thread Sasha Levin
From: Yifan Zhang [ Upstream commit 1c0539a6fc8a4a4b77278e35d763073890de96b9 ] If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue. Signed-off-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex

[PATCH AUTOSEL 5.13 23/24] drm/amd/display: workaround for hard hang on HPD on native DP

2021-08-10 Thread Sasha Levin
From: Qingqing Zhuo [ Upstream commit c4152b297d56d3696ad0a9003169bc5b98ad7b72 ] [Why] HPD disable and enable sequences are not mutually exclusive on Linux. For HPDs that spans over 1s (i.e. HPD low = 1s), part of the disable sequence (specifically, a request to SMU to lower refclk) could come

[PATCH AUTOSEL 5.13 22/24] drm/amd/display: Fix Dynamic bpp issue with 8K30 with Navi 1X

2021-08-10 Thread Sasha Levin
From: Bing Guo [ Upstream commit 06050a0f01dbac2ca33145ef19a72041206ea983 ] Why: In DCN2x, HW doesn't automatically divide MASTER_UPDATE_LOCK_DB_X by the number of pipes ODM Combined. How: Set MASTER_UPDATE_LOCK_DB_X to the value that is adjusted by the number of pipes ODM Combined.

[PATCH AUTOSEL 5.13 12/24] drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.

2021-08-10 Thread Sasha Levin
From: Yifan Zhang [ Upstream commit 1c0539a6fc8a4a4b77278e35d763073890de96b9 ] If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue. Signed-off-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex

Re: [PATCH] drm/amd/display: remove variable backlight

2021-08-10 Thread Alex Deucher
On Mon, Aug 9, 2021 at 9:24 PM zhaoxiao wrote: > > The variable backlight is being initialized with a value that > is never read, it is being re-assigned immediately afterwards. I don't think this comment really matches the code. I think you can drop it. Alex > Clean up the code by removing

Re: [PATCH] drm/display: fix possible null-pointer dereference in dcn10_set_clock()

2021-08-10 Thread Tuo Li
Thanks for your feedback. We will prepare a V2 patch according to your advice. Best wishes, Tuo Li On 2021/8/10 21:38, Chen, Guchun wrote: [Public] Thanks for your patch. I suggest moving the check of function pointer dc->clk_mgr->funcs->get_clock earlier, and return early if it's NULL, as

RE: [PATCH] drm/display: fix possible null-pointer dereference in dcn10_set_clock()

2021-08-10 Thread Chen, Guchun
[Public] Thanks for your patch. I suggest moving the check of function pointer dc->clk_mgr->funcs->get_clock earlier, and return early if it's NULL, as if it's NULL, it's meaningless to continue the clock setting. if (!dc->clk_mgr || !dc->clk_mgr->funcs->get_clock) return

[BUG] drm/amdgpu: possible null-pointer dereference in dce_vXX_0_afmt_setmode()

2021-08-10 Thread Tuo Li
Hello, Our static analysis tool finds some possible null-pointer dereferences in the amdgpu driver in Linux 5.14.0-rc3: In dce_v10_0.c: The variable encoder->crtc is checked in: 1591:    if (encoder->crtc) This indicates that encoder->crtc can be NULL. Then the function

[PATCH] drm/display: fix possible null-pointer dereference in dcn10_set_clock()

2021-08-10 Thread Tuo Li
The variable dc->clk_mgr is checked in: if (dc->clk_mgr && dc->clk_mgr->funcs->get_clock) This indicates dc->clk_mgr can be NULL. However, it is dereferenced in: if (!dc->clk_mgr->funcs->get_clock) To fix this possible null-pointer dereference, check dc->clk_mgr before dereferencing it.

Re: [PATCH] drm/amdgpu/vcn:enable priority queues for encoder

2021-08-10 Thread Das, Nirmoy
On 8/10/2021 11:38 AM, Sahu, Satyajit wrote: On 8/10/2021 2:01 PM, Das, Nirmoy wrote: On 8/10/2021 9:09 AM, Satyajit Sahu wrote: VCN and VCE support multiple queues with different priority. Use differnt encoder queue based on the priority set by UMD. Signed-off-by: Satyajit Sahu ---  

Re: [PATCH] drm/amdgpu: handle VCN instances when harvesting (v2)

2021-08-10 Thread Lazar, Lijo
Please ignore the comment. Checked again - num_vcn_inst denotes the maximum VCN instances and not the actual number of instances. Thanks, Lijo On 8/10/2021 5:34 PM, Lazar, Lijo wrote: On 8/10/2021 8:33 AM, Alex Deucher wrote: There may be multiple instances and only one is harvested. v2:

Re: [PATCH] drm/amdgpu: handle VCN instances when harvesting (v2)

2021-08-10 Thread Lazar, Lijo
On 8/10/2021 8:33 AM, Alex Deucher wrote: There may be multiple instances and only one is harvested. v2: fix typo in commit message Fixes: 83a0b8639185 ("drm/amdgpu: add judgement when add ip blocks (v2)") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1673 Reviewed-by: James Zhu

Re: [PATCH] drm/amdgpu/vcn:enable priority queues for encoder

2021-08-10 Thread Sahu, Satyajit
On 8/10/2021 2:01 PM, Das, Nirmoy wrote: On 8/10/2021 9:09 AM, Satyajit Sahu wrote: VCN and VCE support multiple queues with different priority. Use differnt encoder queue based on the priority set by UMD. Signed-off-by: Satyajit Sahu ---   drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c   | 35

Re: [PATCH] drm/amdgpu/vcn:enable priority queues for encoder

2021-08-10 Thread Das, Nirmoy
On 8/10/2021 9:09 AM, Satyajit Sahu wrote: VCN and VCE support multiple queues with different priority. Use differnt encoder queue based on the priority set by UMD. Signed-off-by: Satyajit Sahu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 35 +--

Re: [PATCHv2 2/2] drm/amd/amdgpu: add tdr support for embeded hw_fence

2021-08-10 Thread Jingwen Chen
Hi Andrey, The latest patch [PATCH v4] drm/amd/amdgpu embed hw_fence into amdgpu_job has been sent to amd-gfx. can you help review this patch? Best Regards, Jingwen On Tue Aug 10, 2021 at 10:51:17AM +0800, Jingwen Chen wrote: > On Mon Aug 09, 2021 at 12:24:37PM -0400, Andrey Grodzovsky wrote: >

[PATCH] drm/amdgpu/vcn:enable priority queues for encoder

2021-08-10 Thread Satyajit Sahu
VCN and VCE support multiple queues with different priority. Use differnt encoder queue based on the priority set by UMD. Signed-off-by: Satyajit Sahu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 35 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 2 +-

Re: Req: about Polaris with RKL platform

2021-08-10 Thread Mario Limonciello
On Mon, Aug 9, 2021 at 9:37 AM Alex Deucher wrote: > On Mon, Aug 9, 2021 at 9:59 AM Koba Ko wrote: > > > > Previously, AMD had an issue about noise with AMD-DG on the RKL platform > > AMD provided a parameter. > > #modprobe amdgpu ppfeaturemask=0xfff7bffb > > > > I thought it's better to

Re: Req: about Polaris with RKL platform

2021-08-10 Thread Koba Ko
On Tue, Aug 10, 2021 at 12:45 PM Mario Limonciello wrote: > > > > On Mon, Aug 9, 2021 at 9:37 AM Alex Deucher wrote: >> >> On Mon, Aug 9, 2021 at 9:59 AM Koba Ko wrote: >> > >> > Previously, AMD had an issue about noise with AMD-DG on the RKL platform >> > AMD provided a parameter. >> >

Re: [PATCHv2 2/2] drm/amd/amdgpu: add tdr support for embeded hw_fence

2021-08-10 Thread Jingwen Chen
On Mon Aug 09, 2021 at 12:24:37PM -0400, Andrey Grodzovsky wrote: > > On 2021-08-05 4:31 a.m., Jingwen Chen wrote: > > [Why] > > After embeded hw_fence to amdgpu_job, we need to add tdr support > > for this feature. > > > > [How] > > 1. Add a resubmit_flag for resubmit jobs. > > 2. Clear job