Re: amd-gfx Digest, Vol 41, Issue 390

2019-10-30 Thread Yin, Tianci (Rico)
[PATCH] drm/amdgpu/gmc10: properly set BANK_SELECT and FRAGMENT_SIZE Reviewed-by: Tianci Yin From: amd-gfx on behalf of amd-gfx-requ...@lists.freedesktop.org Sent: Wednesday, October 30, 2019 6:01 To: amd-gfx@lists.freedesktop.org Subject: amd-gfx Digest,

Re: [PATCH] drm/amdgpu: dont schedule jobs while in reset

2019-10-30 Thread Koenig, Christian
Am 30.10.19 um 10:13 schrieb S, Shirish: > [Why] > > doing kthread_park()/unpark() from drm_sched_entity_fini > while GPU reset is in progress defeats all the purpose of > drm_sched_stop->kthread_park. > If drm_sched_entity_fini->kthread_unpark() happens AFTER > drm_sched_stop->kthread_park

Re: [PATCH] drm/amd/powerplay: print the pptable provider

2019-10-30 Thread Wang, Kevin(Yang)
Reviewed-by: Kevin Wang also you can put this information in sysfs "amdgpu_pm_info" . Best Regards, Kevin From: Yuan, Xiaojie Sent: Wednesday, October 30, 2019 4:19 PM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan ; Wang, Kevin(Yang) ; Feng, Kenneth ;

[PATCH -next] drm/amd/display: Add a conversion function for transmitter and phy_id enums

2019-10-30 Thread Nathan Chancellor
Clang warns: ../drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:2520:42: error: implicit conversion from enumeration type 'enum transmitter' to different enumeration type 'enum physical_phy_id' [-Werror,-Wenum-conversion] psr_context->smuPhyId = link->link_enc->transmitter;

[PATCH] drm/amd/powerplay: print the pptable provider

2019-10-30 Thread Yuan, Xiaojie
Signed-off-by: Xiaojie Yuan --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c index 7e882999abad..0f7504ae2395 100644 ---

Re: [PATCH] drm/amdgpu: guard ib scheduling while in reset

2019-10-30 Thread S, Shirish
On 10/25/2019 9:32 PM, Grodzovsky, Andrey wrote: On 10/25/19 11:57 AM, Koenig, Christian wrote: Am 25.10.19 um 17:35 schrieb Grodzovsky, Andrey: On 10/25/19 5:26 AM, Koenig, Christian wrote: Am 25.10.19 um 11:22 schrieb S, Shirish: On 10/25/2019 2:23 PM, Koenig, Christian wrote:

[PATCH 1/1] drm/amdgpu: fix no ACK from LDS read during stress test for Arcturus

2019-10-30 Thread Le Ma
Set mmSQ_CONFIG.DISABLE_SMEM_SOFT_CLAUSE as W/R. Change-Id: I6225909fd62702427fbb807e0c6ba6bafcfa41d5 Signed-off-by: Le Ma --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

RE: [PATCH 1/1] drm/amdgpu: fix no ACK from LDS read during stress test for Arcturus

2019-10-30 Thread Zhang, Hawking
Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Le Ma Sent: 2019年10月30日 17:02 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Deucher, Alexander ; Cornwall, Jay ; Ma, Le Subject: [PATCH 1/1] drm/amdgpu: fix no ACK from LDS read during stress test for

Re: [PATCH v2 13/15] drm/amdgpu: Use mmu_range_insert instead of hmm_mirror

