Re: [PATCH 2/2] drm/amdgpu: add firmware header printing for psp fw loading

2019-08-15 Thread Deucher, Alexander
Series is: Reviewed-by: Alex Deucher From: amd-gfx on behalf of Yuan, Xiaojie Sent: Thursday, August 15, 2019 5:48 AM To: amd-gfx@lists.freedesktop.org Cc: Xiao, Jack ; Huang, Ray ; Yuan, Xiaojie ; Zhang, Hawking Subject: [PATCH 2/2] drm/amdgpu: add firmware

RE: [PATCH] drm/amdgpu: remove special autoload handling for navi12

2019-08-15 Thread Zhang, Hawking
Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Yuan, Xiaojie Sent: 2019年8月15日 16:44 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Xiao, Jack ; Yuan, Xiaojie Subject: [PATCH] drm/amdgpu: remove special autoload handling for navi12 s/r list in rlc

Re: [PATCH] dmr/amdgpu: Fix compile error with CONFIG_DRM_AMDGPU_GART_DEBUGFS

2019-08-15 Thread Christian König
Am 14.08.19 um 21:48 schrieb Andrey Grodzovsky: Double defintion of 'i' Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König I think in the long term we could as well remove CONFIG_DRM_AMDGPU_GART_DEBUGFS and drop the extra debug functionality. Christian. ---

Re: [PATCH] drm/amdgpu: remove special autoload handling for navi12

2019-08-15 Thread Alex Deucher
On Thu, Aug 15, 2019 at 4:43 AM Yuan, Xiaojie wrote: > > s/r list in rlc firmware is ready, so remove the special autoload handling > > Signed-off-by: Xiaojie Yuan Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-)

Re: [PATCH] drm/amdgpu: Apply flags after amdgpu_device_ip_init()

2019-08-15 Thread Kai-Heng Feng
at 21:33, Deucher, Alexander wrote: Thanks for finding this! I think the attached patch should fix the issue and it's much less invasive. Yes it also fix the issue, please add by tested-by: Tested-by: Kai-Heng Feng I took this more or less future proof approach because I think this won’t

Re: [PATCH 1/4] drm/radeon: handle PCIe root ports with addressing limitations

2019-08-15 Thread Alex Deucher
On Thu, Aug 15, 2019 at 4:34 AM Koenig, Christian wrote: > > Am 15.08.19 um 09:27 schrieb Christoph Hellwig: > > radeon uses a need_dma32 flag to indicate to the drm core that some > > allocations need to be done using GFP_DMA32, but it only checks the > > device addressing capabilities to make

Re: [PATCH 1/4] drm/radeon: handle PCIe root ports with addressing limitations

2019-08-15 Thread Koenig, Christian
Am 15.08.19 um 16:15 schrieb Alex Deucher: > On Thu, Aug 15, 2019 at 4:34 AM Koenig, Christian > wrote: >> Am 15.08.19 um 09:27 schrieb Christoph Hellwig: >>> radeon uses a need_dma32 flag to indicate to the drm core that some >>> allocations need to be done using GFP_DMA32, but it only checks

[PATCH 3/4] drm/radeon: simplify and cleanup setting the dma mask

2019-08-15 Thread Christoph Hellwig
Use dma_set_mask_and_coherent to set both masks in one go, and remove the no longer required fallback, as the kernel now always accepts larger than required DMA masks. Fail the driver probe if we can't set the DMA mask, as that means the system can only support a larger mask. Signed-off-by:

[PATCH 4/4] drm/amdgpu: simplify and cleanup setting the dma mask

2019-08-15 Thread Christoph Hellwig
Use dma_set_mask_and_coherent to set both masks in one go, and remove the no longer required fallback, as the kernel now always accepts larger than required DMA masks. Fail the driver probe if we can't set the DMA mask, as that means the system can only support a larger mask. Signed-off-by:

RE: [PATCH] drm/amd/powerplay: disable gfxoff for navi12

