[PATCH 1/2] drm/amdgpu: Clean up KFD VMID assignment

2020-06-24 Thread Felix Kuehling
The KFD VMID assignment was hard-coded in a few places. Consolidate that in a single variable adev->vm_manager.first_kfd_vmid. The value is still assigned in gmc-ip-version-specific code. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 12 +---

[PATCH 2/2] drm/amdgpu: Let KFD use more VMIDs on Arcturus

2020-06-24 Thread Felix Kuehling
When there is no graphics support, KFD can use more of the VMIDs. Graphics VMIDs are only used for video decoding/encoding and post processing. With two VCE engines, there is no reason to reserve more than 2 VMIDs for that. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

Re: [PATCH 2/2] drm/amdgpu: enable runtime pm on vega10 when noretry=0

2020-06-24 Thread Felix Kuehling
Am 2020-06-24 um 8:06 p.m. schrieb Bhardwaj, Rajneesh: > > On 6/24/2020 3:05 PM, Alex Deucher wrote: >> [CAUTION: External Email] >> >> The failures with ROCm only happen with noretry=1, so >> enable runtime pm when noretry=0 (the current default). >> >> Signed-off-by: Alex Deucher >> --- >>  

Re: [PATCH v2 5/8] drm/amdgpu: Refactor sysfs removal

2020-06-24 Thread Andrey Grodzovsky
On 6/24/20 2:11 AM, Greg KH wrote: On Tue, Jun 23, 2020 at 11:04:30PM -0400, Andrey Grodzovsky wrote: On 6/23/20 2:05 AM, Greg KH wrote: On Tue, Jun 23, 2020 at 12:51:00AM -0400, Andrey Grodzovsky wrote: On 6/22/20 12:45 PM, Greg KH wrote: On Mon, Jun 22, 2020 at 12:07:25PM -0400, Andrey

Re: [PATCH 4/4] drm/amdgpu: merge atombios init block

2020-06-24 Thread Zhang, Hawking
Series is Reviewed-by: Hawking Zhang Regards, Hawking Sent from my iPhone > On Jun 25, 2020, at 06:52, Sheng, Wenhui wrote: > > From: Wenhui Sheng > > After we move request full access before set > ip blocks, we can merge atombios init block > of SRIOV and baremetal together. > >

Re: [PATCH 1/2] drm/amdgpu: rework runtime pm enablement for BACO

2020-06-24 Thread Bhardwaj, Rajneesh
On 6/24/2020 3:05 PM, Alex Deucher wrote: [CAUTION: External Email] Add a switch statement to simplify asic checks. Note that BACO is not supported on APUs, so there is no need to check them. why not base this on smu_context to really query the SMU_FEATURE_BACO_BIT and then base the below

Re: [PATCH 2/2] drm/amdgpu: enable runtime pm on vega10 when noretry=0

2020-06-24 Thread Bhardwaj, Rajneesh
On 6/24/2020 3:05 PM, Alex Deucher wrote: [CAUTION: External Email] The failures with ROCm only happen with noretry=1, so enable runtime pm when noretry=0 (the current default). Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +- 1 file changed, 5

[PATCH 1/4] drm/amdgpu: request init data in virt detection

2020-06-24 Thread Wenhui.Sheng
From: Wenhui Sheng Move request init data to virt detection func, so we can insert request full access between request init data and set ip blocks. Signed-off-by: Wenhui Sheng --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 28 drivers/gpu/drm/amd/amdgpu/nv.c

[PATCH 3/4] drm/amdgpu: invoke req full access early enough

2020-06-24 Thread Wenhui.Sheng
From: Wenhui Sheng >From SIENNA_CICHLID, HW introduce a new protection feature which can control the FB, doorbell and MMIO write access for VF, so guest driver should request full access before ip discovery, or we couldn't access ip discovery data in FB. Signed-off-by: Wenhui Sheng ---

[PATCH 2/4] drm/amdgpu: move reg base init forward for soc15

2020-06-24 Thread Wenhui.Sheng
From: Wenhui Sheng Init soc15 reg base early enough so we can touch mailbox related registers in request full access for sriov before set_ip_blocks, vi arch doesn't use reg base in virt ops. v2: fix reg_base_init missed in bare metal case. Signed-off-by: Wenhui Sheng ---