2019-10-30 Thread Jason Gunthorpe
On Tue, Oct 29, 2019 at 10:14:29PM +, Kuehling, Felix wrote: > > +static const struct mmu_range_notifier_ops amdgpu_mn_hsa_ops = { > > + .invalidate = amdgpu_mn_invalidate_hsa, > > +}; > > + > > +static int amdgpu_mn_sync_pagetables(struct hmm_mirror *mirror, > > +

Re: [PATCH v2 02/15] mm/mmu_notifier: add an interval tree notifier

2019-10-30 Thread Jason Gunthorpe
On Tue, Oct 29, 2019 at 10:04:45PM +, Kuehling, Felix wrote: > >* because mm->mm_users > 0 during mmu_notifier_register and exit_mmap > > @@ -52,17 +286,24 @@ struct mmu_notifier_mm { > >* can't go away from under us as exit_mmap holds an mm_count pin > >* itself. > >*/ > >

Re: [PATCH] drm/amdgpu: dont schedule jobs while in reset

2019-10-30 Thread S, Shirish
On 10/30/2019 3:50 PM, Koenig, Christian wrote: > Am 30.10.19 um 10:13 schrieb S, Shirish: >> [Why] >> >> doing kthread_park()/unpark() from drm_sched_entity_fini >> while GPU reset is in progress defeats all the purpose of >> drm_sched_stop->kthread_park. >> If

[PATCH] drm/amdgpu: dont schedule jobs while in reset

2019-10-30 Thread S, Shirish
[Why] doing kthread_park()/unpark() from drm_sched_entity_fini while GPU reset is in progress defeats all the purpose of drm_sched_stop->kthread_park. If drm_sched_entity_fini->kthread_unpark() happens AFTER drm_sched_stop->kthread_park nothing prevents from another (third) thread to keep

[PATCH] drm/radeon: fix si_enable_smc_cac() failed issue

2019-10-30 Thread Alex Deucher
Need to set the dte flag on this asic. Port the fix from amdgpu: 5cb818b861be114148e8dbeb4259698148019dd1 Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/si_dpm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index

Re: [PATCH] drm/amdgpu/gfx10: fix mqd backup/restore for gfx rings

2019-10-30 Thread Alex Deucher
On Tue, Oct 29, 2019 at 7:37 AM Yuan, Xiaojie wrote: > > 1. no need to allocate an extra member for 'mqd_backup' array > 2. backup/restore mqd to/from the correct 'mqd_backup' array slot > > Signed-off-by: Xiaojie Yuan Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h |

Re: [PATCH] drm/amdgpu: guard ib scheduling while in reset

2019-10-30 Thread Grodzovsky, Andrey
That good  as proof of RCA but I still think we should grab a dedicated lock inside scheduler since the race is internal to scheduler code so this better to handle it inside the scheduler code to make the fix apply for all drivers using it. Andrey On 10/30/19 4:44 AM, S, Shirish wrote:

Re: [PATCH v3] drm/radeon: Fix EEH during kexec

2019-10-30 Thread Michael Ellerman
Hi Kyle, KyleMahlkuch writes: > From: Kyle Mahlkuch > > During kexec some adapters hit an EEH since they are not properly > shut down in the radeon_pci_shutdown() function. Adding > radeon_suspend_kms() fixes this issue. > Enabled only on PPC because this patch causes issues on some other >

Re: [PATCH] drm/amdgpu: dont schedule jobs while in reset

2019-10-30 Thread Grodzovsky, Andrey
Reviewed-by: Andrey Grodzovsky Andrey On 10/30/19 6:20 AM, Koenig, Christian wrote: > Am 30.10.19 um 10:13 schrieb S, Shirish: >> [Why] >> >> doing kthread_park()/unpark() from drm_sched_entity_fini >> while GPU reset is in progress defeats all the purpose of >> drm_sched_stop->kthread_park. >>

Re: [PATCH] drm/amdgpu: guard ib scheduling while in reset

2019-10-30 Thread Grodzovsky, Andrey
Can you elaborate on what is the tricky part with the lock ? I assumed we just use per scheduler lock. Andrey On 10/30/19 10:50 AM, Christian König wrote: > A lock inside the scheduler is rather tricky to implement. > > What you need to do is to get rid of the park()/unpark() hack in >

Re: [PATCH] drm/amdgpu: dont schedule jobs while in reset

2019-10-30 Thread Grodzovsky, Andrey
On 10/30/19 6:22 AM, S, Shirish wrote: > On 10/30/2019 3:50 PM, Koenig, Christian wrote: >> Am 30.10.19 um 10:13 schrieb S, Shirish: >>> [Why] >>> >>> doing kthread_park()/unpark() from drm_sched_entity_fini >>> while GPU reset is in progress defeats all the purpose of >>>

Re: [PATCH] drm/amdgpu: guard ib scheduling while in reset

2019-10-30 Thread Koenig, Christian
Yeah, and exactly that's the problem :) You need a global lock covering all schedulers. Otherwise you end up in hell's kitchen again with taking all those locks in the right order. Christian. Am 30.10.19 um 15:56 schrieb Grodzovsky, Andrey: > Can you elaborate on what is the tricky part with

Re: [PATCH -next] drm/amd/display: Add a conversion function for transmitter and phy_id enums

2019-10-30 Thread Kazlauskas, Nicholas
On 2019-10-30 2:04 a.m., Nathan Chancellor wrote: > Clang warns: > > ../drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:2520:42: > error: implicit conversion from enumeration type 'enum transmitter' to > different enumeration type 'enum physical_phy_id' > [-Werror,-Wenum-conversion] >

Re: [PATCH] drm/amdgpu: remove PT BOs when unmapping

2019-10-30 Thread Christian König
Am 29.10.19 um 21:06 schrieb Huang, JinHuiEric: The issue is PT BOs are not freed when unmapping VA, which causes vram usage accumulated is huge in some memory stress test, such as kfd big buffer stress test. Function amdgpu_vm_bo_update_mapping() is called by both amdgpu_vm_bo_update() and

Re: [PATCH] drm/amdgpu/renoir: move gfxoff handling into gfx9 module

2019-10-30 Thread Alex Deucher
Ping? On Tue, Oct 29, 2019 at 4:10 PM Alex Deucher wrote: > > To properly handle the option parsing ordering. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 ++ > drivers/gpu/drm/amd/amdgpu/soc15.c| 5 - > 2 files changed, 6 insertions(+), 5

Re: [PATCH] drm/amdgpu/gmc10: properly set BANK_SELECT and FRAGMENT_SIZE

2019-10-30 Thread Christian König
Am 29.10.19 um 22:15 schrieb Alex Deucher: These were not aligned for optimal performance for GPUVM. Signed-off-by: Alex Deucher Good catch. But I haven't read the GMC10 documentation yet of everything is still the same as on GMC9. So only Acked-by: Christian König Regards, Christian.

Re: [PATCH -next] drm/amd/display: Add a conversion function for transmitter and phy_id enums

2019-10-30 Thread Alex Deucher
On Wed, Oct 30, 2019 at 8:33 AM Kazlauskas, Nicholas wrote: > > On 2019-10-30 2:04 a.m., Nathan Chancellor wrote: > > Clang warns: > > > > ../drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:2520:42: > > error: implicit conversion from enumeration type 'enum transmitter' to > > different

Re: [PATCH] drm/amdgpu: guard ib scheduling while in reset

2019-10-30 Thread Christian König
A lock inside the scheduler is rather tricky to implement. What you need to do is to get rid of the park()/unpark() hack in drm_sched_entity_fini(). We could do this with a struct completion or convert the scheduler from a thread to a work item. Regards, Christian. Am 30.10.19 um 15:44

Re: [PATCH] drm/amdgpu: guard ib scheduling while in reset

2019-10-30 Thread Grodzovsky, Andrey
I see. OK, I will add to myself a TODO about struct completion approach. Andrey On 10/30/19 11:00 AM, Koenig, Christian wrote: > Yeah, and exactly that's the problem :) You need a global lock covering > all schedulers. > > Otherwise you end up in hell's kitchen again with taking all those locks

Re: [PATCH] drm/amdgpu: remove PT BOs when unmapping

2019-10-30 Thread Koenig, Christian
Am 30.10.2019 16:47 schrieb "Kuehling, Felix" : On 2019-10-30 9:52 a.m., Christian König wrote: > Am 29.10.19 um 21:06 schrieb Huang, JinHuiEric: >> The issue is PT BOs are not freed when unmapping VA, >> which causes vram usage accumulated is huge in some >> memory stress test, such as kfd big

Re: [PATCH] drm/amdgpu: remove PT BOs when unmapping

2019-10-30 Thread Huang, JinHuiEric
The vaild flag doesn't take effect in this function. amdgpu_vm_alloc_pts() is always executed that only depended on "cursor.pfn < end". The valid flag has only been checked on here for asic below GMC v9: if (adev->asic_type < CHIP_VEGA10 && (flags & AMDGPU_PTE_VALID))... Regards,

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

2019-10-30 Thread Boris Ostrovsky
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 > the VMA's VA range. > > The notifier should be attached until the original

Re: [PATCH] drm/amdgpu: remove PT BOs when unmapping

2019-10-30 Thread Huang, JinHuiEric
Actually I do prevent to remove in-use pts by this: + r = amdgpu_vm_remove_ptes(adev, vm, + (mapping->start + 0x1ff) & (~0x1ffll), + (mapping->last + 1) & (~0x1ffll)); Which is only removing aligned page table for 2M. And

[PATCH AUTOSEL 5.3 55/81] drm/amdgpu: fix potential VM faults

2019-10-30 Thread Sasha Levin
From: Christian König [ Upstream commit 3122051edc7c27cc08534be730f4c7c180919b8a ] When we allocate new page tables under memory pressure we should not evict old ones. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 5.3 56/81] drm/amdgpu: fix error handling in amdgpu_bo_list_create

2019-10-30 Thread Sasha Levin
From: Christian König [ Upstream commit de51a5019ff32960218da8fd899fa3f361b031e9 ] We need to drop normal and userptr BOs separately. Signed-off-by: Christian König Acked-by: Huang Rui Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c |

[PATCH] drm/amdgpu/arcturus: properly set BANK_SELECT and FRAGMENT_SIZE

2019-10-30 Thread Alex Deucher
These were not aligned for optimal performance for GPUVM. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c index

Re: [PATCH] drm/amdgpu/arcturus: properly set BANK_SELECT and FRAGMENT_SIZE

2019-10-30 Thread Christian König
Am 30.10.19 um 18:32 schrieb Alex Deucher: These were not aligned for optimal performance for GPUVM. Signed-off-by: Alex Deucher Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 9 + 1 file changed, 9 insertions(+) diff --git

Re: [PATCH] Drivers: gpu: drm: amd: display: amdgpu_dm: amdgpu_dm.h: Fixed a documentation warning

2019-10-30 Thread Alex Deucher
On Mon, Oct 28, 2019 at 4:25 AM wrote: > > From: Madhuparna Bhowmik > > This patch fixes the following warning: Incorrect use of > kernel-doc format: * @atomic_obj > by adding a colon after @atomic_obj. > > Signed-off-by: Madhuparna Bhowmik Thanks for the patch. This as already

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

2019-10-30 Thread neil
From: Neil Mayhew --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index a52f0b13a2c8..f802c784e6f6 100644 ---

Re: [PATCH] drm/amdgpu: remove PT BOs when unmapping

2019-10-30 Thread Huang, JinHuiEric
I tested it that it saves a lot of vram on KFD big buffer stress test. I think there are two reasons: 1. Calling amdgpu_vm_update_ptes() during unmapping will allocate unnecessary pts, because there is no flag to determine if the VA is mapping or unmapping in function amdgpu_vm_update_ptes().

Re: [PATCH] drm/amdgpu: remove PT BOs when unmapping

2019-10-30 Thread Koenig, Christian
Am 30.10.2019 17:19 schrieb "Huang, JinHuiEric" : I tested it that it saves a lot of vram on KFD big buffer stress test. I think there are two reasons: 1. Calling amdgpu_vm_update_ptes() during unmapping will allocate unnecessary pts, because there is no flag to determine if the VA is

Re: [PATCH] drm/amdgpu: remove PT BOs when unmapping

2019-10-30 Thread Kuehling, Felix
On 2019-10-30 9:52 a.m., Christian König wrote: > Am 29.10.19 um 21:06 schrieb Huang, JinHuiEric: >> The issue is PT BOs are not freed when unmapping VA, >> which causes vram usage accumulated is huge in some >> memory stress test, such as kfd big buffer stress test. >> Function

Re: [PATCH v7] drm/amd/display: Add MST atomic routines

2019-10-30 Thread Kazlauskas, Nicholas
On 2019-10-30 2:42 p.m., Lipski, Mikita wrote: > > On 30.10.2019 14:19, Kazlauskas, Nicholas wrote: >> On 2019-10-28 10:31 a.m., mikita.lip...@amd.com wrote: >>> From: Mikita Lipski >>> >>> - Adding encoder atomic check to find vcpi slots for a connector >>> - Using DRM helper functions to

Re: [PATCH] drm/amdgpu: remove PT BOs when unmapping

2019-10-30 Thread Koenig, Christian
The vaild flag doesn't take effect in this function. That's irrelevant. See what amdgpu_vm_update_ptes() does is to first determine the fragment size: amdgpu_vm_fragment(params, frag_start, end, flags, , _end); Then we walk down the tree: amdgpu_vm_pt_start(adev, params->vm, start, );

Re: [PATCH] drm/amdgpu: remove PT BOs when unmapping

2019-10-30 Thread Christian König
One thing I've forgotten: What you could maybe do to improve the situation is to join adjacent ranges in amdgpu_vm_clear_freed(), but I'm not sure how the chances are that the ranges are freed all together. The only other alternative I can see would be to check the mappings of a range in

Re: [PATCH v7] drm/amd/display: Add MST atomic routines

2019-10-30 Thread Mikita Lipski
On 30.10.2019 14:19, Kazlauskas, Nicholas wrote: > On 2019-10-28 10:31 a.m., mikita.lip...@amd.com wrote: >> From: Mikita Lipski >> >> - Adding encoder atomic check to find vcpi slots for a connector >> - Using DRM helper functions to calculate PBN >> - Adding connector atomic check to release

Re: 21:9 monitor resolution incorrect since 4.14 kernel

2019-10-30 Thread Neil Mayhew
I enabled kms debugging with drm.debug=4 on the kernel command line. This enabled me to see that the relevant modes are being rejected with error 11 which is DC_EXCEED_DONGLE_CAP. Sure enough, I see that there's a dongle detected that's rated at 165MHz and my preferred modes are all above that.

Re: [PATCH v7] drm/amd/display: Add MST atomic routines

2019-10-30 Thread Kazlauskas, Nicholas
On 2019-10-28 10:31 a.m., mikita.lip...@amd.com wrote: > From: Mikita Lipski > > - Adding encoder atomic check to find vcpi slots for a connector > - Using DRM helper functions to calculate PBN > - Adding connector atomic check to release vcpi slots if connector > loses CRTC > - Calculate PBN

[PATCH] drm/amdgpu/gpuvm: add some additional comments in amdgpu_vm_update_ptes

2019-10-30 Thread Alex Deucher
To better clarify what is happening in this function. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index

[PATCH AUTOSEL 4.19 25/38] drm/amdgpu: fix potential VM faults

2019-10-30 Thread Sasha Levin
From: Christian König [ Upstream commit 3122051edc7c27cc08534be730f4c7c180919b8a ] When we allocate new page tables under memory pressure we should not evict old ones. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin ---

[pull] amdgpu, radeon, gpu scheduler drm-fixes-5.4

2019-10-30 Thread Alex Deucher
Hi Dave, Daniel, Misc fixes for 5.4. The following changes since commit 2a3608409f46e0bae5b6b1a77ddf4c42116698da: Merge tag 'drm-fixes-5.4-2019-10-23' of git://people.freedesktop.org/~agd5f/linux into drm-fixes (2019-10-25 14:48:53 +1000) are available in the Git repository at:

[PATCH] drm/amdgpu: implement TMZ accessor

2019-10-30 Thread Tuikov, Luben
Implement an accessor of adev->tmz.enabled. Let not code around access it as "if (adev->tmz.enabled)" as the organization may change. Instead... Recruit "bool amdgpu_is_tmz(adev)" to return exactly this Boolean value. That is, this function is now an accessor of an already initialized and set

Re: [PATCH] drm/amd/powerplay: support xgmi pstate setting on powerplay routine

2019-10-30 Thread Alex Deucher
On Wed, Oct 30, 2019 at 9:50 PM Quan, Evan wrote: > > Add xgmi pstate setting on powerplay routine. > > Change-Id: If1a49aa14c16f133e43ac1298c6b14eaeb44d79d > Signed-off-by: Evan Quan Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 5 + >

[PATCH 2/3] drm/amdkfd: only keep release_mem function for Hawaii

2019-10-30 Thread Zhao, Yong
release_mem won't be used at all on GFX9 and GFX10, so delete it. Change-Id: I13787a8a29b83e7516c582a7401f2e14721edf5f Signed-off-by: Yong Zhao --- .../gpu/drm/amd/amdkfd/kfd_kernel_queue_v10.c | 35 ++- .../gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c | 33 ++--- 2

[PATCH 1/3] drm/amdkfd: Adjust function sequences to avoid unnecessary declarations

2019-10-30 Thread Zhao, Yong
This is cleaner. Change-Id: I8cdecad387d8c547a088c6050f77385ee1135be1 Signed-off-by: Yong Zhao --- .../gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c

[PATCH 06/13] drm/dp_mst: Add helpers for MST DSC and virtual DPCD aux

2019-10-30 Thread mikita.lipski
From: David Francis Add drm_dp_mst_dsc_aux_for_port. To enable DSC, the DSC_ENABLED register might have to be written on the leaf port's DPCD, its parent's DPCD, or the MST manager's DPCD. This function finds the correct aux for the job. As part of this, add drm_dp_mst_is_virtual_dpcd. Virtual

[PATCH 03/13] drm/dp_mst: Parse FEC capability on MST ports

2019-10-30 Thread mikita.lipski
From: David Francis As of DP1.4, ENUM_PATH_RESOURCES returns a bit indicating if FEC can be supported up to that point in the MST network. The bit is the first byte of the ENUM_PATH_RESOURCES ack reply, bottom-most bit (refer to section 2.11.9.4 of DP standard, v1.4) That value is needed for

[PATCH 05/13] drm/dp_mst: Fill branch->num_ports

2019-10-30 Thread mikita.lipski
From: David Francis This field on drm_dp_mst_branch was never filled It is initialized to zero when the port is kzallocced. When a port is added to the list, increment num_ports, and when a port is removed from the list, decrement num_ports. v2: remember to decrement on port removal v3: don't

[PATCH 01/13] drm/amd/display: Add MST atomic routines

2019-10-30 Thread mikita.lipski
From: Mikita Lipski - Adding encoder atomic check to find vcpi slots for a connector - Using DRM helper functions to calculate PBN - Adding connector atomic check to release vcpi slots if connector loses CRTC - Calculate PBN and VCPI slots only once during atomic check and store them on

[PATCH 07/13] drm/dp_mst: Add new quirk for Synaptics MST hubs

2019-10-30 Thread mikita.lipski
From: Mikita Lipski Synaptics DP1.4 hubs (BRANCH_ID 0x90CC24) do not support virtual DPCD registers, but do support DSC. The DSC caps can be read from the physical aux, like in SST DSC. These hubs have many different DEVICE_IDs. Add a new quirk to detect this case. Reviewed-by: Wenjing Liu

[PATCH 08/13] drm/amd/display: Initialize DSC PPS variables to 0

2019-10-30 Thread mikita.lipski
From: David Francis For DSC MST, sometimes monitors would break out in full-screen static. The issue traced back to the PPS generation code, where these variables were being used uninitialized and were picking up garbage. memset to 0 to avoid this Reviewed-by: Nicholas Kazlauskas

[PATCH 02/13] drm/dp_mst: Add PBN calculation for DSC modes

2019-10-30 Thread mikita.lipski
From: David Francis With DSC, bpp can be fractional in multiples of 1/16. Change drm_dp_calc_pbn_mode to reflect this, adding a new parameter bool dsc. When this parameter is true, treat the bpp parameter as having units not of bits per pixel, but 1/16 of a bit per pixel v2: Don't add separate

[PATCH 04/13] drm/dp_mst: Add MST support to DP DPCD R/W functions

2019-10-30 Thread mikita.lipski
From: David Francis Instead of having drm_dp_dpcd_read/write and drm_dp_mst_dpcd_read/write as entry points into the aux code, have drm_dp_dpcd_read/write handle both. This means that DRM drivers can make MST DPCD read/writes. v2: Fix spacing v3: Dump dpcd access on MST read/writes v4: Fix

[PATCH 13/13] drm/amd/display: Recalculate VCPI slots for new DSC connectors

2019-10-30 Thread mikita.lipski
From: Mikita Lipski Since for DSC MST connector's PBN is claculated differently due to compression, we have to recalculate both PBN and VCPI slots for that connector. The function iterates through all the active streams to find, which have DSC enabled, then recalculates PBN for it and calls

[PATCH 12/13] drm/dp_mst: Add DSC enablement helpers to DRM

2019-10-30 Thread mikita.lipski
From: Mikita Lipski Adding the following elements to add MST DSC support to DRM: - dsc_enable boolean flag to drm_dp_vcpi_allocation structure to signal, which port got DSC enabled - function drm_dp_helper_update_vcpi_slots_for_dsc allows reallocation of newly recalculated VCPI slots and

[PATCH v4 00/13] DSC MST support for AMDGPU

2019-10-30 Thread mikita.lipski
From: Mikita Lipski This set of patches is a continuation of DSC enablement patches for AMDGPU. This set enables DSC on MST. It also contains implementation of both encoder and connector atomic check routines. First 10 patches have been introduced in multiple iterations to the mailing list

[PATCH 09/13] drm/amd/display: Validate DSC caps on MST endpoints

2019-10-30 Thread mikita.lipski
From: David Francis During MST mode enumeration, if a new dc_sink is created, populate it with dsc caps as appropriate. Use drm_dp_mst_dsc_aux_for_port to get the raw caps, then parse them onto dc_sink with dc_dsc_parse_dsc_dpcd. Reviewed-by: Wenjing Liu Signed-off-by: David Francis ---

[PATCH 2/2] drm/amd/display: Hook up drm interface for DP 1.4 edid corruption test

2019-10-30 Thread Jerry (Fangzhi) Zuo
Signed-off-by: Jerry (Fangzhi) Zuo --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 35 +- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

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

2019-10-30 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. Signed-off-by: Jerry (Fangzhi) Zuo --- drivers/gpu/drm/drm_dp_helper.c | 36