RE: [PATCH] drm/amd/pm: enable ASPM by default

2021-05-11 Thread Chen, Jiansong (Simon)
[AMD Official Use Only - Internal Distribution Only] Better to make the commit msg more specific, eg. Change predicate accordingly since aspm is enabled by default. Either way, Reviewed-by: Jiansong Chen Regards, Jiansong -Original Message- From: amd-gfx On Behalf Of Kenneth Feng Sent

Re: [PATCH] drm/ttm: use dma_alloc_pages for the page pool

2021-05-11 Thread Christian König
Am 11.05.21 um 08:05 schrieb Christoph Hellwig: Use the dma_alloc_pages allocator for the TTM pool allocator. This allocator is a front end to the page allocator which takes the DMA mask of the device into account, thus offering the best of both worlds of the two existing allocator versions. Thi

Re: [PATCH] drm/amd/pm: enable ASPM by default

2021-05-11 Thread Ernst Sjöstrand
You could even write why it was disabled before and why you can enable it now again in the commit message. Regards //Ernst Den tis 11 maj 2021 kl 09:25 skrev Chen, Jiansong (Simon) < jiansong.c...@amd.com>: > [AMD Official Use Only - Internal Distribution Only] > > Better to make the commit msg

Re: [PATCH v2] drm/radeon/dpm: Disable sclk switching on Oland when two 4K 60Hz monitors are connected

2021-05-11 Thread Kai-Heng Feng
On Fri, Apr 30, 2021 at 12:57 PM Kai-Heng Feng wrote: > > Screen flickers rapidly when two 4K 60Hz monitors are in use. This issue > doesn't happen when one monitor is 4K 60Hz (pixelclock 594MHz) and > another one is 4K 30Hz (pixelclock 297MHz). > > The issue is gone after setting "power_dpm_force

Re: [PATCH v2] drm/amd/display: Fix two cursor duplication when using overlay

2021-05-11 Thread youling 257
I using linux kernel 5.13 rc1, has "drm/amd/display: Reject non-zero src_y and src_x for video planes" patch, git bisect bad commit is "drm/amd/display: Fix two cursor duplication when using overlay", i build kernel 5.13 many times, reboot test many times. 2021-05-11 8:37 GMT+08:00, Rodrigo Siquei

[PATCH] drm/ttm: use dma_alloc_pages for the page pool

2021-05-11 Thread Christoph Hellwig
Use the dma_alloc_pages allocator for the TTM pool allocator. This allocator is a front end to the page allocator which takes the DMA mask of the device into account, thus offering the best of both worlds of the two existing allocator versions. This conversion also removes the ugly layering violat

RFC: use dma_alloc_noncoherent in ttm_pool_alloc_page

2021-05-11 Thread Christoph Hellwig
Hi all, the memory allocation for the TTM pool is a big mess with two allocation methods that both have issues, a layering violation and odd guessing of pools in the callers. This patch switches to the dma_alloc_noncoherent API instead fixing all of the above issues. Warning: i don't have any o

Re: [PATCH] drm/amdgpu: Align serial size in drm_amdgpu_info_vbios

2021-05-11 Thread Christian König
Marek and other userspace folks need to decide that. Basic question here is if Mesa is already accessing sysfs nodes for OpenGL or RADV. If that is the case then we should probably expose the information there as well. If that isn't the case (which I think it is) then we should implement it

Re: [PATCH 2/2] drm/amdgpu: fix fence calculation

2021-05-11 Thread Christian König
Am 10.05.21 um 22:29 schrieb David M Nieto: The proper metric for fence utilization over several contexts is an harmonic mean, but such calculation is prohibitive in kernel space, so the code approximates it. Because the approximation diverges when one context has a very small ratio compared wit

[PATCH] drm/amdkfd: refine the poison data consumption handling

2021-05-11 Thread Dennis Li
The user applications maybe register the KFD_EVENT_TYPE_HW_EXCEPTION and KFD_EVENT_TYPE_MEMORY events, driver could notify them when poison data consumed. Beside that, some applications maybe register SIGBUS signal hander. These applications will handle poison data by themselves, exit or re-create

Re: [PATCH] drm/amd/display: Expose active display color configurations to userspace

2021-05-11 Thread Pekka Paalanen
On Mon, 10 May 2021 17:47:01 -0400 Alex Deucher wrote: > On Fri, May 7, 2021 at 3:27 PM Werner Sembach > wrote: > > > > xrandr --prop and other userspace info tools have currently no way of > > telling which color configuration is used on HDMI and DP ports. > > > > The ongoing transsition from

