[PATCH v2 2/3] drm/amd/powerplay:add hwmgr callback to update nbpstate on Carrizo

2018-11-15 Thread Guttula, Suresh
Add hwmgr callback "update_nbdpm_pstate".This will use to access "cz_nbdpm_pstate_enable_disable" function to enable/disable low memory pstate. Signed-off-by: suresh guttula --- v2: commit message edited to explain more details drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c | 1 + drivers/gpu

[PATCH v2 3/3] drm/amd:Enable/Disable NBPSTATE on On/OFF of UVD

2018-11-15 Thread Guttula, Suresh
We observe black lines (underflow) on display when playing a 4K video with UVD. On Disabling Low memory P state this issue is not seen. In this patch ,disabling low memory P state only when video size >= 4k. Multiple runs of power measurement shows no imapct Signed-off-by: suresh guttula --- v2:

[PATCH 1/3] Revert "drm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD"

2018-11-15 Thread Guttula, Suresh
From: "S, Shirish" This reverts commit dbd8299c32f6f413f6cfe322fe0308f3cfc577e8. Reason for revert: This patch sends msg PPSMC_MSG_DisableLowMemoryPstate(0x002e) in wrong of sequence to SMU which is before PPSMC_MSG_UVDPowerON (0x0008). This leads to SMU failing to service the request as it is

Re: [PATCH] drm/amdgpu: Fix oops when pp_funcs->switch_power_profile is unset

2018-11-15 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of Kuehling, Felix Sent: Thursday, November 15, 2018 4:56:51 PM To: amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix; Joerg Roedel Subject: [PATCH] drm/amdgpu: Fix oops when pp_funcs->switch_power_profile is u

[PATCH] drm/amdgpu: Fix oops when pp_funcs->switch_power_profile is unset

2018-11-15 Thread Kuehling, Felix
On Vega20 and other pre-production GPUs, powerplay is not enabled yet. Check for NULL pointers before calling pp_funcs function pointers. Also affects Kaveri. CC: Joerg Roedel Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 +-- 1 file changed, 5 insertions

Re: [PATCH] drm/amd/powerplay: Ratelimit all "was not implemented" messages

2018-11-15 Thread Alex Deucher
On Thu, Nov 15, 2018 at 8:47 AM Joerg Roedel wrote: > > From: Joerg Roedel > > Running kfdtest on an AMD Carizzo flooded the kernel log > with thousands of these "was not implemented" messages, > making it impossible to see other messages there. > > Ratelimit the messages to prevent user-space fr

RE: [PATCH] drm/amdgpu: Fix Kernel Oops triggered by kfdtest

2018-11-15 Thread Kuehling, Felix
Apologies. We already have a fix for this on our internal amd-kfd-staging branch, but it's missing from amd-staging-drm-next. I'll cherry-pick our fix to amd-staging-drm-next and nominate it for drm-fixes. Regards, Felix -Original Message- From: amd-gfx On Behalf Of Joerg Roedel Sent

Re: [PATCH v2 -next] drm/amdgpu: remove set but not used variable 'ring'