[PATCH 4/4] drm/amdgpu: merge atombios init block

2020-06-24 Thread Wenhui.Sheng
From: Wenhui Sheng After we move request full access before set ip blocks, we can merge atombios init block of SRIOV and baremetal together. Signed-off-by: Wenhui Sheng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 +- 1 file changed, 1 insertion(+), 22 deletions(-)

[PATCH v2 3/3] Revert "drm/amd/display: Expose connector VRR range via debugfs"

2020-06-24 Thread Manasi Navare
From: Bhanuprakash Modem v2: * Rebase (Manasi) As both VRR min and max are already part of drm_display_info, drm can expose this VRR range for each connector. Hence this logic should move to core DRM. This reverts commit 727962f030c23422a01e8b22d0f463815fb15ec4. Signed-off-by: Bhanuprakash

[pull] amdgpu, amdkfd, radeon drm-fixes-5.8

2020-06-24 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.8. The following changes since commit 48778464bb7d346b47157d21ffde2af6b2d39110: Linux 5.8-rc2 (2020-06-21 15:45:29 -0700) are available in the Git repository at: git://people.freedesktop.org/~agd5f/linux tags/amd-drm-fixes-5.8-2020-06-24 for you to fetch

Re: [PATCH 3/3] drm/amdgpu: SI support for UVD and VCE power managment

2020-06-24 Thread Deucher, Alexander
[AMD Public Use] Series is: Reviewed-by: Alex Deucher From: Jivin, Alex Sent: Wednesday, June 24, 2020 4:31 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 3/3] drm/amdgpu: SI support for UVD and VCE power managment Port

[PATCH 3/3] drm/amdgpu: SI support for UVD and VCE power managment

2020-06-24 Thread Alex Jivin
Port functionality from the Radeon driver to support UVD and VCE power management. Signed-off-by: Alex Jivin --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 67 +++--- drivers/gpu/drm/amd/amdgpu/si_dpm.c| 19 2 files changed, 68 insertions(+), 18 deletions(-) diff

[PATCH 1/3] drm/amdgpu: SI support for UVD clock control

2020-06-24 Thread Alex Jivin
Port functionality from the Radeon driver to support UVD clock control. Signed-off-by: Alex Jivin --- drivers/gpu/drm/amd/amdgpu/si.c | 234 ++- drivers/gpu/drm/amd/amdgpu/sid.h | 1 + 2 files changed, 229 insertions(+), 6 deletions(-) diff --git

[PATCH 2/3] drm/amdgpu: SI support for VCE clock control

2020-06-24 Thread Alex Jivin
Port functionality from the Radeon driver to support VCE clock control. Signed-off-by: Alex Jivin --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 9 ++ drivers/gpu/drm/amd/amdgpu/si.c | 126 +++- drivers/gpu/drm/amd/amdgpu/sid.h| 31 +++ 3 files changed, 165

[PATCH 1/2] drm/amdgpu: rework runtime pm enablement for BACO

2020-06-24 Thread Alex Deucher
Add a switch statement to simplify asic checks. Note that BACO is not supported on APUs, so there is no need to check them. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 34 - 1 file changed, 22 insertions(+), 12 deletions(-) diff --git

[PATCH 2/2] drm/amdgpu: enable runtime pm on vega10 when noretry=0

2020-06-24 Thread Alex Deucher
The failures with ROCm only happen with noretry=1, so enable runtime pm when noretry=0 (the current default). Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

Re: [PATCH v2] drm/amdkfd: Fix circular locking dependency warning

