All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Handle early failure during intel_get_load_detect_pipe
@ 2016-10-19 11:37 Chris Wilson
  2016-10-19 14:24 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2016-10-19 17:47 ` ✗ Fi.CI.BAT: warning " Patchwork
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Wilson @ 2016-10-19 11:37 UTC (permalink / raw)
  To: intel-gfx

In the error path, we have to be ready to handle an error before either
the state or restore_state have been allocated.

[  397.001342] BUG: unable to handle kernel NULL pointer dereference at           (null)
[  397.001419] IP: [<ffffffffa04347b4>] intel_get_load_detect_pipe+0xe4/0x610 [i915]
[  397.001502] PGD 136a2a067
[  397.001523] PUD 134b5f067
[  397.001546] PMD 0

[  397.001569] Oops: 0002 [#1] PREEMPT SMP
[  397.001599] Modules linked in: snd_hda_intel i915 cdc_ncm usbnet mii x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm lpc_ich mei_me mei sdhci_pci sdhci mmc_core e1000e ptp pps_core [last unloaded: i915]
[  397.001902] CPU: 1 PID: 9287 Comm: kms_force_conne Tainted: G     U          4.9.0-rc1-CI-CI_DRM_1730+ #1
[  397.001965] Hardware name: LENOVO 2356GCG/2356GCG, BIOS G7ET31WW (1.13 ) 07/02/2012
[  397.002017] task: ffff880138c38040 task.stack: ffffc900083e4000
[  397.002057] RIP: 0010:[<ffffffffa04347b4>]  [<ffffffffa04347b4>] intel_get_load_detect_pipe+0xe4/0x610 [i915]
[  397.002153] RSP: 0018:ffffc900083e7ae8  EFLAGS: 00010286
[  397.002191] RAX: 00000000ffffffdd RBX: ffffc900083e7bc8 RCX: 0000000000000006
[  397.002239] RDX: 0000000000000006 RSI: ffff880138c388b8 RDI: ffffc900083e79e0
[  397.002287] RBP: ffffc900083e7b78 R08: 0000000000000000 R09: 0000000000000000
[  397.002335] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  397.002386] R13: ffff8801305e1158 R14: 00000000ffffffdd R15: 0000000000000000
[  397.002434] FS:  00007fea1b03c740(0000) GS:ffff88013e240000(0000) knlGS:0000000000000000
[  397.002488] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  397.002528] CR2: 0000000000000000 CR3: 00000001361da000 CR4: 00000000001406e0
[  397.002576] Stack:
[  397.002592]  ffff88013046f180 0000000000000000 ffffc900083e7bc0 0000000000000000
[  397.002655]  0000000000000000 ffff8801306bd038 ffff88012e980000 ffffc90000000001
[  397.002718]  ffffc90000000000 ffff880136b8ca88 ffff88012e980890 ffff88012e980540
[  397.002780] Call Trace:
[  397.002828]  [<ffffffffa044e8c4>] intel_crt_detect+0x3c4/0x8f0 [i915]
[  397.002876]  [<ffffffff810e37fa>] ? vprintk_default+0x1a/0x20
[  397.002918]  [<ffffffff8116eb68>] ? printk+0x43/0x4b
[  397.002956]  [<ffffffff81546b06>] drm_helper_probe_single_connector_modes+0x406/0x4f0
[  397.003014]  [<ffffffff81819c09>] ? mutex_unlock+0x9/0x10
[  397.003054]  [<ffffffff815723dc>] drm_mode_getconnector+0x33c/0x3c0
[  397.003099]  [<ffffffff810ed59d>] ? debug_lockdep_rcu_enabled+0x1d/0x20
[  397.003147]  [<ffffffff811a6bae>] ? __might_fault+0x3e/0x90
[  397.003191]  [<ffffffff8155aaf6>] drm_ioctl+0x1f6/0x480
[  397.003231]  [<ffffffff815720a0>] ? drm_mode_connector_property_set_ioctl+0x30/0x30
[  397.003285]  [<ffffffff8120308e>] do_vfs_ioctl+0x8e/0x690
[  397.003324]  [<ffffffff810a102c>] ? task_work_run+0x8c/0xb0
[  397.003366]  [<ffffffff810d6d92>] ? trace_hardirqs_on_caller+0x122/0x1b0
[  397.003412]  [<ffffffff812036cc>] SyS_ioctl+0x3c/0x70
[  397.003451]  [<ffffffff8181df2e>] entry_SYSCALL_64_fastpath+0x1c/0xb1
[  397.003496] Code: 85 c0 41 89 c6 75 57 49 8b 85 f0 00 00 00 48 89 de 45 31 ff 48 8d 78 20 e8 1a 89 13 e1 45 31 c9 85 c0 41 89 c6 0f 84 2f 01 00 00 <f0> 41 83 29 01 74 53 f0 41 83 2f 01 74 2d 41 83 fe dd 75 35 48
[  397.003837] RIP  [<ffffffffa04347b4>] intel_get_load_detect_pipe+0xe4/0x610 [i915]
[  397.003921]  RSP <ffffc900083e7ae8>
[  397.003947] CR2: 0000000000000000

Testcase: igt/kms_force_connector_basic/force-load-detect # ivb-3720m
Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state"
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 69b9e91f071e..e64a7edd5e60 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11283,9 +11283,14 @@ bool intel_get_load_detect_pipe(struct drm_connector *connector,
 	return true;
 
 fail:
-	drm_atomic_state_put(state);
-	drm_atomic_state_put(restore_state);
-	restore_state = state = NULL;
+	if (state) {
+		drm_atomic_state_put(state);
+		state = NULL;
+	}
+	if (restore_state) {
+		drm_atomic_state_put(restore_state);
+		restore_state = NULL;
+	}
 
 	if (ret == -EDEADLK) {
 		drm_modeset_backoff(ctx);
-- 
2.9.3

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

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

* ✗ Fi.CI.BAT: failure for drm/i915: Handle early failure during intel_get_load_detect_pipe
  2016-10-19 11:37 [PATCH] drm/i915: Handle early failure during intel_get_load_detect_pipe Chris Wilson
@ 2016-10-19 14:24 ` Patchwork
  2016-10-19 17:47 ` ✗ Fi.CI.BAT: warning " Patchwork
  1 sibling, 0 replies; 5+ messages in thread
From: Patchwork @ 2016-10-19 14:24 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Handle early failure during intel_get_load_detect_pipe
URL   : https://patchwork.freedesktop.org/series/14016/
State : failure

== Summary ==

Series 14016v1 drm/i915: Handle early failure during intel_get_load_detect_pipe
https://patchwork.freedesktop.org/api/1.0/series/14016/revisions/1/mbox/

Test drv_module_reload_basic:
                dmesg-warn -> PASS       (fi-skl-6700hq)
                pass       -> DMESG-WARN (fi-skl-6770hq)
Test gem_exec_suspend:
        Subgroup basic-s3:
                incomplete -> PASS       (fi-snb-2520m)
                fail       -> DMESG-WARN (fi-ilk-650)
                pass       -> DMESG-WARN (fi-skl-6700hq)
                dmesg-warn -> INCOMPLETE (fi-byt-j1900)
Test kms_busy:
        Subgroup basic-flip-default-a:
                pass       -> DMESG-WARN (fi-ilk-650)
Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-legacy:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup basic-busy-flip-before-cursor-varying-size:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup basic-flip-after-cursor-legacy:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup basic-flip-after-cursor-varying-size:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup basic-flip-before-cursor-legacy:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup basic-flip-before-cursor-varying-size:
                pass       -> DMESG-WARN (fi-ilk-650)
Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup basic-flip-vs-modeset:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup basic-plain-flip:
                pass       -> DMESG-WARN (fi-ilk-650)
Test kms_force_connector_basic:
        Subgroup force-load-detect:
                incomplete -> PASS       (fi-ivb-3770)
Test kms_pipe_crc_basic:
        Subgroup hang-read-crc-pipe-a:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup hang-read-crc-pipe-b:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup nonblocking-crc-pipe-a:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup nonblocking-crc-pipe-a-frame-sequence:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup nonblocking-crc-pipe-b:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup nonblocking-crc-pipe-b-frame-sequence:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup read-crc-pipe-a:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup read-crc-pipe-a-frame-sequence:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup read-crc-pipe-b:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup read-crc-pipe-b-frame-sequence:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup suspend-read-crc-pipe-a:
                fail       -> DMESG-WARN (fi-ilk-650)
                pass       -> DMESG-WARN (fi-skl-6700hq)
        Subgroup suspend-read-crc-pipe-b:
                fail       -> DMESG-WARN (fi-ilk-650)
                pass       -> DMESG-WARN (fi-skl-6700hq)
                pass       -> INCOMPLETE (fi-skl-6700k)
        Subgroup suspend-read-crc-pipe-c:
                pass       -> DMESG-WARN (fi-skl-6700hq)

fi-bdw-5557u     total:246  pass:231  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:246  pass:203  dwarn:1   dfail:0   fail:0   skip:42 
fi-bxt-t5700     total:246  pass:216  dwarn:0   dfail:0   fail:0   skip:30 
fi-byt-j1900     total:76   pass:62   dwarn:0   dfail:0   fail:1   skip:12 
fi-byt-n2820     total:246  pass:209  dwarn:1   dfail:0   fail:1   skip:35 
fi-hsw-4770      total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-hsw-4770r     total:246  pass:223  dwarn:1   dfail:0   fail:0   skip:22 
fi-ilk-650       total:246  pass:160  dwarn:24  dfail:0   fail:2   skip:60 
fi-ivb-3520m     total:246  pass:221  dwarn:0   dfail:0   fail:0   skip:25 
fi-ivb-3770      total:208  pass:186  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7200u     total:246  pass:222  dwarn:0   dfail:0   fail:0   skip:24 
fi-skl-6260u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:246  pass:219  dwarn:4   dfail:0   fail:0   skip:23 
fi-skl-6700k     total:209  pass:185  dwarn:1   dfail:0   fail:0   skip:22 
fi-skl-6770hq    total:246  pass:231  dwarn:1   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:246  pass:210  dwarn:0   dfail:0   fail:0   skip:36 
fi-snb-2600      total:246  pass:209  dwarn:0   dfail:0   fail:0   skip:37 

Results at /archive/results/CI_IGT_test/Patchwork_2759/

d5cbeba648bec880aa0e1f7a531e684499a079a7 drm-intel-nightly: 2016y-10m-19d-11h-13m-08s UTC integration manifest
b3ed176 drm/i915: Handle early failure during intel_get_load_detect_pipe

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

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

* ✗ Fi.CI.BAT: warning for drm/i915: Handle early failure during intel_get_load_detect_pipe
  2016-10-19 11:37 [PATCH] drm/i915: Handle early failure during intel_get_load_detect_pipe Chris Wilson
  2016-10-19 14:24 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2016-10-19 17:47 ` Patchwork
  2016-10-19 17:55   ` Chris Wilson
  1 sibling, 1 reply; 5+ messages in thread
From: Patchwork @ 2016-10-19 17:47 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Handle early failure during intel_get_load_detect_pipe
URL   : https://patchwork.freedesktop.org/series/14016/
State : warning

== Summary ==

Series 14016v1 drm/i915: Handle early failure during intel_get_load_detect_pipe
https://patchwork.freedesktop.org/api/1.0/series/14016/revisions/1/mbox/

Test drv_module_reload_basic:
                pass       -> DMESG-WARN (fi-skl-6700hq)
Test gem_exec_suspend:
        Subgroup basic-s3:
                dmesg-warn -> PASS       (fi-skl-6700hq)
Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-legacy:
                pass       -> DMESG-WARN (fi-ilk-650)
Test kms_force_connector_basic:
        Subgroup force-load-detect:
                incomplete -> PASS       (fi-byt-j1900)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                dmesg-warn -> PASS       (fi-skl-6700hq)
        Subgroup suspend-read-crc-pipe-b:
                dmesg-warn -> PASS       (fi-skl-6700hq)
                incomplete -> PASS       (fi-snb-2600)
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (fi-skl-6700hq)

fi-bdw-5557u     total:246  pass:231  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:246  pass:203  dwarn:1   dfail:0   fail:0   skip:42 
fi-bxt-t5700     total:246  pass:216  dwarn:0   dfail:0   fail:0   skip:30 
fi-byt-j1900     total:246  pass:213  dwarn:1   dfail:0   fail:1   skip:31 
fi-byt-n2820     total:246  pass:209  dwarn:1   dfail:0   fail:1   skip:35 
fi-hsw-4770      total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-hsw-4770r     total:246  pass:223  dwarn:1   dfail:0   fail:0   skip:22 
fi-ilk-650       total:246  pass:159  dwarn:25  dfail:0   fail:2   skip:60 
fi-ivb-3520m     total:246  pass:221  dwarn:0   dfail:0   fail:0   skip:25 
fi-ivb-3770      total:246  pass:221  dwarn:0   dfail:0   fail:0   skip:25 
fi-skl-6260u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:246  pass:222  dwarn:1   dfail:0   fail:0   skip:23 
fi-skl-6700k     total:246  pass:221  dwarn:1   dfail:0   fail:0   skip:24 
fi-skl-6770hq    total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:246  pass:210  dwarn:0   dfail:0   fail:0   skip:36 
fi-snb-2600      total:246  pass:209  dwarn:0   dfail:0   fail:0   skip:37 

Results at /archive/results/CI_IGT_test/Patchwork_2764/

21787266bd182df4c0d2067cf1b5c2379f61c24d drm-intel-nightly: 2016y-10m-19d-15h-39m-22s UTC integration manifest
9646282 drm/i915: Handle early failure during intel_get_load_detect_pipe

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

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

* Re: ✗ Fi.CI.BAT: warning for drm/i915: Handle early failure during intel_get_load_detect_pipe
  2016-10-19 17:47 ` ✗ Fi.CI.BAT: warning " Patchwork