2019-08-15 Thread Zhang, Hawking
Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Yuan, Xiaojie Sent: 2019年8月15日 11:42 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Xiao, Jack ; Feng, Kenneth ; Yuan, Xiaojie Subject: [PATCH] drm/amd/powerplay: disable gfxoff for navi12 gfxoff doesn't

Re: [PATCH 1/4] drm/radeon: handle PCIe root ports with addressing limitations

2019-08-15 Thread Christoph Hellwig
On Thu, Aug 15, 2019 at 08:34:10AM +, Koenig, Christian wrote: > Looks sane to me. Reviewed-by: Christian König . > > Should we merge this through our normal amdgpu/radeon branches or do you > want to send this upstream somehow else? This is intended for your trees.

[PATCH] drm/amdgpu: remove special autoload handling for navi12

2019-08-15 Thread Yuan, Xiaojie
s/r list in rlc firmware is ready, so remove the special autoload handling Signed-off-by: Xiaojie Yuan --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

[PATCH 1/4] drm/radeon: handle PCIe root ports with addressing limitations

2019-08-15 Thread Christoph Hellwig
radeon uses a need_dma32 flag to indicate to the drm core that some allocations need to be done using GFP_DMA32, but it only checks the device addressing capabilities to make that decision. Unfortunately PCIe root ports that have limited addressing exist as well. Use the dma_addressing_limited

[PATCH 2/4] drm/amdgpu: handle PCIe root ports with addressing limitations

2019-08-15 Thread Christoph Hellwig
amdgpu uses a need_dma32 flag to indicate to the drm core that some allocations need to be done using GFP_DMA32, but it only checks the device addressing capabilities to make that decision. Unfortunately PCIe root ports that have limited addressing exist as well. Use the dma_addressing_limited

fix radeon and amdgpu for addressing limited root ports

2019-08-15 Thread Christoph Hellwig
Hi AMD graphics maintainers, this series fixes a problem in the radeon driver for systems where the PCIe root port only supports limited (32-bit) addressing as reported by Atish. I then also fixed the same issue in amdgpu as the code was copy and pasted there, and cleaned up the dma mask setting

Re: [PATCH v3 hmm 08/11] drm/radeon: use mmu_notifier_get/put for struct radeon_mn

2019-08-15 Thread Christian König
Am 07.08.19 um 01:15 schrieb Jason Gunthorpe: From: Jason Gunthorpe radeon is using a device global hash table to track what mmu_notifiers have been registered on struct mm. This is better served with the new get/put scheme instead. radeon has a bug where it was not blocking notifier

Re: [PATCH 1/4] drm/radeon: handle PCIe root ports with addressing limitations

2019-08-15 Thread Koenig, Christian
Am 15.08.19 um 09:27 schrieb Christoph Hellwig: > radeon uses a need_dma32 flag to indicate to the drm core that some > allocations need to be done using GFP_DMA32, but it only checks the > device addressing capabilities to make that decision. Unfortunately > PCIe root ports that have limited

[PATCH 2/2] drm/amdgpu: add firmware header printing for psp fw loading

2019-08-15 Thread Yuan, Xiaojie
firmware header information is printed for direct fw loading but not added for psp fw loading yet Signed-off-by: Xiaojie Yuan --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 54 + 1 file changed, 54 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

[PATCH 1/2] drm/amdgpu: fix debug level for ppt offset/size

2019-08-15 Thread Yuan, Xiaojie
Signed-off-by: Xiaojie Yuan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c index 35fd46bdfc53..82f6b413718b 100644 ---

Re: [PATCH] drm/amdgpu: Apply flags after amdgpu_device_ip_init()

