RE: [PATCH 6/6] drm/amdgpu: check if we need to reset at init time (v2)

2019-01-08 Thread Quan, Evan
Series is Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: 2019年1月9日 6:12 > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: [PATCH 6/6] drm/amdgpu: check if we need to reset at init time (v2) > > To deal with

RE: [PATCH] drm/amdgpu: expose sclk and mclk via hwmon

2019-01-08 Thread Quan, Evan
Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: 2018年12月11日 5:17 > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: [PATCH] drm/amdgpu: expose sclk and mclk via hwmon > > Expose sclk (gfx clock) and mclk (memory

Re: [PATCH 1/1] drm/amdkfd: Don't assign dGPUs to APU topology devices

2019-01-08 Thread Alex Deucher
On Tue, Jan 8, 2019 at 6:29 PM Kuehling, Felix wrote: > > dGPUs need their own topology devices. Don't assign them to APU topology > devices with CPU cores. > > Bug: https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver/issues/66 > Signed-off-by: Felix Kuehling Acked-by: Alex Deucher > ---

Re: [PATCH] drm/amdgpu: fix CPDMA hang in PRT mode for VEGA20

2019-01-08 Thread Zhang, Jerry(Junwei)
On 1/9/19 10:23 AM, Zhou1, Tao wrote: -Original Message- From: amd-gfx On Behalf Of Zhang, Jerry(Junwei) Sent: 2019年1月9日 9:39 To: Zhou1, Tao ; amd-gfx@lists.freedesktop.org Cc: Li, Yukun1 Subject: Re: [PATCH] drm/amdgpu: fix CPDMA hang in PRT mode for VEGA20 On 1/8/19 6:55 PM, Tao

RE: [PATCH] drm/amdgpu: fix CPDMA hang in PRT mode for VEGA20

2019-01-08 Thread Zhou1, Tao
> -Original Message- > From: amd-gfx On Behalf Of > Zhang, Jerry(Junwei) > Sent: 2019年1月9日 9:39 > To: Zhou1, Tao ; amd-gfx@lists.freedesktop.org > Cc: Li, Yukun1 > Subject: Re: [PATCH] drm/amdgpu: fix CPDMA hang in PRT mode for VEGA20 > > On 1/8/19 6:55 PM, Tao Zhou wrote: > > Fix

Re: [PATCH] drm/amdgpu: fix CPDMA hang in PRT mode for VEGA20

2019-01-08 Thread Zhang, Jerry(Junwei)
On 1/8/19 6:55 PM, Tao Zhou wrote: Fix CPDMA hang in PRT mode for both of VEGA10 and VEGA20 Change-Id: I0e5e089d2192063c4a04fa6dbd534f25eb0177be Signed-off-by: Tao Zhou Tested-by: Yukun.Li --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 +- 1 file changed, 5 insertions(+), 5

Re: [PATCH 0/6] kexec fixes

2019-01-08 Thread Deucher, Alexander
Yes, the checks are taken from the existing SMU and PSP code. Alex From: Kuehling, Felix Sent: Tuesday, January 8, 2019 6:22:48 PM To: Alex Deucher; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: Re: [PATCH 0/6] kexec fixes Thanks for this. I

[PATCH v5 18/20] drm/dp_mst: Start tracking per-port VCPI allocations

2019-01-08 Thread Lyude Paul
There has been a TODO waiting for quite a long time in drm_dp_mst_topology.c: /* We cannot rely on port->vcpi.num_slots to update * topology_state->avail_slots as the port may not exist if the parent * branch device was unplugged. This should be fixed by tracking

[PATCH v5 20/20] drm/nouveau: Use atomic VCPI helpers for MST

2019-01-08 Thread Lyude Paul
Currently, nouveau uses the yolo method of setting up MST displays: it uses the old VCPI helpers (drm_dp_find_vcpi_slots()) for computing the display configuration. These helpers don't take care to make sure they take a reference to the mstb port that they're checking, and additionally don't

[PATCH v5 16/20] drm/nouveau: Grab payload lock in nv50_msto_payload()

2019-01-08 Thread Lyude Paul
Going through the currently programmed payloads isn't safe without holding mgr->payload_lock, so actually do that and warn if anyone tries calling nv50_msto_payload() in the future without grabbing the right locks. Signed-off-by: Lyude Paul Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc:

[PATCH v5 14/20] drm/nouveau: Keep malloc references to MST ports

2019-01-08 Thread Lyude Paul
Now that we finally have a sane way to keep port allocations around, use it to fix the potential unchecked ->port accesses that nouveau makes by making sure we keep the mst port allocated for as long as it's drm_connector is accessible. Additionally, now that we've guaranteed that mstc->port is

[PATCH v5 10/20] drm/i915: Keep malloc references to MST ports

2019-01-08 Thread Lyude Paul
So that the ports stay around until we've destroyed the connectors, in order to ensure that we don't pass an invalid pointer to any MST helpers once we introduce the new MST VCPI helpers. Changes since v1: * Move drm_dp_mst_get_port_malloc() to where we assign intel_connector->port - danvet

[PATCH v5 19/20] drm/dp_mst: Check payload count in drm_dp_mst_atomic_check()

2019-01-08 Thread Lyude Paul
It occurred to me that we never actually check this! So let's start doing that. Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 8 +++- 1 file changed, 7 insertions(+), 1

[PATCH v5 17/20] drm/dp_mst: Add some atomic state iterator macros

2019-01-08 Thread Lyude Paul
Changes since v6: - Move EXPORT_SYMBOL() for drm_dp_mst_topology_state_funcs to this commit - Document __drm_dp_mst_state_iter_get() and note that it shouldn't be called directly Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland

[PATCH v5 11/20] drm/amdgpu/display: Keep malloc ref to MST port

2019-01-08 Thread Lyude Paul
Just like i915 and nouveau, it's a good idea for us to hold a malloc reference to the port here so that we never pass a freed pointer to any of the DP MST helper functions. Also, we stop unsetting aconnector->port in dm_dp_destroy_mst_connector(). There's literally no point to that assignment

[PATCH v5 08/20] drm/dp_mst: Stop releasing VCPI when removing ports from topology

2019-01-08 Thread Lyude Paul
This has never actually worked, and isn't needed anyway: the driver's always going to try to deallocate VCPI when it tears down the display that the VCPI belongs to. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li ---

[PATCH v5 05/20] drm/dp_mst: Rename drm_dp_mst_get_validated_(port|mstb)_ref and friends

2019-01-08 Thread Lyude Paul
s/drm_dp_get_validated_port_ref/drm_dp_mst_topology_get_port_validated/ s/drm_dp_put_port/drm_dp_mst_topology_put_port/ s/drm_dp_get_validated_mstb_ref/drm_dp_mst_topology_get_mstb_validated/ s/drm_dp_put_mst_branch_device/drm_dp_mst_topology_put_mstb/ This is a much more consistent naming

[PATCH v5 13/20] drm/nouveau: Remove unnecessary VCPI checks in nv50_msto_cleanup()

2019-01-08 Thread Lyude Paul
There is no need to look at the port's VCPI allocation before calling drm_dp_mst_deallocate_vcpi(), as we already have msto->disabled to let us avoid cleaning up an msto more then once. The DP MST core will never call drm_dp_mst_deallocate_vcpi() on it's own, which is presumably what these checks

[PATCH v5 15/20] drm/nouveau: Stop unsetting mstc->port, use malloc refs

2019-01-08 Thread Lyude Paul
Same as we did for i915, but for nouveau this time. Additionally, we grab a malloc reference to the port that lasts for the entire lifetime of nv50_mstc, which gives us the guarantee that mstc->port will always point to valid memory for as long as the mstc stays around. Signed-off-by: Lyude Paul

[PATCH v5 12/20] drm/nouveau: Remove bogus cleanup in nv50_mstm_add_connector()

2019-01-08 Thread Lyude Paul
Trying to destroy the connector using mstc->connector.funcs->destroy() if connector initialization fails is wrong: there is no possible codepath in nv50_mstc_new where nv50_mstm_add_connector() would return <0 and mstc would be non-NULL. Signed-off-by: Lyude Paul Cc: Daniel Vetter Cc: David

[PATCH v5 07/20] drm/dp_mst: Restart last_connected_port_and_mstb() if topology ref fails

2019-01-08 Thread Lyude Paul
While this isn't a complete fix, this will improve the reliability of drm_dp_get_last_connected_port_and_mstb() pretty significantly during hotplug events, since there's a chance that the in-memory topology tree may not be fully updated when drm_dp_get_last_connected_port_and_mstb() is called and

[PATCH v5 04/20] drm/dp_mst: Fix some formatting in drm_dp_mst_deallocate_vcpi()

2019-01-08 Thread Lyude Paul
Split some stuff across multiple lines Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v5 02/20] drm/dp_mst: Fix some formatting in drm_dp_payload_send_msg()

2019-01-08 Thread Lyude Paul
Split some stuff across multiple lines, remove some unnecessary braces Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 14 -- 1 file changed, 8 insertions(+), 6

[PATCH v5 00/20] MST refcounting/atomic helpers cleanup

2019-01-08 Thread Lyude Paul
This is the series I've been working on for a while now to get all of the atomic DRM drivers in the tree to use the atomic MST helpers, and to make the atomic MST helpers actually idempotent. Turns out it's a lot more difficult to do that without also fixing how port and branch device refcounting

[PATCH v5 06/20] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports

2019-01-08 Thread Lyude Paul
The current way of handling refcounting in the DP MST helpers is really confusing and probably just plain wrong because it's been hacked up many times over the years without anyone actually going over the code and seeing if things could be simplified. To the best of my understanding, the current

[PATCH v5 03/20] drm/dp_mst: Fix some formatting in drm_dp_mst_allocate_vcpi()

2019-01-08 Thread Lyude Paul
Fix some indenting, split some stuff across multiple lines. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v5 01/20] drm/dp_mst: Fix some formatting in drm_dp_add_port()

2019-01-08 Thread Lyude Paul
Reindent some stuff, and split some stuff across multiple lines so we aren't going over the text width limit. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 18

[PATCH 1/1] drm/amdkfd: Don't assign dGPUs to APU topology devices

2019-01-08 Thread Kuehling, Felix
dGPUs need their own topology devices. Don't assign them to APU topology devices with CPU cores. Bug: https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver/issues/66 Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 12 +--- 1 file changed, 9 insertions(+),

Re: [PATCH 0/6] kexec fixes

2019-01-08 Thread Kuehling, Felix
Thanks for this. I trust that your method for detecting that SMU or PSP are running is correct. With that caveat the series is Reviewed-by: Felix Kuehling Regards,   Felix On 2019-01-08 5:11 p.m., Alex Deucher wrote: > Fixes for kexec. The GPU needs to be reset before the driver > can be

[PATCH 5/6] drm/amdgpu/soc15: add need_reset_on_init asic callback for SOC15 (v2)

2019-01-08 Thread Alex Deucher
SOC15 chips require a reset if the driver was previously loaded because the PSP can only be loaded once between each reset. v2: rebase, handle multiple asic funcs Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 20 1 file changed, 20 insertions(+)

[PATCH 6/6] drm/amdgpu: check if we need to reset at init time (v2)

2019-01-08 Thread Alex Deucher
To deal with situations like kexec or GPU VM passthrough where the device may have been used previously without a proper GPU reset between. v2: rebase bug: https://bugs.freedesktop.org/show_bug.cgi?id=108585 bug: https://bugs.freedesktop.org/show_bug.cgi?id=108754 Signed-off-by: Alex Deucher

[PATCH 2/6] drm/amdgpu/si: add need_reset_on_init asic callback for SI (v2)

2019-01-08 Thread Alex Deucher
SI chips don't require a reset on reload due to the nature of the SMU on them. v2: rebase Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/si.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c index

[PATCH 1/6] drm/amdgpu: add need_reset_on_init asic callback (v2)

2019-01-08 Thread Alex Deucher
Used to determine if we need to reset the asic on init due to the driver having been previously loaded or not shutdown cleanly. E.g., kexec or VM passthrough. v2: rebase Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 0/6] kexec fixes

2019-01-08 Thread Alex Deucher
Fixes for kexec. The GPU needs to be reset before the driver can be loaded again reliably. Needed for kexec for booting some ppc platforms. See: https://bugs.freedesktop.org/show_bug.cgi?id=108585 Alex Deucher (6): drm/amdgpu: add need_reset_on_init asic callback (v2) drm/amdgpu/si: add

[PATCH 3/6] drm/amdgpu/cik: add need_reset_on_init asic callback for CIK (v2)

2019-01-08 Thread Alex Deucher
CIK chips require a reset if the driver was previously loaded because the SMU can only be loaded once between each reset. v2: rebase Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/cik.c | 18 ++ 1 file changed, 18 insertions(+) diff --git

[PATCH 4/6] drm/amdgpu/vi: add need_reset_on_init asic callback for VI (v2)

2019-01-08 Thread Alex Deucher
VI chips require a reset if the driver was previously loaded because the SMU can only be loaded once between each reset. v2: rebase Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vi.c | 18 ++ 1 file changed, 18 insertions(+) diff --git

RE: [PATCH] drm/amdgpu: expose sclk and mclk via hwmon

2019-01-08 Thread Freehill, Chris
Ditto...except if those files Felix mentioned were to go away as pp_od_clk_voltage more widely used, then we would need this. I think Alex had mentioned there was some redundancy between those, but pp_od_clk_voltage didn't indicate the current frequencies. Chris -Original Message-

Re: [PATCH] drm/amdgpu: expose sclk and mclk via hwmon

2019-01-08 Thread Kuehling, Felix
I'm not saying it's useless. But rocm-smi can already get the clocks from sysfs (pp_dpm_sclk and pp_dpm_mclk). Are these clocks any different? Regards,   Felix On 2019-01-08 4:32 p.m., Deucher, Alexander wrote: > > Ping?  Useful for rocm-smi? > >

Re: [PATCH] drm/amdgpu: expose sclk and mclk via hwmon

2019-01-08 Thread Deucher, Alexander
Ping? Useful for rocm-smi? From: Alex Deucher Sent: Monday, December 10, 2018 4:17:27 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH] drm/amdgpu: expose sclk and mclk via hwmon Expose sclk (gfx clock) and mclk (memory clock) via

Re: [PATCH v2 0/3] drm/amdgpu: Fix suspend/resume issues with MST

2019-01-08 Thread Lyude Paul
On Tue, 2019-01-08 at 16:17 -0500, Alex Deucher wrote: > On Tue, Jan 8, 2019 at 4:11 PM Lyude Paul wrote: > > Fix the suspend/issues that Jerry Zuo found in amdgpu, and add some > > compiler warnings for drivers ignoring the return code of > > drm_dp_mst_topology_mgr_resume() to help ensure we

Re: [PATCH v2 0/3] drm/amdgpu: Fix suspend/resume issues with MST

2019-01-08 Thread Alex Deucher
On Tue, Jan 8, 2019 at 4:11 PM Lyude Paul wrote: > > Fix the suspend/issues that Jerry Zuo found in amdgpu, and add some > compiler warnings for drivers ignoring the return code of > drm_dp_mst_topology_mgr_resume() to help ensure we don't need to fix > this again in the future for someone else's

[PATCH v2 3/3] drm/dp_mst: Add __must_check to drm_dp_mst_topology_mgr_resume()

2019-01-08 Thread Lyude Paul
Since I've had to fix two cases of drivers not checking the return code from this function, let's make the compiler complain so this doesn't come up again in the future. Changes since v1: * Remove unneeded __must_check in function declaration - danvet Signed-off-by: Lyude Paul Cc: Jerry Zuo

[PATCH v2 2/3] drm/amdgpu: Don't fail resume process if resuming atomic state fails

2019-01-08 Thread Lyude Paul
This is an ugly one unfortunately. Currently, all DRM drivers supporting atomic modesetting will save the state that userspace had set before suspending, then attempt to restore that state on resume. This probably worked very well at one point, like many other things, until DP MST came into the

[PATCH v2 1/3] drm/amdgpu: Don't ignore rc from drm_dp_mst_topology_mgr_resume()

2019-01-08 Thread Lyude Paul
drm_dp_mst_topology_mgr_resume() returns whether or not it managed to find the topology in question after a suspend resume cycle, and the driver is supposed to check this value and disable MST accordingly if it's gone-in addition to sending a hotplug in order to notify userspace that something

[PATCH v2 0/3] drm/amdgpu: Fix suspend/resume issues with MST

2019-01-08 Thread Lyude Paul
Fix the suspend/issues that Jerry Zuo found in amdgpu, and add some compiler warnings for drivers ignoring the return code of drm_dp_mst_topology_mgr_resume() to help ensure we don't need to fix this again in the future for someone else's driver. Cc: Jerry Zuo Lyude Paul (3): drm/amdgpu:

Re: [PATCH v4 00/16] MST refcounting/atomic helpers cleanup

2019-01-08 Thread Lyude Paul
On Tue, 2019-01-08 at 19:57 +, Wentland, Harry wrote: > On 2019-01-04 7:14 p.m., Lyude Paul wrote: > > This is the series I've been working on for a while now to get all of > > the atomic DRM drivers in the tree to use the atomic MST helpers, and to > > make the atomic MST helpers actually

Re: [PATCH v4 00/16] MST refcounting/atomic helpers cleanup

2019-01-08 Thread Wentland, Harry
On 2019-01-04 7:14 p.m., Lyude Paul wrote: > This is the series I've been working on for a while now to get all of > the atomic DRM drivers in the tree to use the atomic MST helpers, and to > make the atomic MST helpers actually idempotent. Turns out it's a lot > more difficult to do that without

Re: [PATCH v2 07/16] drm/amdgpu/display: Keep malloc ref to MST port

2019-01-08 Thread Wentland, Harry
On 2018-12-19 7:19 p.m., Lyude Paul wrote: > Just like i915 and nouveau, it's a good idea for us to hold a malloc > reference to the port here so that we never pass a freed pointer to any > of the DP MST helper functions. > > Also, we stop unsetting aconnector->port in >

[PATCH AUTOSEL 4.4 07/28] drm/amdgpu: Correct get_crtc_scanoutpos behavior when vpos >= vtotal

2019-01-08 Thread Sasha Levin
From: Nicholas Kazlauskas [ Upstream commit 520f08df45fbe300ed650da786a74093d658b7e1 ] When variable refresh rate is active the hardware counter can return a position >= vtotal. This results in a vpos being returned from amdgpu_display_get_crtc_scanoutpos that's a positive value. The positive

[PATCH AUTOSEL 4.9 10/36] drm/amdgpu: Correct get_crtc_scanoutpos behavior when vpos >= vtotal

2019-01-08 Thread Sasha Levin
From: Nicholas Kazlauskas [ Upstream commit 520f08df45fbe300ed650da786a74093d658b7e1 ] When variable refresh rate is active the hardware counter can return a position >= vtotal. This results in a vpos being returned from amdgpu_display_get_crtc_scanoutpos that's a positive value. The positive

[PATCH AUTOSEL 4.14 13/53] drm/amdgpu: Correct get_crtc_scanoutpos behavior when vpos >= vtotal

2019-01-08 Thread Sasha Levin
From: Nicholas Kazlauskas [ Upstream commit 520f08df45fbe300ed650da786a74093d658b7e1 ] When variable refresh rate is active the hardware counter can return a position >= vtotal. This results in a vpos being returned from amdgpu_display_get_crtc_scanoutpos that's a positive value. The positive

[PATCH AUTOSEL 4.19 30/97] drm/amdgpu: Reorder uvd ring init before uvd resume

2019-01-08 Thread Sasha Levin
From: Chris Wilson [ Upstream commit 3b34c14fd50c302db091f020f26dd00ede902c80 ] As amd_uvd_resume() accesses the uvd ring, it must be initialised first or else we trigger errors like: [5.595963] [drm] Found UVD firmware Version: 1.87 Family ID: 17 [5.595969] [drm] PSP loading UVD

[PATCH AUTOSEL 4.19 26/97] drm/amdgpu: Correct get_crtc_scanoutpos behavior when vpos >= vtotal

2019-01-08 Thread Sasha Levin
From: Nicholas Kazlauskas [ Upstream commit 520f08df45fbe300ed650da786a74093d658b7e1 ] When variable refresh rate is active the hardware counter can return a position >= vtotal. This results in a vpos being returned from amdgpu_display_get_crtc_scanoutpos that's a positive value. The positive

[PATCH AUTOSEL 4.19 03/97] drm/amd/display: Guard against null stream_state in set_crc_source

2019-01-08 Thread Sasha Levin
From: Nicholas Kazlauskas [ Upstream commit f41a895026b8cb6f765190de7d2e7bc3ccbbd183 ] [Why] The igt@kms_plane@pixel-format-pipe tests can create a sequence where stream_state is NULL during amdgpu_dm_crtc_set_crc_source which results in a null pointer dereference. [How] Guard against

[PATCH AUTOSEL 4.19 04/97] drm/amdkfd: fix interrupt spin lock

2019-01-08 Thread Sasha Levin
From: Christian König [ Upstream commit 2383a767c0ca06f96534456d8313909017c6c8d0 ] Vega10 has multiple interrupt rings, so this can be called from multiple calles at the same time resulting in: [ 71.779334] [ 71.779406] WARNING: inconsistent lock state [

Re: [PATCH v2 05/16] drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs

2019-01-08 Thread Wentland, Harry
On 2018-12-19 7:19 p.m., Lyude Paul wrote: > Up until now, freeing payloads on remote MST hubs that just had ports > removed has almost never worked because we've been relying on port > validation in order to stop us from accessing ports that have already > been freed from memory, but ports which

[PATCH AUTOSEL 4.20 039/117] drm/amdgpu: Reorder uvd ring init before uvd resume

2019-01-08 Thread Sasha Levin
From: Chris Wilson [ Upstream commit 3b34c14fd50c302db091f020f26dd00ede902c80 ] As amd_uvd_resume() accesses the uvd ring, it must be initialised first or else we trigger errors like: [5.595963] [drm] Found UVD firmware Version: 1.87 Family ID: 17 [5.595969] [drm] PSP loading UVD

Re: [PATCH v2 04/16] drm/dp_mst: Stop releasing VCPI when removing ports from topology

2019-01-08 Thread Wentland, Harry
On 2018-12-19 7:19 p.m., Lyude Paul wrote: > This has never actually worked, and isn't needed anyway: the driver's > always going to try to deallocate VCPI when it tears down the display > that the VCPI belongs to. > > Signed-off-by: Lyude Paul > Reviewed-by: Daniel Vetter > Cc: David Airlie >

[PATCH AUTOSEL 4.20 034/117] drm/amdgpu: Correct get_crtc_scanoutpos behavior when vpos >= vtotal

2019-01-08 Thread Sasha Levin
From: Nicholas Kazlauskas [ Upstream commit 520f08df45fbe300ed650da786a74093d658b7e1 ] When variable refresh rate is active the hardware counter can return a position >= vtotal. This results in a vpos being returned from amdgpu_display_get_crtc_scanoutpos that's a positive value. The positive

[PATCH AUTOSEL 4.20 005/117] drm/amdkfd: fix interrupt spin lock

2019-01-08 Thread Sasha Levin
From: Christian König [ Upstream commit 2383a767c0ca06f96534456d8313909017c6c8d0 ] Vega10 has multiple interrupt rings, so this can be called from multiple calles at the same time resulting in: [ 71.779334] [ 71.779406] WARNING: inconsistent lock state [

[PATCH AUTOSEL 4.20 004/117] drm/amd/display: Guard against null stream_state in set_crc_source

2019-01-08 Thread Sasha Levin
From: Nicholas Kazlauskas [ Upstream commit f41a895026b8cb6f765190de7d2e7bc3ccbbd183 ] [Why] The igt@kms_plane@pixel-format-pipe tests can create a sequence where stream_state is NULL during amdgpu_dm_crtc_set_crc_source which results in a null pointer dereference. [How] Guard against

Re: [PATCH v2 03/16] drm/dp_mst: Restart last_connected_port_and_mstb() if topology ref fails

2019-01-08 Thread Wentland, Harry
On 2018-12-19 7:19 p.m., Lyude Paul wrote: > While this isn't a complete fix, this will improve the reliability of > drm_dp_get_last_connected_port_and_mstb() pretty significantly during > hotplug events, since there's a chance that the in-memory topology tree > may not be fully updated when

Re: [PATCH v4 02/16] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports

2019-01-08 Thread Wentland, Harry
On 2019-01-04 7:14 p.m., Lyude Paul wrote: > The current way of handling refcounting in the DP MST helpers is really > confusing and probably just plain wrong because it's been hacked up many > times over the years without anyone actually going over the code and > seeing if things could be

Re: [PATCH 0/3] drm/amdgpu: Fix suspend/resume issues with MST

2019-01-08 Thread Wentland, Harry
On 2019-01-07 7:56 p.m., Lyude Paul wrote: > Fix the suspend/issues that Jerry Zuo found in amdgpu, and add some > compiler warnings for drivers ignoring the return code of > drm_dp_mst_topology_mgr_resume() to help ensure we don't need to fix > this again in the future for someone else's driver.

[PATCH 3/4] drm/radeon: Use drm_hdmi_avi_infoframe_quant_range()

2019-01-08 Thread Ville Syrjala
From: Ville Syrjälä Fill out the AVI infoframe quantization range bits using drm_hdmi_avi_infoframe_quant_range() instead of hand rolling it. This changes the behaviour slightly as drm_hdmi_avi_infoframe_quant_range() will set a non-zero Q bit even when QS==0 iff the Q bit matched the default

[PATCH 1/4] drm/edid: Pass connector to AVI infoframe functions

2019-01-08 Thread Ville Syrjala
From: Ville Syrjälä Make life easier for drivers by simply passing the connector to drm_hdmi_avi_infoframe_from_display_mode() and drm_hdmi_avi_infoframe_quant_range(). That way drivers don't need to worry about is_hdmi2_sink mess. v2: Make is_hdmi2_sink() return true for sil-sii8620 Adapt

[PATCH 4/4] drm/edid: Add display_info.rgb_quant_range_selectable

2019-01-08 Thread Ville Syrjala
From: Ville Syrjälä Move the CEA-861 QS bit handling entirely into the edid code. No need to bother the drivers with this. Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: amd-gfx@lists.freedesktop.org Cc: Eric Anholt (supporter:DRM DRIVERS FOR VC4) Signed-off-by:

[PATCH 25/25] drm/amd/display: 3.2.14

2019-01-08 Thread sunpeng.li
From: Steven Chiu Signed-off-by: Steven Chiu Reviewed-by: Yongqiang Sun Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index

[PATCH 23/25] drm/amd/display: Check if registers are available before accessing

2019-01-08 Thread sunpeng.li
From: Eric Bernstein Check if VERT_FILTER_INIT_BOT and BLACK_OFFSET registers exists in the DCN SCL IP block before trying to access. Signed-off-by: Eric Bernstein Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li --- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 42

[PATCH 20/25] drm/amd/display: add workaround for 4k video underflow

2019-01-08 Thread sunpeng.li
From: Eric Yang [Why] On DCN1, there is an issue where on high BW config on single channel systems, underflow will be observed if DCC is disabled. This issue can be observed on several use cases. For this particular case, it is observed when playing 4k video on 4k desktop with video downscaled

[PATCH 13/25] drm/amd/display: Shift dc link aux to aux_payload

2019-01-08 Thread sunpeng.li
From: David Francis [Why] aux_payload should be the struct used inside dc to start aux transactions. This will allow the old aux interface to be seamlessly replaced. [How] Add three fields to aux_payload: reply, mot, defer_delay This will mean that aux_payload has all data required to submit a

[PATCH 15/25] drm/amd/display: Change from aux_engine to dce_aux

2019-01-08 Thread sunpeng.li
From: David Francis [Why] The aux_engine struct is needlessly complex and is defined multiple times. It contains function pointers that each have only one version and are called only from inside dce_aux. [How] Replace aux_engine with a new struct called dce_aux. Remove all function pointers

[PATCH 24/25] drm/amd/display: Check for NULL when creating gamma struct

2019-01-08 Thread sunpeng.li
From: Krunoslav Kovac [Wjy] Some stress test is causing unexpected memory allocation failure. This prevents null dereference but there will likely be problems later, hard to gracefully handle memalloc fail for critical objects. Signed-off-by: Krunoslav Kovac Reviewed-by: Anthony Koo Acked-by:

[PATCH 03/25] drm/amd/display: Pack DMCU iRAM alignment

2019-01-08 Thread sunpeng.li
From: Josip Pavic [Why] When the DMCU's iRAM definition was moved to the newly created power_helpers, a #pragma pack was lost, causing the iRAM to be misaligned [How] Restore the #pragma pack Signed-off-by: Josip Pavic Reviewed-by: Anthony Koo Acked-by: Leo Li ---

[PATCH 14/25] drm/amd/display: Switch ddc to new aux interface

2019-01-08 Thread sunpeng.li
From: David Francis [Why] The old aux interface goes through i2caux and the aux_engine and engine function pointers. The multiple layers of indirection make it hard to tell waht is happening. The aux algorithm does not need to be this complicated: attempt to submit the request. If you get an

[PATCH 12/25] drm/amd/display: 3.2.13

2019-01-08 Thread sunpeng.li
From: Steven Chiu Signed-off-by: Steven Chiu Reviewed-by: Yongqiang Sun Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index

[PATCH 00/25] DC Patches Jan 08, 2019

2019-01-08 Thread sunpeng.li
From: Leo Li Summary of change: * AUX interface cleanup and refactor * Fix potential warning storm on Raven * Fix vanishing cursor bug on Raven Bayan Zabihiyan (1): drm/amd/display: Add new infopacket definition Charlene Liu (2): drm/amd/display: fix PME notification not working in RV

[PATCH 18/25] drm/amd/display: fix warning on raven hotplug

2019-01-08 Thread sunpeng.li
From: Roman Li [Why] Hotplug on raven results in REG_WAIT_TIMEOUT warning due to failing attempt to lock disabled otg for the hubp interdependent pipes programming. [How] Don't setup pipe interdependencies for disabled otg. Also removed the unnecessary duplicate logic checks. Signed-off-by:

[PATCH 22/25] drm/amd/display: Add new infopacket definition

2019-01-08 Thread sunpeng.li
From: Bayan Zabihiyan Modify freesync module to build VTEM infopackets when in HdmiVRR mode Signed-off-by: Bayan Zabihiyan Reviewed-by: Jun Lei Acked-by: Leo Li --- .../drm/amd/display/modules/freesync/freesync.c| 94 --

[PATCH 02/25] drm/amd/display: Fix missing hwss function for dce

2019-01-08 Thread sunpeng.li
From: Joshua Aberback [Why] The driver will crash on dce hardware due to a null function pointer. [How] - bring back "program_csc_matrix" functionality as "program_output_csc" for dce110 - dce110 doesn't use the "opp_id" parameter, so use 0 when there's no hubp Signed-off-by: Joshua Aberback

[PATCH 17/25] drm/amd/display: dal-pplib interface refactor dal part

2019-01-08 Thread sunpeng.li
From: hersen wu [WHY] clarify dal input parameters to pplib interface, remove un-used parameters. dal knows exactly which parameters needed and their effects at pplib and smu sides. current dal sequence for dcn1_update_clock to pplib: 1.smu10_display_clock_voltage_request for dcefclk

[PATCH 11/25] drm/amd/display: Fix disabled cursor on top screen edge

2019-01-08 Thread sunpeng.li
From: Nicholas Kazlauskas [Why] The cursor vanishes when touching the top of edge of the screen for Raven on Linux. This occurs because the cursor height is not taken into account when deciding to disable the cursor. [How] Factor in the cursor height into the cursor calculations - and mimic

[PATCH 09/25] drm/amd/display: Fix for NULL ramp pointer crashing driver

2019-01-08 Thread sunpeng.li
From: Joshua Aberback [Why] In certain scenarios the ramp parameter come in as NULL, which crashes because this function doesn't guard properly in the early return. [How] - parameter mapUserRamp should be the guard (false means no ramp) - remove checking ramp in early return Signed-off-by:

[PATCH 08/25] drm/amd/display: Redefine DMCU_SCRATCH to identify DMCU state

2019-01-08 Thread sunpeng.li
From: Martin Tsai [why] To resume system before entering S0i3 completely will cause PSP not reload DMCU FW since there is not HW power state change. In this case, driver cannot get correct DMCU version from IRAM since driver override it and DMCU didn't reload to update it. It makes driver return

[PATCH 04/25] drm/amd/display: fix CTS 4.2.2.8

2019-01-08 Thread sunpeng.li
From: abdoulaye berthe [Why] 1-Test equipment does not reset test automation flag after completing current test causing the next test to fail. 2.When test request is empty, we shouldn't ack the test. [How] 1-Driver should always clear test equipment automation test request when request is

[PATCH 21/25] drm/amd/display: Rename configure_encoder to enc1_configure_encoder

2019-01-08 Thread sunpeng.li
From: Dmytro Laktyushkin Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)

[PATCH 05/25] Revert "drm/amd/display: Signal hw_done() after waiting for flip_done()"

2019-01-08 Thread sunpeng.li
From: Leo Li This reverts commit 717276b9256f5d97b43e53adca1670cee2c45db2. The reverted patch was a workaround that addressed an issue fixed by: 4364bcb2cd21 ("drm: Get ref on CRTC commit object when waiting for flip_done") Signed-off-by: Leo Li Reviewed-by: Nicholas Kazlauskas ---

[PATCH 07/25] drm/amd/display: fix PME notification not working in RV desktop

2019-01-08 Thread sunpeng.li
From: Charlene Liu [Why] PPLIB not receive the PME when unplug. Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[PATCH 10/25] drm/amd/display: Set link rate set if eDP ver >= 1.4.

2019-01-08 Thread sunpeng.li
From: Derek Lai [Why] If eDP ver >= 1.4, the Source device must use LINK_RATE_SET. [How] Get LINK_RATE_SET by reading DPCD 10h-1fh, then write DPCD 00115h before link training. Signed-off-by: Derek Lai Reviewed-by: Tony Cheng Acked-by: Leo Li ---

[PATCH 01/25] drm/amd/display: 3.2.12

2019-01-08 Thread sunpeng.li
From: Steven Chiu Signed-off-by: Steven Chiu Reviewed-by: Yongqiang Sun Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index

[PATCH 06/25] drm/amd/display: refactor reg_update

2019-01-08 Thread sunpeng.li
From: Tony Cheng [why] separate register access from logic to allow us abstract register sequences [how] consolidate mask and value first then apply to register. Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dc_helper.c | 36

Re: [PATCH] drm/amdgpu: Add sysfs file for PCIe usage v3

2019-01-08 Thread Alex Deucher
On Tue, Jan 8, 2019 at 6:28 AM Russell, Kent wrote: > > Add a sysfs file that reports the number of bytes transmitted and > received in the last second. This can be used to approximate the PCIe > bandwidth usage over the last second. > > v2: Clarify use of mps as estimation of bandwidth > v3:

Re: [PATCH] drm/amdgpu: Add sysfs file for PCIe usage v3

2019-01-08 Thread Alex Deucher
On Tue, Jan 8, 2019 at 11:02 AM Kuehling, Felix wrote: > > > On 2019-01-08 6:28 a.m., Russell, Kent wrote: > > Add a sysfs file that reports the number of bytes transmitted and > > received in the last second. This can be used to approximate the PCIe > > bandwidth usage over the last second. > >

Re: [PATCH] drm/amdgpu: Add sysfs file for PCIe usage v3

2019-01-08 Thread Kuehling, Felix
On 2019-01-08 6:28 a.m., Russell, Kent wrote: > Add a sysfs file that reports the number of bytes transmitted and > received in the last second. This can be used to approximate the PCIe > bandwidth usage over the last second. > > v2: Clarify use of mps as estimation of bandwidth I think you only

Re: [PATCH v6 1/2] drm/amd: validate user pitch alignment

2019-01-08 Thread Michel Dänzer
On 2019-01-07 11:51 p.m., Yu Zhao wrote: > Userspace may request pitch alignment that is not supported by GPU. > Some requests 32, but GPU ignores it and uses default 64 when cpp is > 4. If GEM object is allocated based on the smaller alignment, GPU > DMA will go out of bound. > > Cc:

Re: Adaptive Sync/VRR not working in multi-head with a non-freesync monitor

2019-01-08 Thread Michel Dänzer
On 2019-01-08 1:41 p.m., Ilya Trukhanov wrote: > Tried Unigine Valley with bspwm and Plasma, Freesync does not get > engaged when second monitor (without Freesync support) is in use. > If I turn it off with e.g. > > $ xrandr --output HDMI-A-0 --off > > Freesync immediately starts working. Once I

Re: [PATCH] drm/amdgpu: fix CPDMA hang in PRT mode for VEGA20

2019-01-08 Thread Alex Deucher
On Tue, Jan 8, 2019 at 5:55 AM Tao Zhou wrote: > > Fix CPDMA hang in PRT mode for both of VEGA10 and VEGA20 > > Change-Id: I0e5e089d2192063c4a04fa6dbd534f25eb0177be > Signed-off-by: Tao Zhou > Tested-by: Yukun.Li Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10

Adaptive Sync/VRR not working in multi-head with a non-freesync monitor

2019-01-08 Thread Ilya Trukhanov
Tried Unigine Valley with bspwm and Plasma, Freesync does not get engaged when second monitor (without Freesync support) is in use. If I turn it off with e.g. $ xrandr --output HDMI-A-0 --off Freesync immediately starts working. Once I turn the monitor back on, Freesync is gone. Looking

[PATCH] drm/amdgpu: Add sysfs file for PCIe usage v3

2019-01-08 Thread Russell, Kent
Add a sysfs file that reports the number of bytes transmitted and received in the last second. This can be used to approximate the PCIe bandwidth usage over the last second. v2: Clarify use of mps as estimation of bandwidth v3: Don't make the file on APUs Signed-off-by: Kent Russell ---

[PATCH 2/2] drm/amdgpu: Add sysfs file for PCIe usage v2

2019-01-08 Thread Russell, Kent
Add a sysfs file that reports the number of bytes transmitted and received in the last second. This can be used to approximate the PCIe bandwidth usage over the last second. v2: Clarify use of mps as estimation of bandwidth Signed-off-by: Kent Russell --- drivers/gpu/drm/amd/amdgpu/amdgpu.h

  1   2   >