All of lore.kernel.org
 help / color / mirror / Atom feed
* [CI 1/2] drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd
@ 2019-11-29 20:14 ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2019-11-29 20:14 UTC (permalink / raw)
  To: intel-gfx

Prevent a circular lockdep reference caused by waking up the runtime-pm
from inside intel_dp_aux_xfer() deep within several layers of mutexes.

<7> [401.102396] [drm:intel_runtime_suspend [i915]] Device suspended
<4> [401.115284]
<4> [401.115288] ======================================================
<4> [401.115289] WARNING: possible circular locking dependency detected
<4> [401.115291] 5.4.0-rc8-CI-Patchwork_15505+ #1 Tainted: G     U
<4> [401.115292] ------------------------------------------------------
<4> [401.115293] kworker/1:3/186 is trying to acquire lock:
<4> [401.115294] ffffffff82263a40 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.117+0x0/0x30
<4> [401.115300]
but task is already holding lock:
<4> [401.115301] ffff88848816a980 (&aux->hw_mutex){+.+.}, at: drm_dp_dpcd_access+0x62/0x110
<4> [401.115304]
which lock already depends on the new lock.

<4> [401.115305]
the existing dependency chain (in reverse order) is:
<4> [401.115306]
-> #4 (&aux->hw_mutex){+.+.}:
<4> [401.115310]        __mutex_lock+0x9a/0x9d0
<4> [401.115312]        drm_dp_dpcd_access+0x62/0x110
<4> [401.115313]        drm_dp_dpcd_write+0x21/0x90
<4> [401.115375]        intel_psr_enable_locked+0x480/0x530 [i915]
<4> [401.115428]        intel_psr_enable+0x7d/0xd0 [i915]
<4> [401.115477]        intel_enable_ddi+0x147/0x370 [i915]
<4> [401.115528]        intel_encoders_enable+0x78/0xa0 [i915]
<4> [401.115576]        haswell_crtc_enable+0x3e4/0x8a0 [i915]
<4> [401.115628]        intel_update_crtc+0x1de/0x200 [i915]
<4> [401.115690]        skl_commit_modeset_enables+0x297/0x430 [i915]
<4> [401.115740]        intel_atomic_commit_tail+0x336/0x14e0 [i915]
<4> [401.115785]        intel_atomic_commit+0x31d/0x350 [i915]
<4> [401.115788]        drm_atomic_helper_commit_duplicated_state+0xc4/0xd0
<4> [401.115857]        __intel_display_resume+0x84/0xc0 [i915]
<4> [401.115887]        intel_display_resume+0xe0/0x110 [i915]
<4> [401.115900]        i915_drm_resume+0xd4/0x130 [i915]
<4> [401.115900]        dpm_run_callback+0x64/0x280
<4> [401.115900]        device_resume+0xb7/0x1e0
<4> [401.115900]        async_resume+0x14/0x40
<4> [401.115900]        async_run_entry_fn+0x34/0x160
<4> [401.115900]        process_one_work+0x26a/0x620
<4> [401.115900]        worker_thread+0x37/0x380
<4> [401.115900]        kthread+0x119/0x130
<4> [401.115900]        ret_from_fork+0x24/0x50
<4> [401.115900]
-> #3 (&dev_priv->psr.lock){+.+.}:
<4> [401.115900]        __mutex_lock+0x9a/0x9d0
<4> [401.115900]        intel_psr_flush+0x39/0x180 [i915]
<4> [401.115900]        frontbuffer_flush+0x6a/0x80 [i915]
<4> [401.115900]        frontbuffer_retire+0x27/0x38 [i915]
<4> [401.115900]        __active_retire+0xb4/0x290 [i915]
<4> [401.115900]        process_one_work+0x26a/0x620
<4> [401.115900]        worker_thread+0x37/0x380
<4> [401.115900]        kthread+0x119/0x130
<4> [401.115900]        ret_from_fork+0x24/0x50
<4> [401.115900]
-> #2 ((work_completion)(&ref->work)){+.+.}:
<4> [401.115900]        __flush_work+0x345/0x4b0
<4> [401.116214]        i915_active_wait+0x13f/0x180 [i915]
<4> [401.116214]        __i915_vma_unbind+0x1a/0x70 [i915]
<4> [401.116214]        i915_vma_unbind+0x2d/0x50 [i915]
<4> [401.116214]        eb_lookup_vmas+0x4b6/0x1310 [i915]
<4> [401.116214]        i915_gem_do_execbuffer+0x62a/0x2700 [i915]
<4> [401.116214]        i915_gem_execbuffer2_ioctl+0x11b/0x460 [i915]
<4> [401.116214]        drm_ioctl_kernel+0xa7/0xf0
<4> [401.116214]        drm_ioctl+0x2e1/0x390
<4> [401.116214]        do_vfs_ioctl+0xa0/0x6f0
<4> [401.116214]        ksys_ioctl+0x35/0x60
<4> [401.116214]        __x64_sys_ioctl+0x11/0x20
<4> [401.116214]        do_syscall_64+0x4f/0x210
<4> [401.116214]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [401.116214]
-> #1 (&vm->mutex/1){+.+.}:
<4> [401.116214]        i915_gem_shrinker_taints_mutex+0xa2/0xd0 [i915]
<4> [401.116214]        i915_address_space_init+0xa9/0x170 [i915]
<4> [401.116214]        __ppgtt_create+0x93/0xa60 [i915]
<4> [401.116214]        i915_ppgtt_create+0x7/0xf0 [i915]
<4> [401.116214]        i915_gem_create_context+0x278/0x420 [i915]
<4> [401.116214]        i915_gem_context_create_kernel+0xa/0xa0 [i915]
<4> [401.116214]        i915_gem_init_contexts+0x2b/0xf0 [i915]
<4> [401.116214]        i915_gem_init+0x199/0xa50 [i915]
<4> [401.116214]        i915_driver_probe+0xb00/0x15f0 [i915]
<4> [401.116214]        i915_pci_probe+0x43/0x1c0 [i915]
<4> [401.116214]        pci_device_probe+0x9e/0x120
<4> [401.116214]        really_probe+0xea/0x420
<4> [401.116214]        driver_probe_device+0x10b/0x120
<4> [401.116214]        device_driver_attach+0x4a/0x50
<4> [401.116214]        __driver_attach+0x97/0x130
<4> [401.116214]        bus_for_each_dev+0x74/0xc0
<4> [401.116214]        bus_add_driver+0x142/0x220
<4> [401.116214]        driver_register+0x56/0xf0
<4> [401.116214]        do_one_initcall+0x58/0x2ff
<4> [401.116214]        do_init_module+0x56/0x1f8
<4> [401.116214]        load_module+0x243e/0x29f0
<4> [401.116214]        __do_sys_finit_module+0xe9/0x110
<4> [401.116214]        do_syscall_64+0x4f/0x210
<4> [401.116214]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [401.116214]
-> #0 (fs_reclaim){+.+.}:
<4> [401.116214]        __lock_acquire+0x1328/0x15d0
<4> [401.116214]        lock_acquire+0xa7/0x1c0
<4> [401.116214]        fs_reclaim_acquire.part.117+0x24/0x30
<4> [401.116214]        __kmalloc+0x48/0x320
<4> [401.116214]        acpi_ns_internalize_name+0x44/0x9b
<4> [401.116214]        acpi_ns_get_node_unlocked+0x6b/0xd3
<4> [401.116214]        acpi_ns_get_node+0x3b/0x50
<4> [401.116214]        acpi_get_handle+0x8a/0xb4
<4> [401.116214]        acpi_has_method+0x1c/0x40
<4> [401.116214]        acpi_pci_set_power_state+0x40/0xe0
<4> [401.116214]        pci_platform_power_transition+0x3e/0x90
<4> [401.116214]        pci_set_power_state+0x83/0xf0
<4> [401.116214]        pci_restore_standard_config+0x22/0x40
<4> [401.116214]        pci_pm_runtime_resume+0x23/0xc0
<4> [401.116214]        __rpm_callback+0xb1/0x110
<4> [401.116214]        rpm_callback+0x1a/0x70
<4> [401.116214]        rpm_resume+0x50e/0x790
<4> [401.116214]        __pm_runtime_resume+0x42/0x80
<4> [401.116214]        __intel_runtime_pm_get+0x15/0x60 [i915]
<4> [401.116214]        intel_display_power_get+0x1f/0x60 [i915]
<4> [401.116214]        intel_dp_aux_xfer+0xd3/0x8f0 [i915]
<4> [401.116214]        intel_dp_aux_transfer+0xa7/0x200 [i915]
<4> [401.116214]        drm_dp_dpcd_access+0x76/0x110
<4> [401.116214]        drm_dp_dpcd_read+0x29/0xc0
<4> [401.116214]        intel_dp_get_dsc_sink_cap+0x54/0xe0 [i915]
<4> [401.116214]        intel_dp_detect+0x1be/0x500 [i915]
<4> [401.116214]        drm_helper_probe_detect_ctx+0x67/0xd0
<4> [401.116214]        drm_helper_hpd_irq_event+0xa5/0x120
<4> [401.116214]        i915_hpd_poll_init_work+0xc6/0x100 [i915]
<4> [401.116214]        process_one_work+0x26a/0x620
<4> [401.116214]        worker_thread+0x37/0x380
<4> [401.116214]        kthread+0x119/0x130
<4> [401.116214]        ret_from_fork+0x24/0x50