@ 2016-10-19 17:55   ` Chris Wilson
  2016-10-20  7:03     ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2016-10-19 17:55 UTC (permalink / raw)
  To: intel-gfx; +Cc: Daniel Vetter

On Wed, Oct 19, 2016 at 05:47:39PM -0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Handle early failure during intel_get_load_detect_pipe
> URL   : https://patchwork.freedesktop.org/series/14016/
> State : warning
> 
> == Summary ==
> 
> Series 14016v1 drm/i915: Handle early failure during intel_get_load_detect_pipe
> https://patchwork.freedesktop.org/api/1.0/series/14016/revisions/1/mbox/
> 
> Test drv_module_reload_basic:
>                 pass       -> DMESG-WARN (fi-skl-6700hq)
> Test gem_exec_suspend:
>         Subgroup basic-s3:
>                 dmesg-warn -> PASS       (fi-skl-6700hq)
> Test kms_cursor_legacy:
>         Subgroup basic-busy-flip-before-cursor-legacy:
>                 pass       -> DMESG-WARN (fi-ilk-650)
> Test kms_force_connector_basic:
>         Subgroup force-load-detect:
>                 incomplete -> PASS       (fi-byt-j1900)
> Test kms_pipe_crc_basic:
>         Subgroup suspend-read-crc-pipe-a:
>                 dmesg-warn -> PASS       (fi-skl-6700hq)
>         Subgroup suspend-read-crc-pipe-b:
>                 dmesg-warn -> PASS       (fi-skl-6700hq)
>                 incomplete -> PASS       (fi-snb-2600)
>         Subgroup suspend-read-crc-pipe-c:
>                 dmesg-warn -> PASS       (fi-skl-6700hq)
> 
> fi-ilk-650       total:246  pass:159  dwarn:25  dfail:0   fail:2   skip:60 

All the warns are in -nightly, give or take piglit sporadicly assigning the
unrelated warns to individual tests. Too bad it didn't list all the
notrun -> pass, or still doesn't mention the actual oops on
fi-ivb-3720m.

Looks like we don't have a backmerge yet, so this needs to be applied to
drm-misc.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (irc)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: ✗ Fi.CI.BAT: warning for drm/i915: Handle early failure during intel_get_load_detect_pipe
  2016-10-19 17:55   ` Chris Wilson