2019-08-15 Thread Alex Deucher
On Thu, Aug 15, 2019 at 10:59 AM Kai-Heng Feng wrote: > > at 21:33, Deucher, Alexander wrote: > > > Thanks for finding this! I think the attached patch should fix the issue > > and it's much less invasive. > > Yes it also fix the issue, please add by tested-by: > Tested-by: Kai-Heng Feng >

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Jerome Glisse
On Wed, Aug 14, 2019 at 07:48:28AM -0700, Dan Williams wrote: > On Wed, Aug 14, 2019 at 6:28 AM Jason Gunthorpe wrote: > > > > On Wed, Aug 14, 2019 at 09:38:54AM +0200, Christoph Hellwig wrote: > > > On Tue, Aug 13, 2019 at 06:36:33PM -0700, Dan Williams wrote: > > > > Section alignment

Re: [PATCH v7 1/9] drm_dp_cec: add connector info support.

2019-08-15 Thread Lyude Paul
Reviewed-by: Lyude Paul On Wed, 2019-08-14 at 12:44 +0200, Dariusz Marcinkiewicz wrote: > Pass the connector info to the CEC adapter. This makes it possible > to associate the CEC adapter with the corresponding drm connector. > > Signed-off-by: Dariusz Marcinkiewicz > Signed-off-by: Hans

[PATCH] drm/amdgpu/gfx9: update pg_flags after determining if gfx off is possible

2019-08-15 Thread Alex Deucher
We need to set certain power gating flags after we determine if the firmware version is sufficient to support gfxoff. Previously we set the pg flags in early init, but we later we might have disabled gfxoff if the firmware versions didn't support it. Move adding the additional pg flags after we

[PATCH 1/2] Revert "drm/amdgpu: use direct loading on renoir vcn for the moment"

2019-08-15 Thread Thai, Thong
This reverts commit 69fcd7347f6fb11edc7eaea7c7b9cff0044ce17e. --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 9 +++-- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 9 +++-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c

[PATCH 2/2] drm/amdgpu: enable VCN DPG for Renoir

2019-08-15 Thread Thai, Thong
Enable VCN Dynamic Powergating on Renoir devices. This will also enable indirect SRAM loading of VCN firmware on Renoir. Signed-off-by: Thong Thai --- drivers/gpu/drm/amd/amdgpu/soc15.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c

Re: [Nouveau] [PATCH] nouveau/hmm: map pages after migration

2019-08-15 Thread Jerome Glisse
On Tue, Aug 13, 2019 at 05:58:52PM -0400, Jerome Glisse wrote: > On Wed, Aug 07, 2019 at 08:02:14AM -0700, Ralph Campbell wrote: > > When memory is migrated to the GPU it is likely to be accessed by GPU > > code soon afterwards. Instead of waiting for a GPU fault, map the > > migrated memory into

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Jason Gunthorpe
On Thu, Aug 15, 2019 at 02:03:25PM -0400, Jerome Glisse wrote: > On Wed, Aug 14, 2019 at 07:48:28AM -0700, Dan Williams wrote: > > On Wed, Aug 14, 2019 at 6:28 AM Jason Gunthorpe wrote: > > > > > > On Wed, Aug 14, 2019 at 09:38:54AM +0200, Christoph Hellwig wrote: > > > > On Tue, Aug 13, 2019 at

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Dan Williams
On Thu, Aug 15, 2019 at 11:07 AM Jerome Glisse wrote: > > On Wed, Aug 14, 2019 at 07:48:28AM -0700, Dan Williams wrote: > > On Wed, Aug 14, 2019 at 6:28 AM Jason Gunthorpe wrote: > > > > > > On Wed, Aug 14, 2019 at 09:38:54AM +0200, Christoph Hellwig wrote: > > > > On Tue, Aug 13, 2019 at

Re: [PATCH v3 hmm 08/11] drm/radeon: use mmu_notifier_get/put for struct radeon_mn

2019-08-15 Thread Jason Gunthorpe
On Thu, Aug 15, 2019 at 10:28:21AM +0200, Christian König wrote: > Am 07.08.19 um 01:15 schrieb Jason Gunthorpe: > > From: Jason Gunthorpe > > > > radeon is using a device global hash table to track what mmu_notifiers > > have been registered on struct mm. This is better served with the new > >

