Re: [PATCH v3 0/8] Support DEVICE_GENERIC memory in migrate_vma_*

2021-06-23 Thread Felix Kuehling
On 2021-06-20 10:14 a.m., Theodore Ts'o wrote: On Thu, Jun 17, 2021 at 10:16:57AM -0500, Alex Sierra wrote: v1: AMD is building a system architecture for the Frontier supercomputer with a coherent interconnect between CPUs and GPUs. This hardware architecture allows the CPUs to coherently

Re: [PATCH 1/2] drm/amdgpu: free pasid early before converting a vm

2021-06-23 Thread Felix Kuehling
On 2021-06-23 8:25 a.m., Nirmoy Das wrote: VM code should not be responsible for freeing pasid as pasid gets allocated outside of VM code, before initializing a vm. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 ++

Re: [PATCH v2 4/4] drm/amdkfd: implement counters for vm fault and migration

2021-06-23 Thread Felix Kuehling
On 2021-06-23 11:02 a.m., Philip Yang wrote: Add helper function to get process device data structure from adev to update counters. Update vm faults, page_in, page_out counters will no be executed in parallel, use WRITE_ONCE to avoid any form of compiler optimizations. Signed-off-by: Philip

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-23 Thread Oded Gabbay
On Wed, Jun 23, 2021 at 10:34 PM Jason Gunthorpe wrote: > > On Wed, Jun 23, 2021 at 10:00:29PM +0300, Oded Gabbay wrote: > > On Wed, Jun 23, 2021 at 9:50 PM Jason Gunthorpe wrote: > > > > > > On Wed, Jun 23, 2021 at 09:43:04PM +0300, Oded Gabbay wrote: > > > > > > > Can you please explain why it

Re: [PATCH 2/2] drm/amdgpu: use xarray for storing pasid in vm

2021-06-23 Thread Das, Nirmoy
On 6/23/2021 5:02 PM, Christian König wrote: Am 23.06.21 um 16:54 schrieb Das, Nirmoy: On 6/23/2021 3:40 PM, Christian König wrote: Am 23.06.21 um 15:11 schrieb Das, Nirmoy: On 6/23/2021 2:50 PM, Christian König wrote: Am 23.06.21 um 14:25 schrieb Nirmoy Das: Replace idr with

Re: [PATCH 2/2] drm/amdgpu: use xarray for storing pasid in vm

2021-06-23 Thread Christian König
Am 23.06.21 um 16:54 schrieb Das, Nirmoy: On 6/23/2021 3:40 PM, Christian König wrote: Am 23.06.21 um 15:11 schrieb Das, Nirmoy: On 6/23/2021 2:50 PM, Christian König wrote: Am 23.06.21 um 14:25 schrieb Nirmoy Das: Replace idr with xarray as we actually need hash functionality.

[PATCH v2 4/4] drm/amdkfd: implement counters for vm fault and migration

2021-06-23 Thread Philip Yang
Add helper function to get process device data structure from adev to update counters. Update vm faults, page_in, page_out counters will no be executed in parallel, use WRITE_ONCE to avoid any form of compiler optimizations. Signed-off-by: Philip Yang ---

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-23 Thread Oded Gabbay
On Wed, Jun 23, 2021 at 9:50 PM Jason Gunthorpe wrote: > > On Wed, Jun 23, 2021 at 09:43:04PM +0300, Oded Gabbay wrote: > > > Can you please explain why it is so important to (allow) access them > > through the CPU ? > > It is not so much important, as it reflects significant design choices >

Re: [PATCH 4/4] drm/amdkfd: implement counters for vm fault and migration

2021-06-23 Thread philip yang
On 2021-06-22 7:31 p.m., Felix Kuehling wrote: Am 2021-06-22 um 9:32 a.m. schrieb Philip Yang: Add helper function to get process device data structure from adev to update counters. Update vm faults, page_in, page_out counters will no be

Re: [PATCH 2/2] drm/amdgpu: use xarray for storing pasid in vm