Re: [PATCH] drm/amdgpu: Align serial size in drm_amdgpu_info_vbios

2021-05-11 Thread Marek Olšák
Mesa doesn't use sysfs. Note that this is a uapi, meaning that once it's in the kernel, it can't be changed like that. What's the use case for this new interface? Isn't it partially redundant with the current device info structure, which seems to have the equivalent of dev_id and rev_id? Marek

Re: [PATCH] drm/ttm: use dma_alloc_pages for the page pool

2021-05-11 Thread Christian König
Am 11.05.21 um 10:50 schrieb Christoph Hellwig: On Tue, May 11, 2021 at 09:35:20AM +0200, Christian König wrote: We certainly going to need the drm_need_swiotlb() for userptr support (unless we add some approach for drivers to opt out of swiotlb). swiotlb use is driven by three things: 1) ad

Re: [PATCH] drm/amd/display: Expose active display color configurations to userspace

2021-05-11 Thread Werner Sembach
Am 11.05.21 um 10:07 schrieb Pekka Paalanen: > On Mon, 10 May 2021 17:47:01 -0400 > Alex Deucher wrote: > >> On Fri, May 7, 2021 at 3:27 PM Werner Sembach >> wrote: >>> xrandr --prop and other userspace info tools have currently no way of >>> telling which color configuration is used on HDMI and

[PATCH] drm/amd/amdgpu: psp program IH_RB_CTRL on navi12 and navi21

2021-05-11 Thread YuBiao Wang
[Why] IH_RB_CNTL is blocked by PSP so we need to ask psp to help config it. [How] Move psp ip block before ih, and use psp to program IH_RB_CNTL under sriov. Signed-off-by: YuBiao Wang --- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 20 ++-- drivers/gpu/drm/amd/amdgpu/nv.c|

Re: [PATCH] drm/amd/display: Expose active display color configurations to userspace

2021-05-11 Thread Pekka Paalanen
On Tue, 11 May 2021 12:03:30 +0200 Werner Sembach wrote: > Am 11.05.21 um 10:07 schrieb Pekka Paalanen: > > On Mon, 10 May 2021 17:47:01 -0400 > > Alex Deucher wrote: > > > >> On Fri, May 7, 2021 at 3:27 PM Werner Sembach > >> wrote: > >>> xrandr --prop and other userspace info tools have

[PATCH] drm/amd/pm: Update aldebaran pmfw interface

2021-05-11 Thread Lazar, Lijo
[AMD Public Use] Update aldebaran driver-PMFW interface to version 0x07 Signed-off-by: Lijo Lazar lijo.la...@amd.com --- drivers/gpu/drm/amd/pm/inc/smu13_driver_if_aldebaran.h | 7 +-- drivers/gpu/drm/amd/pm/inc/smu_v13_0.h | 2 +- 2 files changed,

RE: [PATCH] drm/amd/pm: Update aldebaran pmfw interface

2021-05-11 Thread Zhang, Hawking
[AMD Public Use] Reviewed-by: Hawking Zhang Regards, Hawking _ From: Lazar, Lijo Sent: Tuesday, May 11, 2021 20:30 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Xu, Feifei ; Wang, Kevin(Yang) Subject: [PATCH] drm/amd/pm: Update aldebaran pm

Re: [PATCH] drm/amdgpu: Field type update in drm_amdgpu_info_vbios

2021-05-11 Thread Deucher, Alexander
[AMD Official Use Only - Internal Distribution Only] Please update the umr patch as well. Acked-by: Alex Deucher From: amd-gfx on behalf of Jiawei Gu Sent: Tuesday, May 11, 2021 1:31 AM To: amd-gfx@lists.freedesktop.org Cc: StDenis, Tom ; Gu, JiaWei (Will) ;

Re: [PATCH v6 04/16] drm/amdkfd: Split kfd suspend from devie exit

2021-05-11 Thread Deucher, Alexander
[AMD Public Use] Typo in the subject: devie > device Alex From: Grodzovsky, Andrey Sent: Monday, May 10, 2021 12:36 PM To: dri-de...@lists.freedesktop.org ; amd-gfx@lists.freedesktop.org ; linux-...@vger.kernel.org ; ckoenig.leichtzumer...@gmail.com ; daniel.

Re: [PATCH] drm/ttm: use dma_alloc_pages for the page pool