Re: [PATCH 2/2] drm/amdgpu: enable VCN DPG for Renoir

2019-08-15 Thread Liu, Leo
On 2019-08-15 2:19 p.m., Thai, Thong wrote: > Enable VCN Dynamic Powergating on Renoir devices. > > This will also enable indirect SRAM loading of VCN firmware on Renoir. This will enable indirect SRAM loading for VCN DPG mode initialization. With that fixed, the patch is: Reviewed-by: Leo Liu

Re: [PATCH 1/2] Revert "drm/amdgpu: use direct loading on renoir vcn for the moment"

2019-08-15 Thread Liu, Leo
This patch is: Reviewed-by: Leo Liu On 2019-08-15 2:19 p.m., Thai, Thong wrote: > This reverts commit 69fcd7347f6fb11edc7eaea7c7b9cff0044ce17e. > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 9 +++-- > drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 9 +++-- > 2 files changed, 6

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Jerome Glisse
On Thu, Aug 15, 2019 at 12:36:58PM -0700, Dan Williams wrote: > On Thu, Aug 15, 2019 at 11:07 AM Jerome Glisse wrote: > > > > On Wed, Aug 14, 2019 at 07:48:28AM -0700, Dan Williams wrote: > > > On Wed, Aug 14, 2019 at 6:28 AM Jason Gunthorpe wrote: > > > > > > > > On Wed, Aug 14, 2019 at

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Jerome Glisse
On Thu, Aug 15, 2019 at 01:12:22PM -0700, Dan Williams wrote: > On Thu, Aug 15, 2019 at 12:44 PM Jerome Glisse wrote: > > > > On Thu, Aug 15, 2019 at 12:36:58PM -0700, Dan Williams wrote: > > > On Thu, Aug 15, 2019 at 11:07 AM Jerome Glisse wrote: > > > > > > > > On Wed, Aug 14, 2019 at

[PATCH] mm/hmm: hmm_range_fault handle pages swapped out

2019-08-15 Thread Yang, Philip
hmm_range_fault may return NULL pages because some of pfns are equal to HMM_PFN_NONE. This happens randomly under memory pressure. The reason is for swapped out page pte path, hmm_vma_handle_pte doesn't update fault variable from cpu_flags, so it failed to call hmm_vam_do_fault to swap the page

Re: [PATCH] mm/hmm: hmm_range_fault handle pages swapped out

2019-08-15 Thread Jerome Glisse
On Thu, Aug 15, 2019 at 08:52:56PM +, Yang, Philip wrote: > hmm_range_fault may return NULL pages because some of pfns are equal to > HMM_PFN_NONE. This happens randomly under memory pressure. The reason is > for swapped out page pte path, hmm_vma_handle_pte doesn't update fault > variable

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Jerome Glisse
On Thu, Aug 15, 2019 at 08:41:33PM +, Jason Gunthorpe wrote: > On Thu, Aug 15, 2019 at 04:33:06PM -0400, Jerome Glisse wrote: > > > So nor HMM nor driver should dereference the struct page (i do not > > think any iommu driver would either), > > Er, they do technically deref the struct page:

[PATCH] drm/amdgpu: Set no-retry as default.

2019-08-15 Thread Feifei Xu
This is to improve performance. Signed-off-by: Feifei Xu Tested-by: Candice Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index

Re: [PATCH] drm/amdkfd: Fill the name field in node topology with asic name v2