2021-06-23 Thread Das, Nirmoy
On 6/23/2021 3:40 PM, Christian König wrote: Am 23.06.21 um 15:11 schrieb Das, Nirmoy: On 6/23/2021 2:50 PM, Christian König wrote: Am 23.06.21 um 14:25 schrieb Nirmoy Das: Replace idr with xarray as we actually need hash functionality. Cleanup code related to vm pasid by adding helper

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-23 Thread Oded Gabbay
On Wed, Jun 23, 2021 at 9:24 PM Jason Gunthorpe wrote: > > On Wed, Jun 23, 2021 at 10:57:35AM +0200, Christian König wrote: > > > > > No it isn't. It makes devices depend on allocating struct pages for > > > > their > > > > BARs which is not necessary nor desired. > > > Which dramatically

Re: [PATCH v2 umr 3/3] Enhance printing of page tables in AI+

2021-06-23 Thread StDenis, Tom
[AMD Official Use Only] Tested and pushed out to main. Thanks, Tom From: Greathouse, Joseph Sent: Monday, June 21, 2021 12:37 To: amd-gfx@lists.freedesktop.org Cc: StDenis, Tom; Greathouse, Joseph Subject: [PATCH v2 umr 3/3] Enhance printing of page

Re: [PATCH 2/2] drm/amdgpu: use xarray for storing pasid in vm

2021-06-23 Thread Christian König
Am 23.06.21 um 15:11 schrieb Das, Nirmoy: On 6/23/2021 2:50 PM, Christian König wrote: Am 23.06.21 um 14:25 schrieb Nirmoy Das: Replace idr with xarray as we actually need hash functionality. Cleanup code related to vm pasid by adding helper function. Signed-off-by: Nirmoy Das ---  

Re: [PATCH 2/2] drm/amdgpu: use xarray for storing pasid in vm

2021-06-23 Thread Das, Nirmoy
On 6/23/2021 2:50 PM, Christian König wrote: Am 23.06.21 um 14:25 schrieb Nirmoy Das: Replace idr with xarray as we actually need hash functionality. Cleanup code related to vm pasid by adding helper function. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 134

[PATCH 2/2] drm/amdgpu: use xarray for storing pasid in vm

2021-06-23 Thread Nirmoy Das
Replace idr with xarray as we actually need hash functionality. Cleanup code related to vm pasid by adding helper function. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 134 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 +- 2 files changed, 60

[PATCH 1/2] drm/amdgpu: free pasid early before converting a vm

2021-06-23 Thread Nirmoy Das
VM code should not be responsible for freeing pasid as pasid gets allocated outside of VM code, before initializing a vm. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 - 2 files changed, 6

Re: [PATCH 2/2] drm/amdgpu: use xarray for storing pasid in vm

2021-06-23 Thread Christian König
Am 23.06.21 um 14:25 schrieb Nirmoy Das: Replace idr with xarray as we actually need hash functionality. Cleanup code related to vm pasid by adding helper function. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 134 +++--

Re: [PATCH 1/2] drm/amdgpu: free pasid early before converting a vm

2021-06-23 Thread Christian König
Am 23.06.21 um 14:25 schrieb Nirmoy Das: VM code should not be responsible for freeing pasid as pasid gets allocated outside of VM code, before initializing a vm. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 ++

Re: [PATCH 1/1] drm/amdgpu: cleanup pasid handling

2021-06-23 Thread Das, Nirmoy
On 6/23/2021 10:23 AM, Christian König wrote: Am 23.06.21 um 09:56 schrieb Nirmoy Das: Cleanup code related to vm pasid by adding helper functions. Also replace idr with xarray as we actually need hash functionality. That looks quite a bit better than before, but I think we should approach

Re: [PATCH v3] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64

2021-06-23 Thread Christian König
Looks good to me. Somebody could try to investigate further why that is necessary on the platform, but radeon is only in maintenance mode without new feature developed. Regards, Christian. Am 23.06.21 um 10:14 schrieb Tiezhu Yang: Hi Alex and Christian, Any comments? Can this patch be

Re: [PATCH 1/1] drm/amdgpu: cleanup pasid handling

2021-06-23 Thread Christian König
Am 23.06.21 um 09:56 schrieb Nirmoy Das: Cleanup code related to vm pasid by adding helper functions. Also replace idr with xarray as we actually need hash functionality. That looks quite a bit better than before, but I think we should approach it differently. First of all make a patch

Re: [PATCH v2 04/22] drm: Don't test for IRQ support in VBLANK ioctls