2021-05-11 Thread Christoph Hellwig
On Tue, May 11, 2021 at 09:35:20AM +0200, Christian König wrote: > We certainly going to need the drm_need_swiotlb() for userptr support > (unless we add some approach for drivers to opt out of swiotlb). swiotlb use is driven by three things: 1) addressing limitations of the device 2) addressi

Re: [PATCH] drm/amdkfd: refine the poison data consumption handling

2021-05-11 Thread Felix Kuehling
Am 2021-05-11 um 4:06 a.m. schrieb Dennis Li: > The user applications maybe register the KFD_EVENT_TYPE_HW_EXCEPTION and I guess the HW exception event is sent because the current handling of poison consumption triggers a mode2 reset. If that can be removed in the future, then we should not send a

Re: [PATCH] drm/amdgpu: Align serial size in drm_amdgpu_info_vbios

2021-05-11 Thread Deucher, Alexander
[AMD Public Use] It's being used by umr and some other smi tools to provide vbios information for debugging. Alex From: amd-gfx on behalf of Marek Olšák Sent: Tuesday, May 11, 2021 4:18 AM To: Christian König Cc: Kees Cook ; Gu, JiaWei (Will) ; amd-gfx list

Re: [PATCH] drm/amdgpu: Align serial size in drm_amdgpu_info_vbios