2020-06-24 Thread Felix Kuehling
Am 2020-06-24 um 12:06 p.m. schrieb Mukul Joshi: > Lockdep is spewing circular locking dependency warning when > reading SDMA usage stats. > > 150.887733] == > [ 150.893903] WARNING: possible circular locking dependency detected > [

[PATCH v2] drm/amdkfd: Fix circular locking dependency warning

2020-06-24 Thread Mukul Joshi
Lockdep is spewing circular locking dependency warning when reading SDMA usage stats. 150.887733] == [ 150.893903] WARNING: possible circular locking dependency detected [ 150.905917] -- [

Re: [PATCH] drm/radeon: fix array out-of-bounds read and write issues

2020-06-24 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Jun 24, 2020 at 8:07 AM Colin King wrote: > > From: Colin Ian King > > There is an off-by-one bounds check on the index into arrays > table->mc_reg_address and table->mc_reg_table_entry[k].mc_data[j] that > can lead to reads and writes outside of arrays. Fix the

Re: [PATCH][next] drm/amdgpu: ensure 0 is returned for success in jpeg_v2_5_wait_for_idle

2020-06-24 Thread Alex Deucher
On Wed, Jun 24, 2020 at 10:54 AM Colin King wrote: > > From: Colin Ian King > > In the cases where adev->jpeg.num_jpeg_inst is zero or the condition > adev->jpeg.harvest_config & (1 << i) is always non-zero the variable > ret is never set to an error condition and the function returns > an

Re: [PATCH][next] drm: amdgpu: fix premature goto because of missing braces

2020-06-24 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Jun 24, 2020 at 10:32 AM Nirmoy wrote: > > Acked-by: Nirmoy Das > > > Thanks, > > Nirmoy > > On 6/24/20 4:14 PM, Colin King wrote: > > From: Colin Ian King > > > > Currently the goto statement is skipping over a lot of setup code > > because it is outside of an

[PATCH][next] drm/amdgpu: ensure 0 is returned for success in jpeg_v2_5_wait_for_idle

2020-06-24 Thread Colin King
From: Colin Ian King In the cases where adev->jpeg.num_jpeg_inst is zero or the condition adev->jpeg.harvest_config & (1 << i) is always non-zero the variable ret is never set to an error condition and the function returns an uninitialized value in ret. Since the only exit condition at the end

Re: [PATCH] drm/amdgpu: SI support for UVD and VCE power managment

2020-06-24 Thread Alex Deucher
On Wed, Jun 24, 2020 at 7:50 AM Alex Jivin wrote: > > Port functionality from the Radeon driver to support > UVD and VCE power management. > > Signed-off-by: Alex Jivin Please split this into three patches, one to add the set_uvd clocks interface, one to set the set_vce clocks interface, and

RE: [PATCH] drm/amdgpu: reduce ip discovery data reading size

2020-06-24 Thread Sheng, Wenhui
[AMD Public Use] Got it, will add more info in commit msg. Brs Wenhui -Original Message- From: Zhang, Hawking Sent: Wednesday, June 24, 2020 10:40 PM To: Zhang, Hawking ; Sheng, Wenhui ; amd-gfx@lists.freedesktop.org Cc: Zhang, Andy ; Liu, Shaoyun Subject: RE: [PATCH] drm/amdgpu:

RE: [PATCH 4/4] drm/amdgpu: merge atombios init block

2020-06-24 Thread Zhang, Hawking
[AMD Public Use] Series is Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Sheng, Wenhui Sent: Wednesday, June 24, 2020 22:40 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Sheng, Wenhui Subject: [PATCH 4/4] drm/amdgpu: merge atombios init block From:

[PATCH 2/4] drm/amdgpu: move reg base init forward for soc15

2020-06-24 Thread Wenhui.Sheng
From: Wenhui Sheng Init soc15 reg base early enough so we can touch mailbox related registers in request full access for sriov before set_ip_blocks, vi arch doesn't use reg base in virt ops. Signed-off-by: Wenhui Sheng --- drivers/gpu/drm/amd/amdgpu/soc15.c | 25 ++--- 1

[PATCH 4/4] drm/amdgpu: merge atombios init block

2020-06-24 Thread Wenhui.Sheng
From: Wenhui Sheng After we move request full access before set ip blocks, we can merge atombios init block of SRIOV and baremetal together. Signed-off-by: Wenhui Sheng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 +- 1 file changed, 1 insertion(+), 22 deletions(-)

[PATCH 3/4] drm/amdgpu: invoke req full access early enough

2020-06-24 Thread Wenhui.Sheng
From: Wenhui Sheng >From SIENNA_CICHLID, HW introduce a new protection feature which can control the FB, doorbell and MMIO write access for VF, so guest driver should request full access before ip discovery, or we couldn't access ip discovery data in FB. Signed-off-by: Wenhui Sheng ---

[PATCH 1/4] drm/amdgpu: request init data in virt detection

2020-06-24 Thread Wenhui.Sheng
From: Wenhui Sheng Move request init data to virt detection func, so we can insert request full access between request init data and set ip blocks. Signed-off-by: Wenhui Sheng --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 28 drivers/gpu/drm/amd/amdgpu/nv.c

RE: [PATCH] drm/amdgpu: reduce ip discovery data reading size

2020-06-24 Thread Zhang, Hawking
[AMD Public Use] To make the description accurate, Let's say only read the first 4KB, starting from total_vram - 64KB, for ip discovery data. As discussed, no matter the TMR block is 64KB or 1MB, the ip discovery data block always located in the same offset and with the same size (4KB)

RE: [PATCH] drm/amdgpu: reduce ip discovery data reading size

2020-06-24 Thread Zhang, Hawking
[AMD Public Use] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Sheng, Wenhui Sent: Wednesday, June 24, 2020 22:35 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Sheng, Wenhui Subject: [PATCH] drm/amdgpu: reduce ip discovery data reading size From:

[PATCH] drm/amdgpu: reduce ip discovery data reading size

2020-06-24 Thread Wenhui.Sheng
From: Wenhui Sheng Only read first 4K data instead of whole TMR block, so we can reduce the time in full access mode. Signed-off-by: Wenhui Sheng --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h | 3 ++- 2 files changed, 3 insertions(+),

Re: [PATCH][next] drm: amdgpu: fix premature goto because of missing braces

2020-06-24 Thread Nirmoy
Acked-by: Nirmoy Das Thanks, Nirmoy On 6/24/20 4:14 PM, Colin King wrote: From: Colin Ian King Currently the goto statement is skipping over a lot of setup code because it is outside of an if-block and should be inside it. Fix this by adding missing if statement braces.

RE: [PATCH] drm/amdgpu/uvd3.x: fix register definition warnings

2020-06-24 Thread Zhang, Hawking
[AMD Public Use] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Wednesday, June 24, 2020 22:20 To: amd-gfx list Cc: Deucher, Alexander Subject: Re: [PATCH] drm/amdgpu/uvd3.x: fix register definition warnings Ping? On

RE: [PATCH] drm/amdgpu: make sure to reserve tmr region on all asics which support it

2020-06-24 Thread Zhang, Hawking
[AMD Public Use] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Wednesday, June 24, 2020 22:20 To: amd-gfx list Cc: Deucher, Alexander Subject: Re: [PATCH] drm/amdgpu: make sure to reserve tmr region on all asics which

Re: [PATCH] drm/amdgpu/uvd3.x: fix register definition warnings

2020-06-24 Thread Christian König
Acked-by: Christian König Am 24.06.20 um 16:19 schrieb Alex Deucher: Ping? On Mon, Jun 22, 2020 at 6:12 PM Alex Deucher wrote: drop the duplicate register macros from sid.h and use the standard ones in the oss register headers. Signed-off-by: Alex Deucher ---

Re: [PATCH] drm/amdgpu: make sure to reserve tmr region on all asics which support it

2020-06-24 Thread Nirmoy
Acked-by: Nirmoy Das On 6/22/20 11:41 PM, Alex Deucher wrote: This includes older APUs like renoir. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

Re: [PATCH] drm/amdgpu: make sure to reserve tmr region on all asics which support it

2020-06-24 Thread Alex Deucher
Ping? Alex On Mon, Jun 22, 2020 at 5:41 PM Alex Deucher wrote: > > This includes older APUs like renoir. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH] drm/amdgpu/uvd3.x: fix register definition warnings