2021-06-23 Thread Liviu Dudau
Hi Thomas, On Wed, Jun 23, 2021 at 08:43:07AM +0200, Thomas Zimmermann wrote: > Hi Liviu > > Am 22.06.21 um 17:25 schrieb Liviu Dudau: > > Hello, > > > > On Tue, Jun 22, 2021 at 04:09:44PM +0200, Thomas Zimmermann wrote: > > > For KMS drivers, replace the IRQ check in VBLANK ioctls with a check

[PATCH 1/1] drm/amdgpu: cleanup pasid handling

2021-06-23 Thread Nirmoy Das
Cleanup code related to vm pasid by adding helper functions. Also replace idr with xarray as we actually need hash functionality. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 130 - drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 +- 2 files

Re: [PATCH v4 15/17] drm/uAPI: Move "Broadcast RGB" property from driver specific to general context

2021-06-23 Thread Pekka Paalanen
On Wed, 23 Jun 2021 12:10:14 +0200 Werner Sembach wrote: > Am 23.06.21 um 09:48 schrieb Pekka Paalanen: > > On Tue, 22 Jun 2021 11:57:53 +0200 > > Werner Sembach wrote: > > > >> Am 22.06.21 um 09:25 schrieb Pekka Paalanen: > >>> On Fri, 18 Jun 2021 11:11:14 +0200 > >>> Werner Sembach

Re: [PATCH v4 09/17] drm/uAPI: Add "active color range" drm property as feedback for userspace

2021-06-23 Thread Werner Sembach
Am 23.06.21 um 13:14 schrieb Pekka Paalanen: > On Wed, 23 Jun 2021 12:17:40 +0200 > Werner Sembach wrote: > >> Am 23.06.21 um 09:32 schrieb Pekka Paalanen: >>> On Tue, 22 Jun 2021 11:48:52 + >>> Simon Ser wrote: >>> On Tuesday, June 22nd, 2021 at 11:50, Werner Sembach wrote:

Re: [PATCH v4 09/17] drm/uAPI: Add "active color range" drm property as feedback for userspace

2021-06-23 Thread Pekka Paalanen
On Wed, 23 Jun 2021 12:17:40 +0200 Werner Sembach wrote: > Am 23.06.21 um 09:32 schrieb Pekka Paalanen: > > On Tue, 22 Jun 2021 11:48:52 + > > Simon Ser wrote: > > > >> On Tuesday, June 22nd, 2021 at 11:50, Werner Sembach > >> wrote: > >> > >>> Unknown is when no monitor is connected

Re: [PATCH v2] drm/radeon: Fix NULL dereference when updating memory stats

2021-06-23 Thread Christian König
Am 22.06.21 um 23:26 schrieb Mikel Rychliski: radeon_ttm_bo_destroy() is attempting to access the resource object to update memory counters. However, the resource object is already freed when ttm calls this function via the destroy callback. This causes an oops when a bo is freed: BUG:

Re: [PATCH 1/1] amdgpu/pm: remove code duplication in show_power_cap calls

2021-06-23 Thread Wang, Kevin(Yang)
[AMD Official Use Only] Reviewed-by: Kevin Wang Best Regards, Kevin From: Powell, Darren Sent: Wednesday, June 23, 2021 10:34 AM To: amd-gfx@lists.freedesktop.org Cc: Powell, Darren Subject: [PATCH 1/1] amdgpu/pm: remove code duplication in show_power_cap

Re: [PATCH v4 09/17] drm/uAPI: Add "active color range" drm property as feedback for userspace

2021-06-23 Thread Werner Sembach
Am 23.06.21 um 09:32 schrieb Pekka Paalanen: > On Tue, 22 Jun 2021 11:48:52 + > Simon Ser wrote: > >> On Tuesday, June 22nd, 2021 at 11:50, Werner Sembach >> wrote: >> >>> Unknown is when no monitor is connected or is when the >>> connector/monitor is disabled. >> I think the other

Re: [PATCH v4 15/17] drm/uAPI: Move "Broadcast RGB" property from driver specific to general context