@ 2016-10-20  7:03     ` Daniel Vetter
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2016-10-20  7:03 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx, Daniel Vetter

On Wed, Oct 19, 2016 at 06:55:44PM +0100, Chris Wilson wrote:
> On Wed, Oct 19, 2016 at 05:47:39PM -0000, Patchwork wrote:
> > == Series Details ==
> > 
> > Series: drm/i915: Handle early failure during intel_get_load_detect_pipe
> > URL   : https://patchwork.freedesktop.org/series/14016/
> > State : warning
> > 
> > == Summary ==
> > 
> > Series 14016v1 drm/i915: Handle early failure during intel_get_load_detect_pipe
> > https://patchwork.freedesktop.org/api/1.0/series/14016/revisions/1/mbox/
> > 
> > Test drv_module_reload_basic:
> >                 pass       -> DMESG-WARN (fi-skl-6700hq)
> > Test gem_exec_suspend:
> >         Subgroup basic-s3:
> >                 dmesg-warn -> PASS       (fi-skl-6700hq)
> > Test kms_cursor_legacy:
> >         Subgroup basic-busy-flip-before-cursor-legacy:
> >                 pass       -> DMESG-WARN (fi-ilk-650)
> > Test kms_force_connector_basic:
> >         Subgroup force-load-detect:
> >                 incomplete -> PASS       (fi-byt-j1900)
> > Test kms_pipe_crc_basic:
> >         Subgroup suspend-read-crc-pipe-a:
> >                 dmesg-warn -> PASS       (fi-skl-6700hq)
> >         Subgroup suspend-read-crc-pipe-b:
> >                 dmesg-warn -> PASS       (fi-skl-6700hq)
> >                 incomplete -> PASS       (fi-snb-2600)
> >         Subgroup suspend-read-crc-pipe-c:
> >                 dmesg-warn -> PASS       (fi-skl-6700hq)
> > 
> > fi-ilk-650       total:246  pass:159  dwarn:25  dfail:0   fail:2   skip:60 
> 
> All the warns are in -nightly, give or take piglit sporadicly assigning the
> unrelated warns to individual tests. Too bad it didn't list all the
> notrun -> pass, or still doesn't mention the actual oops on
> fi-ivb-3720m.
> 
> Looks like we don't have a backmerge yet, so this needs to be applied to
> drm-misc.

Done, thanks.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2016-10-20  7:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-19 11:37 [PATCH] drm/i915: Handle early failure during intel_get_load_detect_pipe Chris Wilson
2016-10-19 14:24 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-10-19 17:47 ` ✗ Fi.CI.BAT: warning " Patchwork
2016-10-19 17:55   ` Chris Wilson
2016-10-20  7:03     ` Daniel Vetter

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.