2020-06-24 Thread Alex Deucher
Ping? On Mon, Jun 22, 2020 at 6:12 PM Alex Deucher wrote: > > drop the duplicate register macros from sid.h and use the > standard ones in the oss register headers. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/si.c| 1 + > drivers/gpu/drm/amd/amdgpu/si_ih.c | 2 ++ >

[PATCH][next] drm: amdgpu: fix premature goto because of missing braces

2020-06-24 Thread Colin King
From: Colin Ian King Currently the goto statement is skipping over a lot of setup code because it is outside of an if-block and should be inside it. Fix this by adding missing if statement braces. Addresses-Coverity: ("Structurally dead code") Fixes: fd151ca5396d ("drm amdgpu: SI UVD v3_1")

Re: [PATCH 1/2] drm/amd/powerplay: change method to set board parameters

2020-06-24 Thread Deucher, Alexander
[AMD Public Use] Series is: Acked-by: Alex Deucher From: amd-gfx on behalf of Likun Gao Sent: Wednesday, June 24, 2020 2:35 AM To: amd-gfx@lists.freedesktop.org Cc: Gao, Likun ; Feng, Kenneth ; Zhang, Hawking Subject: [PATCH 1/2] drm/amd/powerplay: change

[PATCH] drm/radeon: fix array out-of-bounds read and write issues