Note that while this is cross-pollination from work_struct, it still
seems prudent to take the runtime reference outside, as is done for the
other intel_dp_detect() paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index be9e8e4497bf..7917cbd99dbb 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5254,7 +5254,7 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
 
 /* XXX this is probably wrong for multiple downstream ports */
 static enum drm_connector_status
-intel_dp_detect_dpcd(struct intel_dp *intel_dp)
+__intel_dp_detect_dpcd(struct intel_dp *intel_dp)
 {
 	struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp);
 	u8 *dpcd = intel_dp->dpcd;
@@ -5307,6 +5307,22 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
 	return connector_status_disconnected;
 }
 
+static enum drm_connector_status
+intel_dp_detect_dpcd(struct intel_dp *intel_dp)
+{
+	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
+	struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
+	enum intel_display_power_domain aux_domain =
+		intel_aux_power_domain(dig_port);
+	enum drm_connector_status status = connector_status_unknown;
+	intel_wakeref_t wakeref;
+
+	with_intel_display_power(i915, aux_domain, wakeref)
+		status = __intel_dp_detect_dpcd(intel_dp);
+
+	return status;
+}
+
 static enum drm_connector_status
 edp_detect(struct intel_dp *intel_dp)
 {
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Intel-gfx] [CI 1/2] drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd
@ 2019-11-29 20:14 ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2019-11-29 20:14 UTC (permalink / raw)
  To: intel-gfx