2021-06-23 Thread Werner Sembach
Am 23.06.21 um 09:48 schrieb Pekka Paalanen: > On Tue, 22 Jun 2021 11:57:53 +0200 > Werner Sembach wrote: > >> Am 22.06.21 um 09:25 schrieb Pekka Paalanen: >>> On Fri, 18 Jun 2021 11:11:14 +0200 >>> Werner Sembach wrote: >>> Add "Broadcast RGB" to general drm context so that more drivers

Re: [PATCH v4 17/17] drm/amd/display: Add handling for new "Broadcast RGB" property

2021-06-23 Thread Werner Sembach
Am 23.06.21 um 10:01 schrieb Pekka Paalanen: > On Tue, 22 Jun 2021 11:28:57 +0200 > Werner Sembach wrote: > >> Am 22.06.21 um 09:29 schrieb Pekka Paalanen: >>> On Fri, 18 Jun 2021 11:11:16 +0200 >>> Werner Sembach wrote: >>> This commit implements the "Broadcast RGB" drm property for the

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-23 Thread Oded Gabbay
On Wed, Jun 23, 2021 at 11:57 AM Christian König wrote: > > Am 22.06.21 um 18:05 schrieb Jason Gunthorpe: > > On Tue, Jun 22, 2021 at 05:48:10PM +0200, Christian König wrote: > >> Am 22.06.21 um 17:40 schrieb Jason Gunthorpe: > >>> On Tue, Jun 22, 2021 at 05:29:01PM +0200, Christian König wrote:

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-23 Thread Christian König
Am 22.06.21 um 18:05 schrieb Jason Gunthorpe: On Tue, Jun 22, 2021 at 05:48:10PM +0200, Christian König wrote: Am 22.06.21 um 17:40 schrieb Jason Gunthorpe: On Tue, Jun 22, 2021 at 05:29:01PM +0200, Christian König wrote: [SNIP] No absolutely not. NVidia GPUs work exactly the same way. And

Re: [PATCH 5/6] drm/amdgpu: Fix BUG_ON assert

2021-06-23 Thread Christian König
Am 22.06.21 um 18:23 schrieb Andrey Grodzovsky: With added CPU domain to placement you can have now 3 placemnts at once. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König And please add CC: sta...@kernel.org since this is trigger able from userspace and actually a rather

Re: [PATCH 6/6] drm/ttm: Fix multihop assert on eviction.

2021-06-23 Thread Christian König
Am 22.06.21 um 18:23 schrieb Andrey Grodzovsky: Problem: Under memory pressure when GTT domain is almost full multihop assert will come up when trying to evict LRU BO from VRAM to SYSTEM. Fix: Don't assert on multihop error in evict code but rather do a retry as we do in ttm_bo_move_buffer

Re: [PATCH v4 17/17] drm/amd/display: Add handling for new "Broadcast RGB" property

2021-06-23 Thread Pekka Paalanen
On Tue, 22 Jun 2021 11:28:57 +0200 Werner Sembach wrote: > Am 22.06.21 um 09:29 schrieb Pekka Paalanen: > > On Fri, 18 Jun 2021 11:11:16 +0200 > > Werner Sembach wrote: > > > >> This commit implements the "Broadcast RGB" drm property for the AMD GPU > >> driver. > >> > >> Signed-off-by:

Re: [PATCH v4 15/17] drm/uAPI: Move "Broadcast RGB" property from driver specific to general context

2021-06-23 Thread Pekka Paalanen
On Tue, 22 Jun 2021 11:57:53 +0200 Werner Sembach wrote: > Am 22.06.21 um 09:25 schrieb Pekka Paalanen: > > On Fri, 18 Jun 2021 11:11:14 +0200 > > Werner Sembach wrote: > > > >> Add "Broadcast RGB" to general drm context so that more drivers besides > >> i915 and gma500 can implement it

Re: [PATCH v4 09/17] drm/uAPI: Add "active color range" drm property as feedback for userspace

2021-06-23 Thread Pekka Paalanen
On Tue, 22 Jun 2021 11:48:52 + Simon Ser wrote: > On Tuesday, June 22nd, 2021 at 11:50, Werner Sembach > wrote: > > > Unknown is when no monitor is connected or is when the > > connector/monitor is disabled. > > I think the other connector props (link-status, non-desktop, etc) don't >