2020-06-24 Thread Colin King
From: Colin Ian King There is an off-by-one bounds check on the index into arrays table->mc_reg_address and table->mc_reg_table_entry[k].mc_data[j] that can lead to reads and writes outside of arrays. Fix the bound checking off-by-one error. Addresses-Coverity: ("Out-of-bounds read/write")

[PATCH] drm/amdgpu: SI support for UVD and VCE power managment

2020-06-24 Thread Alex Jivin
Port functionality from the Radeon driver to support UVD and VCE power management. Signed-off-by: Alex Jivin --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 9 + drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 67 +++-- drivers/gpu/drm/amd/amdgpu/si.c| 361 -

Re: [PATCH v2 2/8] drm/ttm: Remap all page faults to per process dummy page.

2020-06-24 Thread Daniel Vetter
On Tue, Jun 23, 2020 at 11:31:45PM -0400, Andrey Grodzovsky wrote: > > On 6/22/20 5:41 AM, Daniel Vetter wrote: > > On Sun, Jun 21, 2020 at 02:03:02AM -0400, Andrey Grodzovsky wrote: > > > On device removal reroute all CPU mappings to dummy page per drm_file > > > instance or imported GEM object.

Re: [PATCH v2 5/8] drm/amdgpu: Refactor sysfs removal

2020-06-24 Thread Greg KH
On Tue, Jun 23, 2020 at 11:04:30PM -0400, Andrey Grodzovsky wrote: > > On 6/23/20 2:05 AM, Greg KH wrote: > > On Tue, Jun 23, 2020 at 12:51:00AM -0400, Andrey Grodzovsky wrote: > > > On 6/22/20 12:45 PM, Greg KH wrote: > > > > On Mon, Jun 22, 2020 at 12:07:25PM -0400, Andrey Grodzovsky wrote: > >

Re: [PATCH] mm: Track mmu notifiers in fs_reclaim_acquire/release

2020-06-24 Thread Dave Chinner
On Sun, Jun 21, 2020 at 01:42:05PM -0400, Qian Cai wrote: > On Wed, Jun 10, 2020 at 09:41:01PM +0200, Daniel Vetter wrote: > > fs_reclaim_acquire/release nicely catch recursion issues when > > allocating GFP_KERNEL memory against shrinkers (which gpu drivers tend > > to use to keep the excessive

Re: [PATCH] mm: Track mmu notifiers in fs_reclaim_acquire/release

2020-06-24 Thread Qian Cai
> On Jun 23, 2020, at 6:13 PM, Daniel Vetter wrote: > > Ok I tested this. I can't use your script to repro because > - I don't have a setup with xfs, and the splat points at an issue in xfs > - reproducing lockdep splats in shrinker callbacks is always a bit tricky What’s xfs setup are you

[PATCH 2/2] drm/amd/powerplay: update driver if file for sienna_cichlid

2020-06-24 Thread Likun Gao
From: Likun Gao Update sienna_cichlid driver if header file to match pptable changes. Signed-off-by: Likun Gao Change-Id: Idcc081797f54509ea57503cce1dc915f718f189e --- .../powerplay/inc/smu11_driver_if_sienna_cichlid.h | 12 drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h

[PATCH 1/2] drm/amd/powerplay: change method to set board parameters

2020-06-24 Thread Likun Gao
From: Likun Gao Copy board parameters directly instead of set each parameter for sienna_cichlid. Signed-off-by: Likun Gao --- .../drm/amd/powerplay/sienna_cichlid_ppt.c| 89 +-- 1 file changed, 2 insertions(+), 87 deletions(-) diff --git