Prevent a circular lockdep reference caused by waking up the runtime-pm
from inside intel_dp_aux_xfer() deep within several layers of mutexes.

<7> [401.102396] [drm:intel_runtime_suspend [i915]] Device suspended
<4> [401.115284]
<4> [401.115288] ======================================================
<4> [401.115289] WARNING: possible circular locking dependency detected
<4> [401.115291] 5.4.0-rc8-CI-Patchwork_15505+ #1 Tainted: G     U
<4> [401.115292] ------------------------------------------------------
<4> [401.115293] kworker/1:3/186 is trying to acquire lock:
<4> [401.115294] ffffffff82263a40 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.117+0x0/0x30
<4> [401.115300]
but task is already holding lock:
<4> [401.115301] ffff88848816a980 (&aux->hw_mutex){+.+.}, at: drm_dp_dpcd_access+0x62/0x110
<4> [401.115304]
which lock already depends on the new lock.

<4> [401.115305]
the existing dependency chain (in reverse order) is:
<4> [401.115306]
-> #4 (&aux->hw_mutex){+.+.}:
<4> [401.115310]        __mutex_lock+0x9a/0x9d0
<4> [401.115312]        drm_dp_dpcd_access+0x62/0x110
<4> [401.115313]        drm_dp_dpcd_write+0x21/0x90
<4> [401.115375]        intel_psr_enable_locked+0x480/0x530 [i915]
<4> [401.115428]        intel_psr_enable+0x7d/0xd0 [i915]
<4> [401.115477]        intel_enable_ddi+0x147/0x370 [i915]
<4> [401.115528]        intel_encoders_enable+0x78/0xa0 [i915]
<4> [401.115576]        haswell_crtc_enable+0x3e4/0x8a0 [i915]
<4> [401.115628]        intel_update_crtc+0x1de/0x200 [i915]
<4> [401.115690]        skl_commit_modeset_enables+0x297/0x430 [i915]
<4> [401.115740]        intel_atomic_commit_tail+0x336/0x14e0 [i915]
<4> [401.115785]        intel_atomic_commit+0x31d/0x350 [i915]
<4> [401.115788]        drm_atomic_helper_commit_duplicated_state+0xc4/0xd0
<4> [401.115857]        __intel_display_resume+0x84/0xc0 [i915]
<4> [401.115887]        intel_display_resume+0xe0/0x110 [i915]
<4> [401.115900]        i915_drm_resume+0xd4/0x130 [i915]
<4> [401.115900]        dpm_run_callback+0x64/0x280
<4> [401.115900]        device_resume+0xb7/0x1e0
<4> [401.115900]        async_resume+0x14/0x40
<4> [401.115900]        async_run_entry_fn+0x34/0x160
<4> [401.115900]        process_one_work+0x26a/0x620
<4> [401.115900]        worker_thread+0x37/0x380
<4> [401.115900]        kthread+0x119/0x130
<4> [401.115900]        ret_from_fork+0x24/0x50
<4> [401.115900]
-> #3 (&dev_priv->psr.lock){+.+.}:
<4> [401.115900]        __mutex_lock+0x9a/0x9d0
<4> [401.115900]        intel_psr_flush+0x39/0x180 [i915]
<4> [401.115900]        frontbuffer_flush+0x6a/0x80 [i915]
<4> [401.115900]        frontbuffer_retire+0x27/0x38 [i915]
<4> [401.115900]        __active_retire+0xb4/0x290 [i915]
<4> [401.115900]        process_one_work+0x26a/0x620
<4> [401.115900]        worker_thread+0x37/0x380
<4> [401.115900]        kthread+0x119/0x130
<4> [401.115900]        ret_from_fork+0x24/0x50
<4> [401.115900]
-> #2 ((work_completion)(&ref->work)){+.+.}:
<4> [401.115900]        __flush_work+0x345/0x4b0
<4> [401.116214]        i915_active_wait+0x13f/0x180 [i915]
<4> [401.116214]        __i915_vma_unbind+0x1a/0x70 [i915]
<4> [401.116214]        i915_vma_unbind+0x2d/0x50 [i915]
<4> [401.116214]        eb_lookup_vmas+0x4b6/0x1310 [i915]
<4> [401.116214]        i915_gem_do_execbuffer+0x62a/0x2700 [i915]
<4> [401.116214]        i915_gem_execbuffer2_ioctl+0x11b/0x460 [i915]
<4> [401.116214]        drm_ioctl_kernel+0xa7/0xf0
<4> [401.116214]        drm_ioctl+0x2e1/0x390
<4> [401.116214]        do_vfs_ioctl+0xa0/0x6f0
<4> [401.116214]        ksys_ioctl+0x35/0x60
<4> [401.116214]        __x64_sys_ioctl+0x11/0x20
<4> [401.116214]        do_syscall_64+0x4f/0x210
<4> [401.116214]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [401.116214]
-> #1 (&vm->mutex/1){+.+.}:
<4> [401.116214]        i915_gem_shrinker_taints_mutex+0xa2/0xd0 [i915]
<4> [401.116214]        i915_address_space_init+0xa9/0x170 [i915]
<4> [401.116214]        __ppgtt_create+0x93/0xa60 [i915]
<4> [401.116214]        i915_ppgtt_create+0x7/0xf0 [i915]
<4> [401.116214]        i915_gem_create_context+0x278/0x420 [i915]
<4> [401.116214]        i915_gem_context_create_kernel+0xa/0xa0 [i915]
<4> [401.116214]        i915_gem_init_contexts+0x2b/0xf0 [i915]
<4> [401.116214]        i915_gem_init+0x199/0xa50 [i915]
<4> [401.116214]        i915_driver_probe+0xb00/0x15f0 [i915]
<4> [401.116214]        i915_pci_probe+0x43/0x1c0 [i915]
<4> [401.116214]        pci_device_probe+0x9e/0x120
<4> [401.116214]        really_probe+0xea/0x420
<4> [401.116214]        driver_probe_device+0x10b/0x120
<4> [401.116214]        device_driver_attach+0x4a/0x50
<4> [401.116214]        __driver_attach+0x97/0x130
<4> [401.116214]        bus_for_each_dev+0x74/0xc0
<4> [401.116214]        bus_add_driver+0x142/0x220
<4> [401.116214]        driver_register+0x56/0xf0
<4> [401.116214]        do_one_initcall+0x58/0x2ff
<4> [401.116214]        do_init_module+0x56/0x1f8
<4> [401.116214]        load_module+0x243e/0x29f0
<4> [401.116214]        __do_sys_finit_module+0xe9/0x110
<4> [401.116214]        do_syscall_64+0x4f/0x210
<4> [401.116214]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [401.116214]
-> #0 (fs_reclaim){+.+.}:
<4> [401.116214]        __lock_acquire+0x1328/0x15d0
<4> [401.116214]        lock_acquire+0xa7/0x1c0
<4> [401.116214]        fs_reclaim_acquire.part.117+0x24/0x30
<4> [401.116214]        __kmalloc+0x48/0x320
<4> [401.116214]        acpi_ns_internalize_name+0x44/0x9b
<4> [401.116214]        acpi_ns_get_node_unlocked+0x6b/0xd3
<4> [401.116214]        acpi_ns_get_node+0x3b/0x50
<4> [401.116214]        acpi_get_handle+0x8a/0xb4
<4> [401.116214]        acpi_has_method+0x1c/0x40
<4> [401.116214]        acpi_pci_set_power_state+0x40/0xe0
<4> [401.116214]        pci_platform_power_transition+0x3e/0x90
<4> [401.116214]        pci_set_power_state+0x83/0xf0
<4> [401.116214]        pci_restore_standard_config+0x22/0x40
<4> [401.116214]        pci_pm_runtime_resume+0x23/0xc0
<4> [401.116214]        __rpm_callback+0xb1/0x110
<4> [401.116214]        rpm_callback+0x1a/0x70
<4> [401.116214]        rpm_resume+0x50e/0x790
<4> [401.116214]        __pm_runtime_resume+0x42/0x80
<4> [401.116214]        __intel_runtime_pm_get+0x15/0x60 [i915]
<4> [401.116214]        intel_display_power_get+0x1f/0x60 [i915]
<4> [401.116214]        intel_dp_aux_xfer+0xd3/0x8f0 [i915]
<4> [401.116214]        intel_dp_aux_transfer+0xa7/0x200 [i915]
<4> [401.116214]        drm_dp_dpcd_access+0x76/0x110
<4> [401.116214]        drm_dp_dpcd_read+0x29/0xc0
<4> [401.116214]        intel_dp_get_dsc_sink_cap+0x54/0xe0 [i915]
<4> [401.116214]        intel_dp_detect+0x1be/0x500 [i915]
<4> [401.116214]        drm_helper_probe_detect_ctx+0x67/0xd0
<4> [401.116214]        drm_helper_hpd_irq_event+0xa5/0x120
<4> [401.116214]        i915_hpd_poll_init_work+0xc6/0x100 [i915]
<4> [401.116214]        process_one_work+0x26a/0x620
<4> [401.116214]        worker_thread+0x37/0x380
<4> [401.116214]        kthread+0x119/0x130
<4> [401.116214]        ret_from_fork+0x24/0x50