Re: New uAPI for color management proposal and feedback request

2021-06-23 Thread Pekka Paalanen
On Tue, 22 Jun 2021 19:06:43 +0200 Werner Sembach wrote: > Am 19.05.21 um 11:34 schrieb Pekka Paalanen: > > On Wed, 12 May 2021 16:04:16 +0300 > > Ville Syrjälä wrote: > > > >> On Wed, May 12, 2021 at 02:06:56PM +0200, Werner Sembach wrote: > >>> Hello, > >>> > >>> In addition to the

Re: [PATCH] drm/amdgpu: enable tmz on yellow carp

2021-06-23 Thread Huang Rui
On Wed, Jun 23, 2021 at 10:10:09AM +0800, Liu, Aaron wrote: > The tmz functions are verified on yellow carp. So enable it by > default. > > Signed-off-by: Aaron Liu Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

[PATCH] SWDEV-254814 drm/amdgpu: Restore msix after FLR

2021-06-23 Thread Peng Ju Zhou
From: "Emily.Deng" After FLR, the msix will be cleared, so need to re-enable it. Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c

Re: [PATCH V3 1/7] drm/amdgpu: correct tcp harvest setting

2021-06-23 Thread Michel Dänzer
On 2021-06-22 12:40 p.m., Lazar, Lijo wrote: > On 6/22/2021 2:49 PM, Michel Dänzer wrote: >> On 2021-06-22 8:08 a.m., Lazar, Lijo wrote: >>> [Public] >>> >>> AFAIK, that expression is legal (some code analyzer may warn on value of >>> 4*max_wgp_per_sh); similar kind is used in rotate shift

Re: [PATCH v2 00/22] Deprecate struct drm_device.irq_enabled

2021-06-23 Thread Thomas Zimmermann
Am 22.06.21 um 18:11 schrieb Laurent Pinchart: Hi Thomas, Thank you for the patches. On Tue, Jun 22, 2021 at 04:09:40PM +0200, Thomas Zimmermann wrote: Remove references to struct drm_device.irq_enabled from modern DRM drivers and core. KMS drivers enable IRQs for their devices internally.

Re: [PATCH v2 09/22] drm/imx: Don't set struct drm_device.irq_enabled

2021-06-23 Thread Laurentiu Palcu
Hi Thomas, On Tue, Jun 22, 2021 at 04:09:49PM +0200, Thomas Zimmermann wrote: > The field drm_device.irq_enabled is only used by legacy drivers > with userspace modesetting. Don't set it in imx. > > Signed-off-by: Thomas Zimmermann > --- > drivers/gpu/drm/imx/dcss/dcss-kms.c | 3 --- Not sure

Re: [PATCH v2 04/22] drm: Don't test for IRQ support in VBLANK ioctls

2021-06-23 Thread Thomas Zimmermann
Hi Liviu Am 22.06.21 um 17:25 schrieb Liviu Dudau: Hello, On Tue, Jun 22, 2021 at 04:09:44PM +0200, Thomas Zimmermann wrote: For KMS drivers, replace the IRQ check in VBLANK ioctls with a check for vblank support. IRQs might be enabled wthout vblanking being supported. This change also

[PATCH 1/1] amdgpu/pm: remove code duplication in show_power_cap calls

2021-06-23 Thread Darren Powell
v2: reorder to check pointers before calling pm_runtime_* functions created generic function and call with enum from * amdgpu_hwmon_show_power_cap_max * amdgpu_hwmon_show_power_cap * amdgpu_hwmon_show_power_cap_default === Test === AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d "

[PATCH] drm/amdgpu: enable tmz on yellow carp

2021-06-23 Thread Aaron Liu
The tmz functions are verified on yellow carp. So enable it by default. Signed-off-by: Aaron Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index

RE: [PATCH V3 1/7] drm/amdgpu: correct tcp harvest setting

2021-06-23 Thread Quan, Evan
[AMD Official Use Only] Thanks for the information. I will use 0xu then. BR Evan > -Original Message- > From: Lazar, Lijo > Sent: Tuesday, June 22, 2021 6:40 PM > To: Michel Dänzer ; Quan, Evan > > Cc: Deucher, Alexander ; amd- > g...@lists.freedesktop.org > Subject: Re: [PATCH