search for: drm_modeset_lock

Displaying 20 results from an estimated 52 matches for "drm_modeset_lock".

2020 Jan 07
0
locking warnings in drm/virtio code
...37.709856] rcu_scheduler_active = 2, debug_locks = 1 [ 37.710771] 3 locks held by Xorg/1869: [ 37.711266] #0: ffff8880a976fa48 (crtc_ww_class_acquire){+.+.}, at: drm_mode_cursor_common (linux/drivers/gpu/drm/drm_plane.c:949) [ 37.712372] #1: ffff8880b32e00a8 (crtc_ww_class_mutex){+.+.}, at: drm_modeset_lock (linux/drivers/gpu/drm/drm_modeset_lock.c:258 linux/drivers/gpu/drm/drm_modeset_lock.c:342 linux/drivers/gpu/drm/drm_modeset_lock.c:338) [ 37.713415] #2: ffff8880b32eb6c0 (&(&vgvq->qlock)->rlock){+.+.}, at: virtio_gpu_queue_fenced_ctrl_buffer (linux/drivers/gpu/drm/virtio/virtgpu_vq...
2018 May 02
0
[PATCH] drm/nouveau: Fix deadlock in nv50_mstm_register_connector()
...] but task is already holding lock: 00000000942e28e2 (crtc_ww_class_mutex){+.+.}, at: drm_modeset_backoff+0x8e/0x1c0 [drm] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (crtc_ww_class_mutex){+.+.}: ww_mutex_lock+0x43/0x80 drm_modeset_lock+0x71/0x130 [drm] drm_helper_probe_single_connector_modes+0x7d/0x6b0 [drm_kms_helper] drm_setup_crtcs+0x15e/0xc90 [drm_kms_helper] __drm_fb_helper_initial_config_and_unlock+0x29/0x480 [drm_kms_helper] nouveau_fbcon_init+0x138/0x1a0 [nouveau] nouveau_drm_load+0x173/...
2019 Aug 06
2
Xorg indefinitely hangs in kernelspace
...0 [354073.762216] __ww_mutex_lock.isra.11+0x3e0/0x750 [354073.762217] ? __switch_to_asm+0x34/0x70 [354073.762218] ? __switch_to_asm+0x40/0x70 [354073.762219] ? __switch_to_asm+0x40/0x70 [354073.762220] __ww_mutex_lock_slowpath+0x16/0x20 [354073.762221] ww_mutex_lock+0x34/0x50 [354073.762235] drm_modeset_lock+0x35/0xb0 [drm] [354073.762243] drm_modeset_lock_all_ctx+0x5d/0xe0 [drm] [354073.762251] drm_modeset_lock_all+0x5e/0xb0 [drm] [354073.762252] qxl_display_read_client_monitors_config+0x1e1/0x370 [qxl] [354073.762254] qxl_client_monitors_config_work_func+0x15/0x20 [qxl] [354073.762256] process_o...
2019 Aug 06
2
Xorg indefinitely hangs in kernelspace
...0 [354073.762216] __ww_mutex_lock.isra.11+0x3e0/0x750 [354073.762217] ? __switch_to_asm+0x34/0x70 [354073.762218] ? __switch_to_asm+0x40/0x70 [354073.762219] ? __switch_to_asm+0x40/0x70 [354073.762220] __ww_mutex_lock_slowpath+0x16/0x20 [354073.762221] ww_mutex_lock+0x34/0x50 [354073.762235] drm_modeset_lock+0x35/0xb0 [drm] [354073.762243] drm_modeset_lock_all_ctx+0x5d/0xe0 [drm] [354073.762251] drm_modeset_lock_all+0x5e/0xb0 [drm] [354073.762252] qxl_display_read_client_monitors_config+0x1e1/0x370 [qxl] [354073.762254] qxl_client_monitors_config_work_func+0x15/0x20 [qxl] [354073.762256] process_o...
2019 Sep 25
1
[PATCH v2 20/27] drm/dp_mst: Protect drm_dp_mst_port members with connection_mutex
...rt->mgr = mgr; > @@ -1937,11 +1973,17 @@ drm_dp_mst_handle_link_address_port(struct drm_dp_mst_branch *mstb, > drm_dp_mst_get_mstb_malloc(mstb); > > created = true; > - } else { > - old_ddps = port->ddps; > } > > + mutex_lock(&port->lock); > + drm_modeset_lock(&dev->mode_config.connection_mutex, NULL); > + > + if (!created) > + old_ddps = port->ddps; > + > port->input = port_msg->input_port; > + if (!port->input) > + new_pdt = port_msg->peer_device_type; > port->mcs = port_msg->mcs; > port-&g...
2019 Sep 03
0
[PATCH v2 20/27] drm/dp_mst: Protect drm_dp_mst_port members with connection_mutex
...ort->port_num = port_msg->port_number; port->mgr = mgr; @@ -1937,11 +1973,17 @@ drm_dp_mst_handle_link_address_port(struct drm_dp_mst_branch *mstb, drm_dp_mst_get_mstb_malloc(mstb); created = true; - } else { - old_ddps = port->ddps; } + mutex_lock(&port->lock); + drm_modeset_lock(&dev->mode_config.connection_mutex, NULL); + + if (!created) + old_ddps = port->ddps; + port->input = port_msg->input_port; + if (!port->input) + new_pdt = port_msg->peer_device_type; port->mcs = port_msg->mcs; port->ddps = port_msg->ddps; port->ldps =...
2018 Aug 06
1
[PATCH v4 7/8] drm/nouveau: Fix deadlocks in nouveau_connector_detect()
..._resume+0x19c/0x850 > [ 861.529399] ? finish_wait+0x90/0x90 > [ 861.530073] __pm_runtime_resume+0x4e/0x90 > [ 861.530798] nouveau_connector_detect+0x7e/0x510 [nouveau] > [ 861.531459] ? ww_mutex_lock+0x47/0x80 > [ 861.532097] ? ww_mutex_lock+0x47/0x80 > [ 861.532819] ? drm_modeset_lock+0x88/0x130 [drm] > [ 861.533481] drm_helper_probe_detect_ctx+0xa0/0x100 [drm_kms_helper] > [ 861.534127] drm_helper_hpd_irq_event+0xa4/0x120 [drm_kms_helper] > [ 861.534940] nouveau_connector_hotplug+0x98/0x120 [nouveau] > [ 861.535556] nvif_notify_work+0x2d/0xb0 [nouveau] >...
2018 Sep 19
1
[PATCH v2 3/6] drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead
...(intel_connector->mst_port_gone) return NULL; return &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...
2018 Aug 01
0
[PATCH v4 7/8] drm/nouveau: Fix deadlocks in nouveau_connector_detect()
...+0x33/0x90 [ 861.528758] rpm_resume+0x19c/0x850 [ 861.529399] ? finish_wait+0x90/0x90 [ 861.530073] __pm_runtime_resume+0x4e/0x90 [ 861.530798] nouveau_connector_detect+0x7e/0x510 [nouveau] [ 861.531459] ? ww_mutex_lock+0x47/0x80 [ 861.532097] ? ww_mutex_lock+0x47/0x80 [ 861.532819] ? drm_modeset_lock+0x88/0x130 [drm] [ 861.533481] drm_helper_probe_detect_ctx+0xa0/0x100 [drm_kms_helper] [ 861.534127] drm_helper_hpd_irq_event+0xa4/0x120 [drm_kms_helper] [ 861.534940] nouveau_connector_hotplug+0x98/0x120 [nouveau] [ 861.535556] nvif_notify_work+0x2d/0xb0 [nouveau] [ 861.536221] process_o...
2018 Sep 18
4
[PATCH 3/6] drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead
...(intel_connector->mst_port_gone) return NULL; return &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...
2019 Oct 22
0
[PATCH v5 06/14] drm/dp_mst: Protect drm_dp_mst_port members with locking
..._unlink_port(mgr, port); + drm_dp_mst_topology_put_port(port); + port = drm_dp_mst_add_port(dev, mgr, mstb, + port_msg->port_number); + if (!port) + return; created = true; } else { + /* Locking is only needed when the port has a connector + * exposed to userspace + */ + drm_modeset_lock(&mgr->base.lock, NULL); old_ddps = port->ddps; } port->input = port_msg->input_port; + if (!port->input) + new_pdt = port_msg->peer_device_type; port->mcs = port_msg->mcs; port->ddps = port_msg->ddps; port->ldps = port_msg->legacy_device_plug_...
2018 Sep 21
1
[Intel-gfx] [PATCH 3/6] drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead
...&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(c...
2019 Sep 06
4
Xorg indefinitely hangs in kernelspace
...lock.isra.11+0x3e0/0x750 > [354073.762217] ? __switch_to_asm+0x34/0x70 > [354073.762218] ? __switch_to_asm+0x40/0x70 > [354073.762219] ? __switch_to_asm+0x40/0x70 > [354073.762220] __ww_mutex_lock_slowpath+0x16/0x20 > [354073.762221] ww_mutex_lock+0x34/0x50 > [354073.762235] drm_modeset_lock+0x35/0xb0 [drm] > [354073.762243] drm_modeset_lock_all_ctx+0x5d/0xe0 [drm] > [354073.762251] drm_modeset_lock_all+0x5e/0xb0 [drm] > [354073.762252] qxl_display_read_client_monitors_config+0x1e1/0x370 [qxl] > [354073.762254] qxl_client_monitors_config_work_func+0x15/0x20 [qxl] > [...
2019 Sep 06
4
Xorg indefinitely hangs in kernelspace
...lock.isra.11+0x3e0/0x750 > [354073.762217] ? __switch_to_asm+0x34/0x70 > [354073.762218] ? __switch_to_asm+0x40/0x70 > [354073.762219] ? __switch_to_asm+0x40/0x70 > [354073.762220] __ww_mutex_lock_slowpath+0x16/0x20 > [354073.762221] ww_mutex_lock+0x34/0x50 > [354073.762235] drm_modeset_lock+0x35/0xb0 [drm] > [354073.762243] drm_modeset_lock_all_ctx+0x5d/0xe0 [drm] > [354073.762251] drm_modeset_lock_all+0x5e/0xb0 [drm] > [354073.762252] qxl_display_read_client_monitors_config+0x1e1/0x370 [qxl] > [354073.762254] qxl_client_monitors_config_work_func+0x15/0x20 [qxl] > [...
2018 Dec 14
0
[WIP PATCH 09/15] drm/nouveau: Fix potential use-after-frees for MSTCs
...m_connector_set_path_property(&mstc->connector, 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
...- drm_dp_mst_put_port_malloc(mstc->port); + drm_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
2020 Aug 17
0
[PATCH] drm/qxl: Replace deprecated function in qxl_display
...s resended e-mail for your advice. > > I'm a newbie interested in linux kernel and qxl module. > Please check this patch and give me advice for me. > Also I'll be glad if there is any task that you bothered. > Thanks. > > Sidong. > > Replace deprecated function drm_modeset_lock/unlock_all with > helper function DRM_MODESET_LOCK_ALL_BEGIN/END. > > Signed-off-by: Sidong Yang <realwakka at gmail.com> Queued for drm-misc-next. thanks, Gerd
2018 Oct 05
0
[PATCH v4 3/5] drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead
...(intel_connector->mst_port_gone) return NULL; return &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...
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()
...- int old_ddps; - bool dowork = false; + 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_s...
2019 Oct 22
0
[PATCH v5 07/14] drm/dp_mst: Don't forget to update port->input in drm_dp_mst_handle_conn_stat()
...rt out and make sure we + * reprobe the link address of it's parent MSTB + */ + drm_dp_mst_topology_unlink_port(mgr, port); + mstb->link_address_sent = false; + dowork = true; + goto out; + } + + /* + * Locking is only needed if the port's exposed to userspace + */ drm_modeset_lock(&mgr->base.lock, NULL); + } else if (port->input && !conn_stat->input_port) { + create_connector = true; + /* Reprobe link address so we get num_sdp_streams */ + mstb->link_address_sent = false; + dowork = true; + } old_ddps = port->ddps; + port->input = conn_s...