Note that while this is cross-pollination from work_struct, it still
seems prudent to take the runtime reference outside, as is done for the
other intel_dp_detect() paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index be9e8e4497bf..7917cbd99dbb 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5254,7 +5254,7 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
 
 /* XXX this is probably wrong for multiple downstream ports */
 static enum drm_connector_status
-intel_dp_detect_dpcd(struct intel_dp *intel_dp)
+__intel_dp_detect_dpcd(struct intel_dp *intel_dp)
 {
 	struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp);
 	u8 *dpcd = intel_dp->dpcd;
@@ -5307,6 +5307,22 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
 	return connector_status_disconnected;
 }
 
+static enum drm_connector_status
+intel_dp_detect_dpcd(struct intel_dp *intel_dp)
+{
+	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
+	struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
+	enum intel_display_power_domain aux_domain =
+		intel_aux_power_domain(dig_port);
+	enum drm_connector_status status = connector_status_unknown;
+	intel_wakeref_t wakeref;
+
+	with_intel_display_power(i915, aux_domain, wakeref)
+		status = __intel_dp_detect_dpcd(intel_dp);
+
+	return status;
+}
+
 static enum drm_connector_status
 edp_detect(struct intel_dp *intel_dp)
 {
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [CI 2/2] drm/i915: Serialise i915_active_wait() with its retirement
@ 2019-11-29 20:14   ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2019-11-29 20:14 UTC (permalink / raw)
  To: intel-gfx

As the i915_active.retire() may be running on another CPU as we detect
that the i915_active is idle, we may not wait for the retirement itself.
Wait for the remote callback by waiting for the retirement worker.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112424
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_active.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
index 479195ecbc6c..e8630ee33336 100644
--- a/drivers/gpu/drm/i915/i915_active.c
+++ b/drivers/gpu/drm/i915/i915_active.c
@@ -469,6 +469,7 @@ int i915_active_wait(struct i915_active *ref)
 	if (wait_var_event_interruptible(ref, i915_active_is_idle(ref)))
 		return -EINTR;
 
+	flush_work(&ref->work);
 	return 0;
 }
 
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Intel-gfx] [CI 2/2] drm/i915: Serialise i915_active_wait() with its retirement
@ 2019-11-29 20:14   ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2019-11-29 20:14 UTC (permalink / raw)
  To: intel-gfx