2018-11-15 Thread Alex Deucher
On Thu, Nov 15, 2018 at 11:12 AM YueHaibing wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/gpu/drm/amd/amdgpu/psp_v10_0.c: In function 'psp_v10_0_ring_stop': > drivers/gpu/drm/amd/amdgpu/psp_v10_0.c:230:19: warning: > variable 'ring' set but not used [-Wunused-but-set-varia

RE: [PATCH] drm/amdgpu : Use XGMI mapping when devices on the same hive v3

2018-11-15 Thread Russell, Kent
Not a problem, I just saw the one missing patch when trying to rebase our KFD branch. I'll just put it on there instead. Kent -Original Message- From: Kuehling, Felix Sent: Thursday, November 15, 2018 2:52 PM To: Russell, Kent ; amd-gfx@lists.freedesktop.org Cc: Russell, Kent ; Liu, S

RE: [PATCH] drm/amdgpu : Use XGMI mapping when devices on the same hive v3

2018-11-15 Thread Kuehling, Felix
Sorry, something is still missing here. The new variable vram_base_offset isn't used anywhere. We have some other changes in amd-kfd-staging to use that vram_base_offset that are probably missing on amd-staging-drm-next. This change won't have any effect as is. Regards, Felix -Original M

[PATCH] drm/amdgpu : Use XGMI mapping when devices on the same hive v3

2018-11-15 Thread Russell, Kent
From: Shaoyun Liu VM mapping will only fall back to P2P if XGMI mapping is not available V2: Rebase onto 4.20 V3: Remove PCIe-related things Change-Id: I7a854ab3d5c9958bd45d4fe439ea7e370a092e7a Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Reviewed-by: Huang Rui Reviewed-by: Christi

[PATCH] drm/amdgpu: enable paging queue doorbell support v2

2018-11-15 Thread Yang, Philip
paging queues doorbell index use existing assignment sDMA_HI_PRI_ENGINE0/1 index, and increase SDMA_DOORBELL_RANGE size from 2 dwords to 4 dwords to enable the new doorbell index. v2: disable paging queue doorbell on Vega10 and Vega12 with SRIOV Change-Id: I9adb965f16ee4089d261d9a22231337739184e4

Re: [PATCH] drm/amdgpu: enable paging queue doorbell support

2018-11-15 Thread Yang, Philip
Thanks, I will disable paging queue doorbell on Vega10 and Vega12 with SRIOV. Philip On 2018-11-15 1:01 p.m., Kuehling, Felix wrote: > You changed the doorbell routing in NBIO. I think that won't work for SR-IOV, > because it's not controlled by the guest OS there. We may need to disable > pag

RE: [PATCH] drm/amdgpu : Use XGMI mapping when devices on the same hive v2

2018-11-15 Thread Kuehling, Felix
Hmm, we should remove the PCIe portion of this change. We just added some extra checks there on amd-kfd-staging that should make it closer to upstreamable. For now, just handle the XGMI case, but return -EINVAL in the else-branch (for other remote VRAM cases). Regards, Felix From: Russell, K

Re: [PATCH] drm/amdgpu : Use XGMI mapping when devices on the same hive v2

2018-11-15 Thread Russell, Kent
It was merged to 4.19 on Sept 21. It got missed on the 4.20 rebase. Kent KENT RUSSELL Sr. Software Engineer | Linux Compute Kernel 1 Commerce Valley Drive East Markham, ON L3T 7X6 O +(1) 289-695-2122 | Ext 72122 From: Kuehling, Felix Sent: Thursday, November 15, 2

RE: [PATCH] drm/amdgpu: enable paging queue doorbell support

2018-11-15 Thread Kuehling, Felix
You changed the doorbell routing in NBIO. I think that won't work for SR-IOV, because it's not controlled by the guest OS there. We may need to disable paging queue doorbell on Vega10 and Vega12 with SRIOV. For Vega20 we plan to change the doorbell layout before it goes to production (Oak starte

RE: [PATCH] drm/amdgpu : Use XGMI mapping when devices on the same hive v2

2018-11-15 Thread Kuehling, Felix
This change is not suitable for amd-staging-drm-next. PCIe P2P was not enabled on amd-staging-drm-next because it's not reliable yet. This change enables it even in situations that are not safe (including small BAR systems). Why are you porting this change to amd-staging-drm-next? Does anyone de

Re: [PATCH] drm/amdgpu: enable paging queue doorbell support

2018-11-15 Thread Yang, Philip
On 2018-11-15 11:43 a.m., Alex Deucher wrote: > On Thu, Nov 15, 2018 at 11:08 AM Yang, Philip wrote: >> paging queues doorbell index use existing assignment sDMA_HI_PRI_ENGINE0/1 >> index, and increase SDMA_DOORBELL_RANGE size from 2 dwords to 4 dwords to >> enable the new doorbell index. >> >> Ch

Re: [PATCH] drm/amdgpu : Use XGMI mapping when devices on the same hive v2

2018-11-15 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of Russell, Kent Sent: Thursday, November 15, 2018 11:54:27 AM To: amd-gfx@lists.freedesktop.org Cc: Russell, Kent; Liu, Shaoyun Subject: [PATCH] drm/amdgpu : Use XGMI mapping when devices on the same hive v2

[PATCH] drm/amdgpu : Use XGMI mapping when devices on the same hive v2

2018-11-15 Thread Russell, Kent
From: Shaoyun Liu VM mapping will only fall back to P2P if XGMI mapping is not available V2: Rebase onto 4.20 Change-Id: I7a854ab3d5c9958bd45d4fe439ea7e370a092e7a Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Kent R

Re: [PATCH] drm/amdgpu: enable paging queue doorbell support

2018-11-15 Thread Alex Deucher
On Thu, Nov 15, 2018 at 11:08 AM Yang, Philip wrote: > > paging queues doorbell index use existing assignment sDMA_HI_PRI_ENGINE0/1 > index, and increase SDMA_DOORBELL_RANGE size from 2 dwords to 4 dwords to > enable the new doorbell index. > > Change-Id: I9adb965f16ee4089d261d9a22231337739184e49

Re: [PATCH -next] drm/amdgpu: remove set but not used variable 'ring'

2018-11-15 Thread YueHaibing
On 2018/11/15 19:49, Huang, Ray wrote: >> -Original Message- >> From: YueHaibing [mailto:yuehaib...@huawei.com] >> Sent: Thursday, November 15, 2018 6:52 PM >> To: Deucher, Alexander ; Koenig, Christian >> ; Zhou, David(ChunMing) >> ; airl...@linux.ie; Liu, Shaoyun >> ; Francis, David ; Hu

[PATCH -next] drm/amdgpu: remove set but not used variable 'ring'

2018-11-15 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdgpu/psp_v10_0.c: In function 'psp_v10_0_ring_stop': drivers/gpu/drm/amd/amdgpu/psp_v10_0.c:230:19: warning: variable 'ring' set but not used [-Wunused-but-set-variable] It not used since commit 4ef72453311a ("drm/amdgpu: added

[PATCH v2 -next] drm/amdgpu: remove set but not used variable 'ring'

2018-11-15 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdgpu/psp_v10_0.c: In function 'psp_v10_0_ring_stop': drivers/gpu/drm/amd/amdgpu/psp_v10_0.c:230:19: warning: variable 'ring' set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/psp_v3_1.c: In function 'psp_v

[PATCH] drm/amdgpu: enable paging queue doorbell support

2018-11-15 Thread Yang, Philip
paging queues doorbell index use existing assignment sDMA_HI_PRI_ENGINE0/1 index, and increase SDMA_DOORBELL_RANGE size from 2 dwords to 4 dwords to enable the new doorbell index. Change-Id: I9adb965f16ee4089d261d9a22231337739184e49 Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/nbio_

[PATCH v3 2/2] drm/amd: Add abm level drm property

2018-11-15 Thread David Francis
Adaptive Backlight Management (ABM) is a feature that reduces backlight level to save power, while increasing pixel contrast and pixel luminance to maintain readability and image quality. ABM will adjust in response to the pixel luminance of the displayed content. ABM is made available as a drm p

[PATCH v3 1/2] drm/amd: Load DMCU IRAM

2018-11-15 Thread David Francis
DMCU IRAM must be loaded by the driver before DMCU can function. Move the IRAM code out of the shadows and into a new file modules/power/power_helpers.c The IRAM table contains the backlight curve and ABM parameters Add this new file to the Makefiles Call dmcu_load_iram in late init of DM Move

[PATCH] drm/amdgpu: Fix Kernel Oops triggered by kfdtest

2018-11-15 Thread Joerg Roedel
From: Joerg Roedel Running kfdtest on Kaveri triggers a kernel NULL-ptr dereference: BUG: unable to handle kernel NULL pointer dereference at PGD 42c017067 P4D 42c017067 PUD 40f071067 PMD 0 Oops: 0010 [#1] SMP NOPTI CPU: 0 PID: 13107 Comm: kfdtes

[PATCH] drm/amd/powerplay: Ratelimit all "was not implemented" messages

2018-11-15 Thread Joerg Roedel
From: Joerg Roedel Running kfdtest on an AMD Carizzo flooded the kernel log with thousands of these "was not implemented" messages, making it impossible to see other messages there. Ratelimit the messages to prevent user-space from flooding the kernel log. Signed-off-by: Joerg Roedel --- driv

RE: [PATCH -next] drm/amdgpu: remove set but not used variable 'ring'

2018-11-15 Thread Huang, Ray
> -Original Message- > From: YueHaibing [mailto:yuehaib...@huawei.com] > Sent: Thursday, November 15, 2018 6:52 PM > To: Deucher, Alexander ; Koenig, Christian > ; Zhou, David(ChunMing) > ; airl...@linux.ie; Liu, Shaoyun > ; Francis, David ; Huang, > Ray ; Xu, Feifei ; Gao, Likun > > Cc: Y