[PATCH 10/26] drm/dp_mst: Constify guid in drm_dp_get_mst_branch_by_guid()

2019-07-17 Thread Lyude Paul
And it's helper, we'll be using this in just a moment. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topol

[PATCH 11/26] drm/dp_mst: Refactor drm_dp_mst_handle_up_req()

2019-07-17 Thread Lyude Paul
There's a couple of changes here, so to summarize: * Remove the big ugly mgr->up_req_recv.have_eomt conditional to save on indenting * Store &mgr->up_req_recv.initial_hdr in a variable so we don't keep going over 80 character long lines * De-duplicate code for calling drm_dp_send_up_ack_reply(

[PATCH 02/26] drm/dp_mst: Destroy mstbs from destroy_connector_work

2019-07-17 Thread Lyude Paul
Currently we remove MST branch devices from the in-memory topology immediately when their topology refcount reaches 0. This works just fine at the moment, but since we're about to add suspend/resume reprobing for MST topologies we're going to need to be able to travel through the topology and drop

[PATCH 12/26] drm/dp_mst: Refactor drm_dp_mst_handle_down_rep()

2019-07-17 Thread Lyude Paul
* Remove the big ugly have_eomt conditional * Store &mgr->down_rep_recv.initial_hdr in a var to make line wrapping easier * Remove duplicate memset() calls * Actually wrap lines Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyude Paul --- drivers/gpu/drm/d

[PATCH 04/26] drm/print: Add drm_err_printer()

2019-07-17 Thread Lyude Paul
A simple convienence function that returns a drm_printer which prints using pr_err() Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_print.c | 6 ++ include/drm/drm_print.h | 17 + 2 files changed, 23

[PATCH 07/26] drm/dp_mst: Get rid of list clear in drm_dp_finish_destroy_port()

2019-07-17 Thread Lyude Paul
This seems to be some leftover detritus from before the port/mstb kref cleanup and doesn't do anything anymore, so get rid of it. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 -- 1 file changed, 2 del

[PATCH 09/26] drm/dp_mst: Remove huge conditional in drm_dp_mst_handle_up_req()

2019-07-17 Thread Lyude Paul
Which reduces indentation and makes this function more legible. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 90 +-- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git

[PATCH 13/26] drm/dp_mst: Destroy topology_mgr mutexes

2019-07-17 Thread Lyude Paul
Turns out we've been forgetting for a while now to actually destroy any of the mutexes that we create in drm_dp_mst_topology_mgr. So, let's do that. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 5 +

[PATCH 01/26] drm/dp_mst: Move link address dumping into a function

2019-07-17 Thread Lyude Paul
Since we're about to be calling this from multiple places. Also it makes things easier to read! Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 35 ++- 1 file changed, 23 insertions

[PATCH 03/26] drm/dp_mst: Move test_calc_pbn_mode() into an actual selftest

2019-07-17 Thread Lyude Paul
Yes, apparently we've been testing this for every single driver load for quite a long time now. At least that means our PBN calculation is solid! Anyway, introduce self tests for MST and move this into there. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyud

[PATCH 05/26] drm/dp_mst: Add sideband down request tracing + selftests

2019-07-17 Thread Lyude Paul
Unfortunately the DP MST helpers do not have much in the way of debugging utilities. So, let's add some! This adds basic debugging output for down sideband requests that we send from the driver, so that we can actually discern what's happening when sideband requests timeout. Note that with this co

[PATCH 06/26] drm/dp_mst: Move PDT teardown for ports into destroy_connector_work

2019-07-17 Thread Lyude Paul
This will allow us to add some locking for port PDTs, which can't be done from drm_dp_destroy_port() since we don't know what locks the caller might be holding. Also, this gets rid of a good bit of unneeded code. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: L

[PATCH 08/26] drm/dp_mst: Refactor drm_dp_send_enum_path_resources

2019-07-17 Thread Lyude Paul
Use more pointers so we don't have to write out txmsg->reply.u.path_resources each time. Also, fix line wrapping + rearrange local variables. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 24

[PATCH 00/26] DP MST Refactors + debugging tools + suspend/resume reprobing

2019-07-17 Thread Lyude Paul
This is the large series for adding MST suspend/resume reprobing that I've been working on for quite a while now. In addition, I: - Refactored and cleaned up any code I ended up digging through in the process of understanding how some parts of these helpers worked. - Added some debugging tools a

[PATCH 14/26] drm/dp_mst: Cleanup drm_dp_send_link_address() a bit

2019-07-17 Thread Lyude Paul
Declare local pointer to the drm_dp_link_address_ack_reply struct instead of constantly dereferencing it through the union in txmsg->reply. Then, invert the order of conditionals so we don't have to do the bulk of the work inside them, and can wrap lines even less. Then finally, rearrange variable

[PATCH 18/26] drm/dp_mst: Handle UP requests asynchronously

2019-07-17 Thread Lyude Paul
Once upon a time, hotplugging devices on MST branches actually worked in DRM. Now, it only works in amdgpu (likely because of how it's hotplug handlers are implemented). On both i915 and nouveau, hotplug notifications from MST branches are noticed - but trying to respond to them causes messaging ti

[PATCH 20/26] drm/dp_mst: Don't forget to update port->input in drm_dp_mst_handle_conn_stat()

2019-07-17 Thread Lyude Paul
This probably hasn't caused any problems up until now since it's probably nearly impossible to encounter this in the wild, however if we were to receive a connection status notification from the MST hub after resume while we're in the middle of reprobing the link addresses for a topology then there

[PATCH 15/26] drm/dp_mst: Refactor pdt setup/teardown, add more locking

2019-07-17 Thread Lyude Paul
Since we're going to be implementing suspend/resume reprobing very soon, we need to make sure we are extra careful to ensure that our locking actually protects the topology state where we expect it to. Turns out this isn't the case with drm_dp_port_setup_pdt() and drm_dp_port_teardown_pdt(), both o

[PATCH 23/26] drm/amdgpu/dm: Resume short HPD IRQs before resuming MST topology

2019-07-17 Thread Lyude Paul
Since we're going to be reprobing the entire topology state on resume now using sideband transactions, we need to ensure that we actually have short HPD irqs enabled before calling drm_dp_mst_topology_mgr_resume(). So, do that. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland S

[PATCH 16/26] drm/dp_mst: Rename drm_dp_add_port and drm_dp_update_port

2019-07-17 Thread Lyude Paul
The names for these functions are rather confusing. drm_dp_add_port() sounds like a function that would simply create a port and add it to a topology, and do nothing more. Similarly, drm_dp_update_port() would be assumed to be the function that should be used to update port information after initia

[PATCH 17/26] drm/dp_mst: Remove lies in {up,down}_rep_recv documentation

2019-07-17 Thread Lyude Paul
These are most certainly accessed from far more than the mgr work. In fact, up_req_recv is -only- ever accessed from outside the mgr work. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyude Paul --- include/drm/drm_dp_mst_helper.h | 8 ++-- 1 file chang

[PATCH 19/26] drm/dp_mst: Protect drm_dp_mst_port members with connection_mutex

2019-07-17 Thread Lyude Paul
Yes-you read that right. Currently there is literally no locking in place for any of the drm_dp_mst_port struct members that can be modified in response to a link address response, or a connection status response. Which literally means if we're unlucky enough to have any sort of hotplugging event h

[PATCH 22/26] drm/amdgpu: Iterate through DRM connectors correctly

2019-07-17 Thread Lyude Paul
Currently, every single piece of code in amdgpu that loops through connectors does it incorrectly and doesn't use the proper list iteration helpers, drm_connector_list_iter_begin() and drm_connector_list_iter_end(). Yeesh. So, do that. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry We

[PATCH 21/26] drm/nouveau: Don't grab runtime PM refs for HPD IRQs

2019-07-17 Thread Lyude Paul
In order for suspend/resume reprobing to work, we need to be able to perform sideband communications during suspend/resume, along with runtime PM suspend/resume. In order to do so, we also need to make sure that nouveau doesn't bother grabbing a runtime PM reference to do so, since otherwise we'll

[PATCH 24/26] drm/dp_mst: Add basic topology reprobing when resuming

2019-07-17 Thread Lyude Paul
Finally! For a very long time, our MST helpers have had one very annoying issue: They don't know how to reprobe the topology state when coming out of suspend. This means that if a user has a machine connected to an MST topology and decides to suspend their machine, we lose all topology changes that

[PATCH 25/26] drm/dp_mst: Also print unhashed pointers for malloc/topology references

2019-07-17 Thread Lyude Paul
Currently we only print mstb/port pointer addresses in our malloc and topology refcount functions using the hashed-by-default %p, but unfortunately if you're trying to debug a use-after-free error caused by a refcounting error then this really isn't terribly useful. On the other hand though, everyt

[PATCH 26/26] drm/dp_mst: Add topology ref history tracking for debugging

2019-07-17 Thread Lyude Paul
For very subtle mistakes with topology refs, it can be rather difficult to trace them down with the debugging info that we already have. I had one such issue recently while trying to implement suspend/resume reprobing for MST, and ended up coming up with this. Inspired by Chris Wilson's wakeref tr

[PATCH] drm/amdgpu/dm: Remove unneeded hotplug event in s3_handle_mst()

2019-07-17 Thread Lyude Paul
The DRM DP MST topology manager will send it's own hotplug events when connectors are destroyed, so there's no reason to send an additional hotplug event here. Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 - 1 file changed, 4 insertions(+), 5 deleti

[Bug 109955] amdgpu [RX Vega 64] system freeze while gaming

2019-07-17 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=109955 --- Comment #55 from Hadet --- So I think this might have something to do with something Xorg is doing because I've not had it happen while gaming for many hours since just seeing if it happened on wayland on a whim. I now have 21 hours of uptim

RE: [EXT] Re: [PATCH] drm/arm/mali-dp: Add display QoS interface configuration

2019-07-17 Thread Wen He
> -Original Message- > From: Liviu Dudau > Sent: 2019年7月17日 19:22 > To: Wen He > Cc: dri-devel@lists.freedesktop.org; linux-ker...@vger.kernel.org; > brian.star...@arm.com; airl...@linux.ie; dan...@ffwll.ch; Leo Li > > Subject: [EXT] Re: [PATCH] drm/arm/mali-dp: Add display QoS interfa

[Bug 110813] Vega hang on Surviving Mars game

2019-07-17 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110813 --- Comment #3 from Yury Zhuravlev --- Looks like with kernel 5.2 and latest mesa I have no hang anymore, at lest very quick. I still want to test more but it's definitely better. -- You are receiving this mail because: You are the assignee fo

[Bug 109179] Surviving Mars - Graphical artifacts on game map

2019-07-17 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=109179 Yury Zhuravlev changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

<    1   2