2021-05-11 Thread Christian König
Yeah, but umr is making strong use of sysfs as well. The only justification of this interface would be if we want to use it in Mesa. And I agree with Marek that looks redundant with the device structure to me as well. Christian. Am 11.05.21 um 16:04 schrieb Deucher, Alexander: [AMD Publi

Re: [PATCH v6 01/16] drm/ttm: Remap all page faults to per process dummy page.

2021-05-11 Thread Andrey Grodzovsky
On 2021-05-11 2:38 a.m., Christian König wrote: Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: On device removal reroute all CPU mappings to dummy page. v3: Remove loop to find DRM file and instead access it by vma->vm_file->private_data. Move dummy page installation into a separate function.

Re: [PATCH v6 04/16] drm/amdkfd: Split kfd suspend from devie exit

2021-05-11 Thread Andrey Grodzovsky
On 2021-05-11 2:40 a.m., Christian König wrote: Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: Helps to expdite HW related stuff to amdgpu_pci_remove Signed-off-by: Andrey Grodzovsky ---   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +-   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 +-

Re: [PATCH v6 01/16] drm/ttm: Remap all page faults to per process dummy page.

2021-05-11 Thread Christian König
Am 11.05.21 um 16:44 schrieb Andrey Grodzovsky: On 2021-05-11 2:38 a.m., Christian König wrote: Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: On device removal reroute all CPU mappings to dummy page. v3: Remove loop to find DRM file and instead access it by vma->vm_file->private_data. Mov

Re: [PATCH 2/2] drm/amdkfd: unregistered range accessible by all GPUs

2021-05-11 Thread philip yang
On 2021-05-10 8:56 a.m., Felix Kuehling wrote: Am 2021-05-07 um 3:07 p.m. schrieb Philip Yang: New range is created to recover retry vm fault, set all GPUs have access to the range. The new range preferred_loc is default value KFD_IOCTL_SVM_LO

[PATCH v2 2/2] drm/amdkfd: new range accessible by all GPUs

2021-05-11 Thread Philip Yang
If xnack is on, new range is created to recover retry vm fault or created by SVM API calls, set all GPUs have access to the range. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/

Re: [PATCH v2 2/2] drm/amdkfd: new range accessible by all GPUs

2021-05-11 Thread Felix Kuehling
Am 2021-05-11 um 11:15 a.m. schrieb Philip Yang: > If xnack is on, new range is created to recover retry vm fault or > created by SVM API calls, set all GPUs have access to the range. > > Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling > --- > drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 12

[PATCH 2/2] drm/amdgpu/display: restore the backlight on modeset (v2)

2021-05-11 Thread Alex Deucher
To stay consistent with the user's setting. v2: rebase on multi-eDP support Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1337 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/d

[PATCH 1/2] drm/amdgpu/display: add helper functions to get/set backlight (v2)

2021-05-11 Thread Alex Deucher
And cache the value. These can be used by the backlight callbacks and modesetting functions. v2: rebase on latest backlight changes. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1337 Signed-off-by: Alex Deucher --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 42 ++-

Re: [PATCH v6 06/16] drm/amdgpu: Handle IOMMU enabled case.

2021-05-11 Thread Andrey Grodzovsky
On 2021-05-11 2:44 a.m., Christian König wrote: Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: Handle all DMA IOMMU gropup related dependencies before the group is removed. v5: Drop IOMMU notifier and switch to lockless call to ttm_tt_unpopulate v6: Drop the BO unamp list Signed-off-by: And

Re: [RFC] Add BPF_PROG_TYPE_CGROUP_IOCTL

2021-05-11 Thread Alex Deucher
On Fri, May 7, 2021 at 7:45 PM Tejun Heo wrote: > > Hello, > > On Fri, May 07, 2021 at 06:30:56PM -0400, Alex Deucher wrote: > > Maybe we are speaking past each other. I'm not following. We got > > here because a device specific cgroup didn't make sense. With my > > Linux user hat on, that make

Re: [PATCH v6 06/16] drm/amdgpu: Handle IOMMU enabled case.

2021-05-11 Thread Alex Deucher
On Mon, May 10, 2021 at 12:37 PM Andrey Grodzovsky wrote: > > Handle all DMA IOMMU gropup related dependencies before the > group is removed. > > v5: Drop IOMMU notifier and switch to lockless call to ttm_tt_unpopulate > v6: Drop the BO unamp list > > Signed-off-by: Andrey Grodzovsky > --- > dri

Re: [PATCH v6 06/16] drm/amdgpu: Handle IOMMU enabled case.

2021-05-11 Thread Andrey Grodzovsky
On 2021-05-11 11:56 a.m., Alex Deucher wrote: On Mon, May 10, 2021 at 12:37 PM Andrey Grodzovsky wrote: Handle all DMA IOMMU gropup related dependencies before the group is removed. v5: Drop IOMMU notifier and switch to lockless call to ttm_tt_unpopulate v6: Drop the BO unamp list Signed-

Re: [PATCH] drm/amdgpu: Align serial size in drm_amdgpu_info_vbios

2021-05-11 Thread Nieto, David M
[AMD Public Use] The point of having the device ID in the structure is because we are reading it from the VBIOS header, not the asic registers. They should match, but an user may flash a VBIOS for a different devid and they may not match. Regarding sysfs vs ioctl I see value in providing it in

[PATCH] drm/amdgpu: fix uninitialized return value

2021-05-11 Thread ts8060
The amdgpu_display_suspend_helper() function uses an uninitialized variable as its return value, causing a failure to suspend/resume on a Radeon R7 240/340 GPU, with the following error in dmesg: [drm:amdgpu_device_ip_suspend_phase1 [amdgpu]] *ERROR* suspend of IP block failed 118489088 Initiali

Re: [PATCH v6 10/16] drm/amdgpu: Guard against write accesses after device removal

2021-05-11 Thread Andrey Grodzovsky
On 2021-05-11 2:50 a.m., Christian König wrote: Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: This should prevent writing to memory or IO ranges possibly already allocated for other uses after our device is removed. v5: Protect more places wher memcopy_to/form_io takes place Protect IB subm

Re: [PATCH] drm/amdgpu: fix uninitialized return value

2021-05-11 Thread Alex Deucher
On Tue, May 11, 2021 at 1:25 PM ts8060 wrote: > > The amdgpu_display_suspend_helper() function uses an uninitialized > variable as its return value, causing a failure to suspend/resume on a > Radeon R7 240/340 GPU, with the following error in dmesg: > [drm:amdgpu_device_ip_suspend_phase1 [amdgpu]]

Re: [PATCH 2/2] drm/amdgpu: fix fence calculation

2021-05-11 Thread Nieto, David M
[AMD Official Use Only - Internal Distribution Only] The local variables need to be initialized to zero, since amdgpu_ctx_fence_time accumulates and does not initialize David From: Christian König Sent: Tuesday, May 11, 2021 12:53 AM To: Nieto, David M ; amd-gfx

[PATCH 2/2] drm/amdgpu: fix fence calculation

2021-05-11 Thread David M Nieto
The proper metric for fence utilization over several contexts is an harmonic mean, but such calculation is prohibitive in kernel space, so the code approximates it. Because the approximation diverges when one context has a very small ratio compared with the other context, this change filter out ra

[PATCH 1/2] drm/amdgpu: free resources on fence usage query

2021-05-11 Thread David M Nieto
Free the resources if the fence needs to be ignored during the ratio calculation Signed-off-by: David M Nieto Change-Id: Ibfc55a94c53d4b3a1dba8fff4c53fd893195bb96 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/d

Re: [PATCH v2] drm/radeon/dpm: Disable sclk switching on Oland when two 4K 60Hz monitors are connected

2021-05-11 Thread Alex Deucher
On Mon, May 10, 2021 at 11:33 PM Kai-Heng Feng wrote: > > On Fri, Apr 30, 2021 at 12:57 PM Kai-Heng Feng > wrote: > > > > Screen flickers rapidly when two 4K 60Hz monitors are in use. This issue > > doesn't happen when one monitor is 4K 60Hz (pixelclock 594MHz) and > > another one is 4K 30Hz (pix

[PATCH] drm/amdgpu: Register bad page handler for Aldebaran

2021-05-11 Thread Mukul Joshi
On Aldebaran, GPU driver will handle bad page retirement even though UMC is host managed. As a result, register a bad page retirement handler on the mce notifier chain to retire bad pages on Aldebaran. Signed-off-by: Mukul Joshi Reviewed-by: John Clements Acked-by: Felix Kuehling --- drivers/g

[PATCH] drm/amdgpu: Add compile flag for securedisplay

2021-05-11 Thread Jinzhou Su
Add compile flag CONFIG_DEBUG_FS to clear the warning: unused variable 'amdgpu_securedisplay_debugfs_ops' Signed-off-by: Jinzhou Su --- drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c b/d

[PATCH] drm/amd/amdgpu: psp program IH_RB_CTRL on navi12 and sienna_cichlid

2021-05-11 Thread YuBiao Wang
[Why] IH_RB_CNTL is blocked by PSP so we need to ask psp to help config it. [How] Move psp ip block before ih, and use psp to program IH_RB_CNTL under sriov. Signed-off-by: YuBiao Wang --- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 20 ++-- drivers/gpu/drm/amd/amdgpu/nv.c|

Re: [PATCH] drm/amdgpu: Add compile flag for securedisplay

2021-05-11 Thread Deucher, Alexander
[AMD Official Use Only - Internal Distribution Only] Acked-by: Alex Deucher From: amd-gfx on behalf of Jinzhou Su Sent: Tuesday, May 11, 2021 9:51 PM To: amd-gfx@lists.freedesktop.org Cc: Su, Jinzhou (Joe) ; Huang, Ray Subject: [PATCH] drm/amdgpu: Add compile

[PATCH] add vbios info query

2021-05-11 Thread Jiawei Gu
Signed-off-by: Jiawei Gu --- src/app/CMakeLists.txt | 1 + src/app/main.c | 8 + src/app/vbios.c| 58 ++ src/lib/lowlevel/linux/query_drm.c | 11 ++ src/umr.h | 15 src/umra

Re: [PATCH] drm/amdgpu: Add compile flag for securedisplay

2021-05-11 Thread Huang Rui
On Wed, May 12, 2021 at 09:51:21AM +0800, Su, Jinzhou (Joe) wrote: > Add compile flag CONFIG_DEBUG_FS to clear the warning: > unused variable 'amdgpu_securedisplay_debugfs_ops' > > Signed-off-by: Jinzhou Su According to the 0 day's robot mail, please feel free to add below reported-by:

RE: [PATCH] drm/amdgpu: Field type update in drm_amdgpu_info_vbios

2021-05-11 Thread Gu, JiaWei (Will)
[AMD Official Use Only - Internal Distribution Only] Done. UMR patch sent out. Hi Tom, Please help review it to bring the umr part back. Thanks in advance! Jiawei From: Deucher, Alexander Sent: Tuesday, May 11, 2021 9:16 PM To: Gu, JiaWei (Will) ; amd-gfx@lists.freedesktop.org Cc: StDenis, To

Re: [PATCH 2/2] drm/amdgpu: fix fence calculation

2021-05-11 Thread Christian König
In this case amdgpu_ctx_fence_time should probably be changed to initialize the variable itself. That is really bad coding style otherwise. Christian. Am 11.05.21 um 20:14 schrieb Nieto, David M: [AMD Official Use Only - Internal Distribution Only] The local variables need to be initialize

Re: [PATCH 2/2] drm/amdgpu: fix fence calculation

2021-05-11 Thread Christian König
And BTW amdgpu_ctx_fence_time() should probably be static. Christian. Am 12.05.21 um 08:55 schrieb Christian König: In this case amdgpu_ctx_fence_time should probably be changed to initialize the variable itself. That is really bad coding style otherwise. Christian. Am 11.05.21 um 20:14 sch