2019-08-15 Thread Kuehling, Felix
On 2019-08-13 17:21, Zhao, Yong wrote: > The name field in node topology has not been used. We re-purpose it to > hold the asic name, which can be queried by user space applications > through sysfs. > > Change-Id: I74f4f5487db169004a9d27ea15abe99261c86220 > Signed-off-by: Yong Zhao Reviewed-by:

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Dan Williams
On Thu, Aug 15, 2019 at 5:41 PM Jason Gunthorpe wrote: > > On Thu, Aug 15, 2019 at 01:47:12PM -0700, Dan Williams wrote: > > On Thu, Aug 15, 2019 at 1:41 PM Jason Gunthorpe wrote: > > > > > > On Thu, Aug 15, 2019 at 04:33:06PM -0400, Jerome Glisse wrote: > > > > > > > So nor HMM nor driver

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Christoph Hellwig
On Thu, Aug 15, 2019 at 04:33:06PM -0400, Jerome Glisse wrote: > So nor HMM nor driver should dereference the struct page (i do not > think any iommu driver would either), Both current hmm drivers convert the hmm pfn back to a page and eventually call dma_map_page on it. As do the ODP patches

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Christoph Hellwig
On Fri, Aug 16, 2019 at 12:43:07AM +, Jason Gunthorpe wrote: > On Thu, Aug 15, 2019 at 04:51:33PM -0400, Jerome Glisse wrote: > > > struct page. In this case any way we can update the > > nouveau_dmem_page() to check that page page->pgmap == the > > expected pgmap. > > I was also wondering

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Jason Gunthorpe
On Thu, Aug 15, 2019 at 04:33:06PM -0400, Jerome Glisse wrote: > So nor HMM nor driver should dereference the struct page (i do not > think any iommu driver would either), Er, they do technically deref the struct page: nouveau_dmem_convert_pfn(struct nouveau_drm *drm,

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Dan Williams
On Thu, Aug 15, 2019 at 1:41 PM Jason Gunthorpe wrote: > > On Thu, Aug 15, 2019 at 04:33:06PM -0400, Jerome Glisse wrote: > > > So nor HMM nor driver should dereference the struct page (i do not > > think any iommu driver would either), > > Er, they do technically deref the struct page: > >

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Jason Gunthorpe
On Thu, Aug 15, 2019 at 04:51:33PM -0400, Jerome Glisse wrote: > struct page. In this case any way we can update the > nouveau_dmem_page() to check that page page->pgmap == the > expected pgmap. I was also wondering if that is a problem.. just blindly doing a container_of on the page->pgmap does

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Dan Williams
On Thu, Aug 15, 2019 at 12:44 PM Jerome Glisse wrote: > > On Thu, Aug 15, 2019 at 12:36:58PM -0700, Dan Williams wrote: > > On Thu, Aug 15, 2019 at 11:07 AM Jerome Glisse wrote: > > > > > > On Wed, Aug 14, 2019 at 07:48:28AM -0700, Dan Williams wrote: > > > > On Wed, Aug 14, 2019 at 6:28 AM

Re: [PATCH] mm/hmm: hmm_range_fault handle pages swapped out

2019-08-15 Thread Jason Gunthorpe
On Thu, Aug 15, 2019 at 08:52:56PM +, Yang, Philip wrote: > hmm_range_fault may return NULL pages because some of pfns are equal to > HMM_PFN_NONE. This happens randomly under memory pressure. The reason is > for swapped out page pte path, hmm_vma_handle_pte doesn't update fault > variable

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-15 Thread Jason Gunthorpe
On Thu, Aug 15, 2019 at 01:47:12PM -0700, Dan Williams wrote: > On Thu, Aug 15, 2019 at 1:41 PM Jason Gunthorpe wrote: > > > > On Thu, Aug 15, 2019 at 04:33:06PM -0400, Jerome Glisse wrote: > > > > > So nor HMM nor driver should dereference the struct page (i do not > > > think any iommu driver

RE: [PATCH] drm/amdgpu: Set no-retry as default.

2019-08-15 Thread Zhu, Changfeng
Reviewed-by: changzhu -Original Message- From: amd-gfx On Behalf Of Feifei Xu Sent: Friday, August 16, 2019 11:22 AM To: amd-gfx@lists.freedesktop.org Cc: Xu, Feifei ; Li, Candice Subject: [PATCH] drm/amdgpu: Set no-retry as default. This is to improve performance. Signed-off-by: