Displaying 20 results from an estimated 52 matches for "connection_mutex".
2019 Sep 25
1
[PATCH v2 20/27] drm/dp_mst: Protect drm_dp_mst_port members with connection_mutex
...said struct members becomes
> undefined. Fun!
>
> So, finally add some simple locking protections to our MST helpers by
> protecting any drm_dp_mst_port members which can be changed by link
> address responses or connection status notifications under
> drm_device->mode_config.connection_mutex.
>
> Cc: Juston Li <juston.li at intel.com>
> Cc: Imre Deak <imre.deak at intel.com>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Cc: Harry Wentland <hwentlan at amd.com>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> Signed-off-by:...
2019 Sep 03
0
[PATCH v2 20/27] drm/dp_mst: Protect drm_dp_mst_port members with connection_mutex
...39;ll race and the contents of said struct members becomes
undefined. Fun!
So, finally add some simple locking protections to our MST helpers by
protecting any drm_dp_mst_port members which can be changed by link
address responses or connection status notifications under
drm_device->mode_config.connection_mutex.
Cc: Juston Li <juston.li at intel.com>
Cc: Imre Deak <imre.deak at intel.com>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Cc: Harry Wentland <hwentlan at amd.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Signed-off-by: Lyude Paul <lyude at redhat.com...
2018 Sep 19
1
[PATCH v2 3/6] drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead
...turn &intel_dp->mst_encoders[crtc->pipe]->base.base;
}
@@ -514,7 +514,7 @@ static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
connector);
/* prevent race with the check in ->detect */
drm_modeset_lock(&connector->dev->mode_config.connection_mutex, NULL);
- intel_connector->mst_port = NULL;
+ intel_connector->mst_port_gone = true;
drm_modeset_unlock(&connector->dev->mode_config.connection_mutex);
drm_connector_put(connector);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 8fc61e96...
2019 Sep 03
0
[PATCH v2 21/27] drm/dp_mst: Don't forget to update port->input in drm_dp_mst_handle_conn_stat()
...struct drm_connector *connector_to_destroy = NULL;
+ int old_ddps, ret;
+ u8 new_pdt;
+ bool dowork = false, create_connector = false;
port = drm_dp_get_port(mstb, conn_stat->port_number);
if (!port)
return;
+ mutex_lock(&port->lock);
drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
old_ddps = port->ddps;
+ port->input = conn_stat->input_port;
port->mcs = conn_stat->message_capability_status;
port->ldps = conn_stat->legacy_device_plug_status;
port->ddps = conn_stat->displayport_device_plug_status;
@@ -2102,23 +2107,41 @@ drm_dp_mst_...
2018 Sep 18
4
[PATCH 3/6] drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead
...turn &intel_dp->mst_encoders[crtc->pipe]->base.base;
}
@@ -514,7 +514,7 @@ static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
connector);
/* prevent race with the check in ->detect */
drm_modeset_lock(&connector->dev->mode_config.connection_mutex, NULL);
- intel_connector->mst_port = NULL;
+ intel_connector->mst_port_gone = true;
drm_modeset_unlock(&connector->dev->mode_config.connection_mutex);
drm_connector_put(connector);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 8fc61e96...
2018 Sep 21
1
[Intel-gfx] [PATCH 3/6] drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead
...base;
> > }
> > @@ -514,7 +514,7 @@ static void intel_dp_destroy_mst_connector(struct
> > drm_dp_mst_topology_mgr *mgr,
> > connector);
> > /* prevent race with the check in ->detect */
> > drm_modeset_lock(&connector->dev->mode_config.connection_mutex, NULL);
> > - intel_connector->mst_port = NULL;
> > + intel_connector->mst_port_gone = true;
> > drm_modeset_unlock(&connector->dev->mode_config.connection_mutex);
> >
> > drm_connector_put(connector);
> > diff --git a/drivers/gpu/drm/i915/i...
2018 Dec 14
0
[WIP PATCH 09/15] drm/nouveau: Fix potential use-after-frees for MSTCs
...tor, path);
+ drm_dp_mst_get_port_malloc(port);
return 0;
}
@@ -1077,6 +1082,7 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
drm_fb_helper_remove_one_connector(&drm->fbcon->helper, &mstc->connector);
drm_modeset_lock(&drm->dev->mode_config.connection_mutex, NULL);
+ drm_dp_mst_put_port_malloc(mstc->port);
mstc->port = NULL;
drm_modeset_unlock(&drm->dev->mode_config.connection_mutex);
--
2.19.2
2018 Dec 14
0
[WIP PATCH 10/15] drm/nouveau: Stop unsetting mstc->port, use malloc refs
...rm_dp_mst_put_port_malloc(mstc->port);
kfree(mstc);
}
@@ -1081,11 +1078,6 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
drm_fb_helper_remove_one_connector(&drm->fbcon->helper, &mstc->connector);
- drm_modeset_lock(&drm->dev->mode_config.connection_mutex, NULL);
- drm_dp_mst_put_port_malloc(mstc->port);
- mstc->port = NULL;
- drm_modeset_unlock(&drm->dev->mode_config.connection_mutex);
-
drm_connector_put(&mstc->connector);
}
--
2.19.2
2019 Sep 03
50
[PATCH v2 00/27] DP MST Refactors + debugging tools + suspend/resume reprobing
...nk_address() a bit
drm/dp_mst: Refactor pdt setup/teardown, add more locking
drm/dp_mst: Rename drm_dp_add_port and drm_dp_update_port
drm/dp_mst: Remove lies in {up,down}_rep_recv documentation
drm/dp_mst: Handle UP requests asynchronously
drm/dp_mst: Protect drm_dp_mst_port members with connection_mutex
drm/dp_mst: Don't forget to update port->input in
drm_dp_mst_handle_conn_stat()
drm/nouveau: Don't grab runtime PM refs for HPD IRQs
drm/amdgpu: Iterate through DRM connectors correctly
drm/amdgpu/dm: Resume short HPD IRQs before resuming MST topology
drm/dp_mst: Add basic...
2018 Oct 05
0
[PATCH v4 3/5] drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead
...turn &intel_dp->mst_encoders[crtc->pipe]->base.base;
}
@@ -514,7 +514,7 @@ static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
connector);
/* prevent race with the check in ->detect */
drm_modeset_lock(&connector->dev->mode_config.connection_mutex, NULL);
- intel_connector->mst_port = NULL;
+ intel_connector->mst_port_gone = true;
drm_modeset_unlock(&connector->dev->mode_config.connection_mutex);
drm_connector_put(connector);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 8fc61e96...
2018 Sep 21
0
[Intel-gfx] [PATCH 3/6] drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead
...t_encoders[crtc->pipe]->base.base;
> }
> @@ -514,7 +514,7 @@ static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
> connector);
> /* prevent race with the check in ->detect */
> drm_modeset_lock(&connector->dev->mode_config.connection_mutex, NULL);
> - intel_connector->mst_port = NULL;
> + intel_connector->mst_port_gone = true;
> drm_modeset_unlock(&connector->dev->mode_config.connection_mutex);
>
> drm_connector_put(connector);
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i...
2018 May 02
0
[PATCH] drm/nouveau: Fix deadlock in nv50_mstm_register_connector()
...tm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
drm_connector_unregister(&mstc->connector);
- drm_modeset_lock_all(drm->dev);
drm_fb_helper_remove_one_connector(&drm->fbcon->helper, &mstc->connector);
+
+ drm_modeset_lock(&drm->dev->mode_config.connection_mutex, NULL);
mstc->port = NULL;
- drm_modeset_unlock_all(drm->dev);
+ drm_modeset_unlock(&drm->dev->mode_config.connection_mutex);
drm_connector_unreference(&mstc->connector);
}
@@ -3277,9 +3278,7 @@ nv50_mstm_register_connector(struct drm_connector *connector)
{
struct...
2018 Jul 12
3
[PATCH 0/2] drm/nouveau: Add support for dp_mst_info in debugfs
This hooks up the DRM helpers for dumping information on the current
status of each MST topology from nouveau's perspective to debugfs files,
similar to what i915 does (albeit, i915 labels their debugfs node for
this as i915_dp_mst_info).
Lyude Paul (2):
drm/nouveau: Expose nv50 MST structures in disp.h
drm/nouveau: Hook up dp_mst_info in debugfs
drivers/gpu/drm/nouveau/dispnv50/disp.c
2019 Sep 03
0
[PATCH v2 19/27] drm/dp_mst: Handle UP requests asynchronously
...eq() is called from
drm_dp_mst_hpd_irq(), which is usually called from the driver's hotplug
handler. Because we handle sending the hotplug event from this function,
we actually cause the driver's hotplug handler (and in turn, all
sideband transactions) to block on
drm_device->mode_config.connection_mutex. This makes it impossible to
send any sideband messages from the driver's connector probing
functions, resulting in the aforementioned sideband message timeout.
There's even more problems with this beyond breaking hotplugging on MST
branch devices. It also makes it almost impossible to pro...
2019 Oct 22
0
[PATCH v5 04/14] drm/dp_mst: Handle UP requests asynchronously
...eq() is called from
drm_dp_mst_hpd_irq(), which is usually called from the driver's hotplug
handler. Because we handle sending the hotplug event from this function,
we actually cause the driver's hotplug handler (and in turn, all
sideband transactions) to block on
drm_device->mode_config.connection_mutex. This makes it impossible to
send any sideband messages from the driver's connector probing
functions, resulting in the aforementioned sideband message timeout.
There's even more problems with this beyond breaking hotplugging on MST
branch devices. It also makes it almost impossible to pro...
2018 Oct 05
10
[PATCH v4 0/5] Fix legacy DPMS changes with MST
Next version of https://patchwork.freedesktop.org/series/49878/ . No
changes, except that these patches are against master so hopefully
intel's CI doesn't get confused this time.
Lyude Paul (5):
drm/atomic_helper: Disallow new modesets on unregistered connectors
drm/nouveau: Fix nv50_mstc->best_encoder()
drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead
2019 Sep 13
1
[PATCH v2 23/27] drm/amdgpu: Iterate through DRM connectors correctly
...tect_mst_link_for_all_connectors(struct drm_device *dev)
> {
> struct amdgpu_dm_connector *aconnector;
> struct drm_connector *connector;
> + struct drm_connector_list_iter iter;
> int ret = 0;
>
> - drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
> -
> - list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
> + drm_connector_list_iter_begin(dev, &iter);
> + drm_for_each_connector_iter(connector, &iter) {
> aconnector = to_amdgpu_dm_connector(connector...
2019 Sep 03
0
[PATCH v2 23/27] drm/amdgpu: Iterate through DRM connectors correctly
...splay/amdgpu_dm/amdgpu_dm.c
@@ -896,27 +896,29 @@ static int detect_mst_link_for_all_connectors(struct drm_device *dev)
{
struct amdgpu_dm_connector *aconnector;
struct drm_connector *connector;
+ struct drm_connector_list_iter iter;
int ret = 0;
- drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
-
- list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+ drm_connector_list_iter_begin(dev, &iter);
+ drm_for_each_connector_iter(connector, &iter) {
aconnector = to_amdgpu_dm_connector(connector);
if (aconnector->dc_link->type == dc_connecti...
2018 Oct 04
5
[PATCH v3 0/5] Fix legacy DPMS changes with MST
Next version of https://patchwork.freedesktop.org/series/49877/
This fixes some rather silly bugs regarding DPMS On->Off changes failing
for connectors which were just recently destroyed.
Lyude Paul (5):
drm/atomic_helper: Disallow new modesets on unregistered connectors
drm/nouveau: Fix nv50_mstc->best_encoder()
drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead
2018 May 18
0
[PATCH] drm/nouveau/kms/nv50-: fix drm-get-put.cocci warnings
...disp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -3254,7 +3254,7 @@ nv50_mstm_destroy_connector(struct drm_d
mstc->port = NULL;
drm_modeset_unlock(&drm->dev->mode_config.connection_mutex);
- drm_connector_unreference(&mstc->connector);
+ drm_connector_put(&mstc->connector);
}
static void