As the i915_active.retire() may be running on another CPU as we detect
that the i915_active is idle, we may not wait for the retirement itself.
Wait for the remote callback by waiting for the retirement worker.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112424
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_active.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
index 479195ecbc6c..e8630ee33336 100644
--- a/drivers/gpu/drm/i915/i915_active.c
+++ b/drivers/gpu/drm/i915/i915_active.c
@@ -469,6 +469,7 @@ int i915_active_wait(struct i915_active *ref)
 	if (wait_var_event_interruptible(ref, i915_active_is_idle(ref)))
 		return -EINTR;
 
+	flush_work(&ref->work);
 	return 0;
 }
 
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/2] drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd
@ 2019-11-29 23:41   ` Patchwork
  0 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-11-29 23:41 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [CI,1/2] drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd
URL   : https://patchwork.freedesktop.org/series/70226/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
ee6e1886d4fa drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd
-:20: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#20: 
<4> [401.115294] ffffffff82263a40 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.117+0x0/0x30

total: 0 errors, 1 warnings, 0 checks, 30 lines checked
062d64d429b2 drm/i915: Serialise i915_active_wait() with its retirement

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/2] drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd
@ 2019-11-29 23:41   ` Patchwork
  0 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-11-29 23:41 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [CI,1/2] drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd
URL   : https://patchwork.freedesktop.org/series/70226/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
ee6e1886d4fa drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd
-:20: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#20: 
<4> [401.115294] ffffffff82263a40 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.117+0x0/0x30

total: 0 errors, 1 warnings, 0 checks, 30 lines checked
062d64d429b2 drm/i915: Serialise i915_active_wait() with its retirement

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* ✗ Fi.CI.BAT: failure for series starting with [CI,1/2] drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd
@ 2019-11-30  0:11   ` Patchwork
  0 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-11-30  0:11 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [CI,1/2] drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd
URL   : https://patchwork.freedesktop.org/series/70226/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7447 -> Patchwork_15519
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_15519 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_15519, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_15519:

### IGT changes ###

#### Possible regressions ####

  * igt@i915_pm_rpm@basic-pci-d3-state:
    - fi-icl-u3:          [PASS][1] -> [DMESG-WARN][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-icl-u3/igt@i915_pm_rpm@basic-pci-d3-state.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-icl-u3/igt@i915_pm_rpm@basic-pci-d3-state.html

  
Known issues
------------

  Here are the changes found in Patchwork_15519 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_pm_rpm@module-reload:
    - fi-skl-lmem:        [PASS][3] -> [DMESG-WARN][4] ([fdo#112261])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-skl-lmem/igt@i915_pm_rpm@module-reload.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-skl-lmem/igt@i915_pm_rpm@module-reload.html

  
#### Possible fixes ####

  * igt@gem_sync@basic-all:
    - fi-tgl-y:           [INCOMPLETE][5] ([fdo#111867]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-tgl-y/igt@gem_sync@basic-all.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-tgl-y/igt@gem_sync@basic-all.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][7] ([fdo#111407]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
#### Warnings ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-kbl-x1275:       [DMESG-WARN][9] ([fdo#103558] / [fdo#105602] / [fdo#107139]) -> [DMESG-WARN][10] ([fdo#103558] / [fdo#105602] / [fdo#105763] / [fdo#107139])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-kbl-x1275/igt@gem_exec_suspend@basic-s4-devices.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-kbl-x1275/igt@gem_exec_suspend@basic-s4-devices.html

  * igt@kms_busy@basic-flip-pipe-c:
    - fi-kbl-x1275:       [DMESG-WARN][11] ([fdo#103558] / [fdo#105602] / [fdo#105763]) -> [DMESG-WARN][12] ([fdo#103558] / [fdo#105602])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-kbl-x1275/igt@kms_busy@basic-flip-pipe-c.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-kbl-x1275/igt@kms_busy@basic-flip-pipe-c.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - fi-kbl-x1275:       [DMESG-WARN][13] ([fdo#103558] / [fdo#105602]) -> [DMESG-WARN][14] ([fdo#103558] / [fdo#105602] / [fdo#105763]) +10 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
  [fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
  [fdo#109964]: https://bugs.freedesktop.org/show_bug.cgi?id=109964
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [fdo#111867]: https://bugs.freedesktop.org/show_bug.cgi?id=111867
  [fdo#112261]: https://bugs.freedesktop.org/show_bug.cgi?id=112261
  [fdo#112298]: https://bugs.freedesktop.org/show_bug.cgi?id=112298


Participating hosts (51 -> 45)
------------------------------

  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7447 -> Patchwork_15519

  CI-20190529: 20190529
  CI_DRM_7447: 8a02da6e5bea288945ed422bd40ad8c5a254e539 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5318: 26ae6584ac03ad862d82f986302275a68bcccb29 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_15519: 062d64d429b20b7bff10507b3c0ecb237029bb36 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

062d64d429b2 drm/i915: Serialise i915_active_wait() with its retirement
ee6e1886d4fa drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [CI,1/2] drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd
@ 2019-11-30  0:11   ` Patchwork
  0 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-11-30  0:11 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [CI,1/2] drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd
URL   : https://patchwork.freedesktop.org/series/70226/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7447 -> Patchwork_15519
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_15519 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_15519, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_15519:

### IGT changes ###

#### Possible regressions ####

  * igt@i915_pm_rpm@basic-pci-d3-state:
    - fi-icl-u3:          [PASS][1] -> [DMESG-WARN][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-icl-u3/igt@i915_pm_rpm@basic-pci-d3-state.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-icl-u3/igt@i915_pm_rpm@basic-pci-d3-state.html

  
Known issues
------------

  Here are the changes found in Patchwork_15519 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_pm_rpm@module-reload:
    - fi-skl-lmem:        [PASS][3] -> [DMESG-WARN][4] ([fdo#112261])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-skl-lmem/igt@i915_pm_rpm@module-reload.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-skl-lmem/igt@i915_pm_rpm@module-reload.html

  
#### Possible fixes ####

  * igt@gem_sync@basic-all:
    - fi-tgl-y:           [INCOMPLETE][5] ([fdo#111867]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-tgl-y/igt@gem_sync@basic-all.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-tgl-y/igt@gem_sync@basic-all.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][7] ([fdo#111407]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
#### Warnings ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-kbl-x1275:       [DMESG-WARN][9] ([fdo#103558] / [fdo#105602] / [fdo#107139]) -> [DMESG-WARN][10] ([fdo#103558] / [fdo#105602] / [fdo#105763] / [fdo#107139])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-kbl-x1275/igt@gem_exec_suspend@basic-s4-devices.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-kbl-x1275/igt@gem_exec_suspend@basic-s4-devices.html

  * igt@kms_busy@basic-flip-pipe-c:
    - fi-kbl-x1275:       [DMESG-WARN][11] ([fdo#103558] / [fdo#105602] / [fdo#105763]) -> [DMESG-WARN][12] ([fdo#103558] / [fdo#105602])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-kbl-x1275/igt@kms_busy@basic-flip-pipe-c.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-kbl-x1275/igt@kms_busy@basic-flip-pipe-c.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - fi-kbl-x1275:       [DMESG-WARN][13] ([fdo#103558] / [fdo#105602]) -> [DMESG-WARN][14] ([fdo#103558] / [fdo#105602] / [fdo#105763]) +10 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7447/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
  [fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
  [fdo#109964]: https://bugs.freedesktop.org/show_bug.cgi?id=109964
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [fdo#111867]: https://bugs.freedesktop.org/show_bug.cgi?id=111867
  [fdo#112261]: https://bugs.freedesktop.org/show_bug.cgi?id=112261
  [fdo#112298]: https://bugs.freedesktop.org/show_bug.cgi?id=112298


Participating hosts (51 -> 45)
------------------------------

  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7447 -> Patchwork_15519

  CI-20190529: 20190529
  CI_DRM_7447: 8a02da6e5bea288945ed422bd40ad8c5a254e539 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5318: 26ae6584ac03ad862d82f986302275a68bcccb29 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_15519: 062d64d429b20b7bff10507b3c0ecb237029bb36 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

062d64d429b2 drm/i915: Serialise i915_active_wait() with its retirement
ee6e1886d4fa drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15519/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [CI 2/2] drm/i915: Serialise i915_active_wait() with its retirement
  2019-11-30  9:42 [CI 1/2] " Chris Wilson
@ 2019-11-30  9:42 ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2019-11-30  9:42 UTC (permalink / raw)
  To: intel-gfx

As the i915_active.retire() may be running on another CPU as we detect
that the i915_active is idle, we may not wait for the retirement itself.
Wait for the remote callback by waiting for the retirement worker.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112424
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_active.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
index 479195ecbc6c..e8630ee33336 100644
--- a/drivers/gpu/drm/i915/i915_active.c
+++ b/drivers/gpu/drm/i915/i915_active.c
@@ -469,6 +469,7 @@ int i915_active_wait(struct i915_active *ref)
 	if (wait_var_event_interruptible(ref, i915_active_is_idle(ref)))
 		return -EINTR;
 
+	flush_work(&ref->work);
 	return 0;
 }
 
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-11-30  9:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-29 20:14 [CI 1/2] drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd Chris Wilson
2019-11-29 20:14 ` [Intel-gfx] " Chris Wilson
2019-11-29 20:14 ` [CI 2/2] drm/i915: Serialise i915_active_wait() with its retirement Chris Wilson
2019-11-29 20:14   ` [Intel-gfx] " Chris Wilson
2019-11-29 23:41 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/2] drm/i915/dp: Take display powerwell before intel_dp_detect_dpcd Patchwork
2019-11-29 23:41   ` [Intel-gfx] " Patchwork
2019-11-30  0:11 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-11-30  0:11   ` [Intel-gfx] " Patchwork
2019-11-30  9:42 [CI 1/2] " Chris Wilson
2019-11-30  9:42 ` [CI 2/2] drm/i915: Serialise i915_active_wait() with its retirement Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.