RE: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14

2019-11-01 Thread Wu, Hersen
Reviewed-by: Hersen Wu -Original Message- From: Liu, Zhan Sent: Friday, November 1, 2019 9:35 PM To: Wu, Hersen ; amd-gfx@lists.freedesktop.org; Kazlauskas, Nicholas ; Lakha, Bhawanpreet ; Li, Roman ; Siqueira, Rodrigo ; Wentland, Harry ; Zuo, Jerry Cc: Yeh, Eagle ; Lazare, Jord

RE: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14

2019-11-01 Thread Liu, Zhan
Thank you Hersen. Please check the updated patch: From: Liu, Zhan Sent: Friday, November 1, 2019 9:18 PM To: amd-gfx@lists.freedesktop.org; Kazlauskas, Nicholas ; Lakha, Bhawanpreet ; Li, Roman ; Liu, Zhan ; Siqueira, Rodrigo ; Wentland, Harry ; Wu, Hersen ; Zuo, Jerry Cc: Yeh, Eagle ; Laza

RE: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14

2019-11-01 Thread Wu, Hersen
Hi Zhan, The function is shared by NV10,12,14. Please add ASIC ID check for the DIG D skip. Thanks! Hersen -Original Message- From: Liu, Zhan Sent: Friday, November 1, 2019 9:18 PM To: amd-gfx@lists.freedesktop.org; Kazlauskas, Nicholas ; Lakha, Bhawanpreet ; Li, Roman ; Liu, Zha

[PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14

2019-11-01 Thread Liu, Zhan
From: Zhan liu Date: Fri, 1 Nov 2019 21:10:17 -0400 Subject: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14 [Why] Navi10 has 6 PHY, but Navi14 only has 5 PHY, that is because there is no ENGINE_ID_DIGD in Navi14. Without this patch, many HDMI related issues (e.g. HDMI S3 r

Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-01 Thread Zhao, Yong
> + /* only leave the offset segment */ > + vma->vm_pgoff &= (1ULL << (KFD_MMAP_GPU_ID_SHIFT - PAGE_SHIFT)) - 1; You're now open-coding what used to be done by the KFD_MMAP_OFFSET_VALUE_GET macro. I don't see how this is an improvement. Maybe better to update the macro to do this. I can d

Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-01 Thread Kuehling, Felix
On 2019-11-01 4:48 p.m., Zhao, Yong wrote: > The new code is much cleaner and results in better readability. > > Change-Id: I0c1f7cca7e24ddb7b4ffe1cb0fa71943828ae373 > Signed-off-by: Yong Zhao > --- > drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 13 +++-- > drivers/gpu/drm/amd/amdkfd/kfd_

Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-01 Thread Zhao, Yong
Hi Felix, The PAGE_SHIFT was not deleted but merged into the KFD_*_SHIFT in kfd_priv.h. Because of that, this change is actually transparent to the thunk, and it only straightens up the bit shift operations in most cases. Regards, Yong From: Kuehling, Felix Sen

Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-01 Thread Kuehling, Felix
NAK. This won't work for several reasons. The mmap_offset is used as offset parameter in the mmap system call. If you check the man page of mmap, you'll see that "offset must be a multiple of the page size". Therefore the PAGE_SHIFT is necessary. In the case of doorbell offsets, the offset is p

Re: [PATCH v2 1/2] drm: Add support for DP 1.4 Compliance edid corruption test 4.2.2.6

2019-11-01 Thread Harry Wentland
On 2019-11-01 3:38 p.m., Jerry (Fangzhi) Zuo wrote: > DP 1.4 edid corruption test requires source DUT to write calculated > CRC, not the corrupted CRC from reference sink. > > Return the calculated CRC back, and initiate the required sequence. > > -v2: Have separate routine for returning real CRC

Re: [PATCH v2 00/15] Consolidate the mmu notifier interval_tree and locking

2019-11-01 Thread Ralph Campbell
On 10/28/19 1:10 PM, Jason Gunthorpe wrote: From: Jason Gunthorpe 8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1, scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where they only use invalidate_range_start/end and immediately check the invalidating ran

Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-01 Thread Zhao, Yong
Please discard this one and look for an update version. Regards, Yong From: Zhao, Yong Sent: Friday, November 1, 2019 4:11 PM To: amd-gfx@lists.freedesktop.org Cc: Zhao, Yong Subject: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations The new c

[PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-01 Thread Zhao, Yong
The new code is much cleaner and results in better readability. Change-Id: I0c1f7cca7e24ddb7b4ffe1cb0fa71943828ae373 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 13 +++-- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 1 - drivers/gpu/drm/amd/amdkfd/kfd_priv.h

Re: [PATCH] drm/amdgpu: Show resolution correctly in mode validation debug output

2019-11-01 Thread Harry Wentland
On 2019-11-01 11:47 a.m., Neil Mayhew wrote: > On 2019-11-01 9:13 a.m., Harry Wentland wrote: >> On 2019-10-30 2:58 p.m., n...@neil.mayhew.name wrote: >>> From: Neil Mayhew >> This requires your Signed-off-by. See [1]. >> >> With that fixed your change looks good and is >> Reviewed-by: Harry Wentl

[PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-01 Thread Zhao, Yong
The new code is much cleaner and results in better readability. Change-Id: I0c1f7cca7e24ddb7b4ffe1cb0fa71943828ae373 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 10 -- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 1 - drivers/gpu/drm/amd/amdkfd/kfd_priv.h|

[PATCH] drm/amdkfd: Rename create_cp_queue() to init_user_queue()

2019-11-01 Thread Zhao, Yong
create_cp_queue() could also work with SDMA queues, so we should rename it. Change-Id: I76cbaed8fa95dd9062d786cbc1dd037ff041da9d Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/g

[PATCH 1/2] drm/amdkfd: Use better name to indicate the offset is in dwords

2019-11-01 Thread Zhao, Yong
Change-Id: I75da23bba90231762cf58da3170f5bb77ece45ed Signed-off-by: Yong Zhao --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 14 +++--- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 8 3 files changed,

[PATCH 2/2] drm/amdkfd: Avoid using doorbell_off as offset in process doorbell pages

2019-11-01 Thread Zhao, Yong
dorbell_off in the queue properties is mainly used for the doorbell dw offset in pci bar. We should not set it to the doorbell byte offset in process doorbell pages. This makes the code much easier to read. Change-Id: I553045ff9fcb3676900c92d10426f2ceb3660005 Signed-off-by: Yong Zhao --- drivers

Re: [PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror

2019-11-01 Thread Yang, Philip
Sorry, resend patch, the one in previous email missed couple of lines duo to copy/paste. On 2019-11-01 3:45 p.m., Yang, Philip wrote: > > > On 2019-11-01 1:42 p.m., Jason Gunthorpe wrote: >> On Fri, Nov 01, 2019 at 03:59:26PM +, Yang, Philip wrote: This test for range_blockable should

Re: [PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror

2019-11-01 Thread Yang, Philip
On 2019-11-01 1:42 p.m., Jason Gunthorpe wrote: > On Fri, Nov 01, 2019 at 03:59:26PM +, Yang, Philip wrote: >>> This test for range_blockable should be before mutex_lock, I can move >>> it up >>> >> yes, thanks. > > Okay, I wrote it like this: > > if (mmu_notifier_range_blockable(rang

[PATCH v2 1/2] drm: Add support for DP 1.4 Compliance edid corruption test 4.2.2.6

2019-11-01 Thread Jerry (Fangzhi) Zuo
DP 1.4 edid corruption test requires source DUT to write calculated CRC, not the corrupted CRC from reference sink. Return the calculated CRC back, and initiate the required sequence. -v2: Have separate routine for returning real CRC Signed-off-by: Jerry (Fangzhi) Zuo --- drivers/gpu/drm/drm_d

[pull] amdgpu, amdkfd drm-next-5.5

2019-11-01 Thread Alex Deucher
Hi Dave, Daniel, More stuff for 5.5. Mostly bug fixes and cleanups at this point. The following changes since commit 0e04ad7d1857670944786a8465930a049aaf995f: drm/amdgpu/powerplay: use local renoir array sizes for clock fetching (2019-10-25 16:48:14 -0400) are available in the Git repositor

Re: [PATCH v2 09/15] xen/gntdev: use mmu_range_notifier_insert

2019-11-01 Thread Boris Ostrovsky
On 11/1/19 1:48 PM, Jason Gunthorpe wrote: > On Wed, Oct 30, 2019 at 12:55:37PM -0400, Boris Ostrovsky wrote: >> On 10/28/19 4:10 PM, Jason Gunthorpe wrote: >>> From: Jason Gunthorpe >>> >>> gntdev simply wants to monitor a specific VMA for any notifier events, >>> this can be done straightforward

Re: [PATCH v2 08/15] xen/gntdev: Use select for DMA_SHARED_BUFFER

2019-11-01 Thread Jason Gunthorpe
On Mon, Oct 28, 2019 at 05:10:25PM -0300, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > DMA_SHARED_BUFFER can not be enabled by the user (it represents a library > set in the kernel). The kconfig convention is to use select for such > symbols so they are turned on implicitly when the user en

[PATCH v2a 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror

2019-11-01 Thread Jason Gunthorpe
Convert the collision-retry lock around hmm_range_fault to use the one now provided by the mmu_range notifier. Although this driver does not seem to use the collision retry lock that hmm provides correctly, it can still be converted over to use the mmu_range_notifier api instead of hmm_mirror with

Re: [PATCH] drm/amdgpu: implement TMZ accessor

2019-11-01 Thread Tuikov, Luben
On 2019-11-01 14:14, Alex Deucher wrote: > On Thu, Oct 31, 2019 at 8:15 PM Tuikov, Luben wrote: >> >> On 2019-10-31 3:29 a.m., Christian König wrote: >>> Am 31.10.19 um 00:43 schrieb Tuikov, Luben: Implement an accessor of adev->tmz.enabled. Let not code around access it as "if (adev->tm

Re: [PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror

2019-11-01 Thread Jason Gunthorpe
On Fri, Nov 01, 2019 at 02:44:51PM +, Yang, Philip wrote: > @@ -854,12 +853,20 @@ int amdgpu_ttm_tt_get_user_pages(struct amdgpu_bo *bo, > struct page **pages) > r = -EPERM; > goto out_unlock; > } > + up_read(&mm->mmap_sem); > + timeout = jiffies + mse

Re: [PATCH] drm/amdgpu: implement TMZ accessor

2019-11-01 Thread Alex Deucher
On Thu, Oct 31, 2019 at 8:15 PM Tuikov, Luben wrote: > > On 2019-10-31 3:29 a.m., Christian König wrote: > > Am 31.10.19 um 00:43 schrieb Tuikov, Luben: > >> Implement an accessor of adev->tmz.enabled. Let not > >> code around access it as "if (adev->tmz.enabled)" > >> as the organization may chan

Re: [PATCH 3/3] drm/amd/display: rename DCN1_0 kconfig to DCN

2019-11-01 Thread Deucher, Alexander
Series is: Reviewed-by: Alex Deucher From: amd-gfx on behalf of Bhawanpreet Lakha Sent: Friday, November 1, 2019 2:05 PM To: amd-gfx@lists.freedesktop.org Cc: Lakha, Bhawanpreet Subject: [PATCH 3/3] drm/amd/display: rename DCN1_0 kconfig to DCN Since dcn20 an

[PATCH 2/3] drm/amd/display: Drop CONFIG_DRM_AMD_DC_DCN2_1 flag

2019-11-01 Thread Bhawanpreet Lakha
[Why] DCN21 is stable enough to be build by default. So drop the flags. [How] Remove them using the unifdef tool. The following commands were executed in sequence: $ find -name '*.c' -exec unifdef -m -DCONFIG_DRM_AMD_DC_DCN2_1 -UCONFIG_TRIM_DRM_AMD_DC_DCN2_1 '{}' ';' $ find -name '*.h' -exec u

[PATCH 3/3] drm/amd/display: rename DCN1_0 kconfig to DCN

2019-11-01 Thread Bhawanpreet Lakha
Since dcn20 and dcn21 are under dcn1 it doesnt make sense to have it named dcn1. Change it to "dcn" to make it generic Signed-off-by: Bhawanpreet Lakha --- drivers/gpu/drm/amd/display/Kconfig | 4 ++-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 drivers/gpu/drm/amd/d

Re: [PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror

2019-11-01 Thread Jason Gunthorpe
On Fri, Nov 01, 2019 at 03:59:26PM +, Yang, Philip wrote: > > This test for range_blockable should be before mutex_lock, I can move > > it up > > > yes, thanks. Okay, I wrote it like this: if (mmu_notifier_range_blockable(range)) mutex_lock(&adev->notifier_lock);

Re: [PATCH v2 09/15] xen/gntdev: use mmu_range_notifier_insert

2019-11-01 Thread Jason Gunthorpe
On Wed, Oct 30, 2019 at 12:55:37PM -0400, Boris Ostrovsky wrote: > On 10/28/19 4:10 PM, Jason Gunthorpe wrote: > > From: Jason Gunthorpe > > > > gntdev simply wants to monitor a specific VMA for any notifier events, > > this can be done straightforwardly using mmu_range_notifier_insert() over > >

[PATCH] drivers: gpu: amdgpu: Remove @dev from amdgpu_gem_prime_export documentation

2019-11-01 Thread Jaskaran Singh
The function does not have a "dev" argument, so remove it from the documentation. This fixes the following documentation build warning: ./drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:335: warning: Excess function parameter 'dev' description in 'amdgpu_gem_prime_export' Signed-off-b

Re: [PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror

2019-11-01 Thread Jason Gunthorpe
On Fri, Nov 01, 2019 at 02:44:51PM +, Yang, Philip wrote: > > > On 2019-10-29 3:25 p.m., Jason Gunthorpe wrote: > > On Tue, Oct 29, 2019 at 07:22:37PM +, Yang, Philip wrote: > >> Hi Jason, > >> > >> I did quick test after merging amd-staging-drm-next with the > >> mmu_notifier branch, whi

Re: [PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror

2019-11-01 Thread Yang, Philip
On 2019-11-01 11:12 a.m., Jason Gunthorpe wrote: > On Fri, Nov 01, 2019 at 02:44:51PM +, Yang, Philip wrote: >> >> >> On 2019-10-29 3:25 p.m., Jason Gunthorpe wrote: >>> On Tue, Oct 29, 2019 at 07:22:37PM +, Yang, Philip wrote: Hi Jason, I did quick test after merging amd-s

Re: [PATCH] drm/amdgpu: Show resolution correctly in mode validation debug output

2019-11-01 Thread Neil Mayhew
On 2019-11-01 9:13 a.m., Harry Wentland wrote: > On 2019-10-30 2:58 p.m., n...@neil.mayhew.name wrote: >> From: Neil Mayhew > This requires your Signed-off-by. See [1]. > > With that fixed your change looks good and is > Reviewed-by: Harry Wentland > > You can simply reply to this email with your

RE: [PATCH] drm/amdgpu: Need to free discovery memory

2019-11-01 Thread Zhang, Hawking
Besides, the bo for ip_discovery only need to be created and reserved for Navi10 and onwards, although it shouldn't be a big issue to reserve 64K memory in top vram. Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Yuan, Xiaojie Sent: 2019年11月1日 23:14 To: Deng, Emily ; am

Re: [PATCH] drm/amdgpu: Need to free discovery memory

2019-11-01 Thread Yuan, Xiaojie
Hi Emily, Thanks for catching this. I think freeing Discovery TMR bo should be put at amdgpu_ttm_fini() instead of amdgpu_ttm_late_init() because unlike VGA stolen bo, touching PSP-protected Discovery TMR bo will cause GPU hang. Therefore, it should be reserved across the life-cycle of amdgpu

Re: [PATCH] drm/amdgpu: Show resolution correctly in mode validation debug output

2019-11-01 Thread Harry Wentland
On 2019-10-30 2:58 p.m., n...@neil.mayhew.name wrote: > From: Neil Mayhew This requires your Signed-off-by. See [1]. With that fixed your change looks good and is Reviewed-by: Harry Wentland You can simply reply to this email with your Signed-off-by and I can add it when merging, or you can se

Re: [PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror

2019-11-01 Thread Yang, Philip
On 2019-10-29 3:25 p.m., Jason Gunthorpe wrote: > On Tue, Oct 29, 2019 at 07:22:37PM +, Yang, Philip wrote: >> Hi Jason, >> >> I did quick test after merging amd-staging-drm-next with the >> mmu_notifier branch, which includes this set changes. The test result >> has different failures, app s

Re: [PATCH 1/2] drm: Add support for DP 1.4 Compliance edid corruption test 4.2.2.6

2019-11-01 Thread Jani Nikula
On Wed, 30 Oct 2019, "Jerry (Fangzhi) Zuo" wrote: > DP 1.4 edid corruption test requires source DUT to write calculated > CRC, not the corrupted CRC from reference sink. > > Return the calculated CRC back, and initiate the required sequence. > > Signed-off-by: Jerry (Fangzhi) Zuo > --- > drivers

[PATCH 5/5] drm: drop DRM_AUTH from PRIME_TO/FROM_HANDLE ioctls

2019-11-01 Thread Emil Velikov
From: Emil Velikov As mentioned by Christian, for drivers which support only primary nodes this changes the returned error from -EACCES into -EOPNOTSUPP/-ENOSYS. For others, this check in particular will be a noop. So let's remove it as suggested by Christian. Cc: Alex Deucher Cc: amd-gfx@list

[PATCH] drm/amdgpu: Need to free discovery memory

2019-11-01 Thread Emily Deng
When unloading driver, need to free discovery memory. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 9f2a893..50d6ed2