Skip to contentSkip to conversation

drm/i915: Add missing 'else' to intel_digital_port_connected()

PATCH In review [email protected] 3 participants 5 messages Feb 11, 2016 – Feb 15, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Add missing 'else' to intel_digital_port_connected()

From: Ville Syrjälä <[email protected]>

intel_digital_port_connected() lacks one 'else'. There's no actual harm in not having it since each branch has an unconditional return, so it can't accidentally end up in taking two branches instead of just the one. But let's be consistent and add the 'else' anyway.

---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +1 -1
index bbe18996efe6..040b86b9797f 100644
@@ -4551,7 +4551,7 @@ bool intel_digital_port_connected(struct drm_i915_private *dev_priv,
 {
 	if (HAS_PCH_IBX(dev_priv))
 		return ibx_digital_port_connected(dev_priv, port);
-	if (HAS_PCH_SPLIT(dev_priv))
+	else if (HAS_PCH_SPLIT(dev_priv))
 		return cpt_digital_port_connected(dev_priv, port);
 	else if (IS_BROXTON(dev_priv))
 		return bxt_digital_port_connected(dev_priv, port);
Signature · 6 lines
2.4.10

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · On Thu, 11 Feb 2016, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

intel_digital_port_connected() lacks one 'else'. There's no actual harm in not having it since each branch has an unconditional return, so it can't accidentally end up in taking two branches instead of just the one. But let's be consistent and add the 'else' anyway.

Quoted 17 lines
---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +1 -1
index bbe18996efe6..040b86b9797f 100644
@@ -4551,7 +4551,7 @@ bool intel_digital_port_connected(struct drm_i915_private *dev_priv,
 {
 	if (HAS_PCH_IBX(dev_priv))
 		return ibx_digital_port_connected(dev_priv, port);
-	if (HAS_PCH_SPLIT(dev_priv))
+	else if (HAS_PCH_SPLIT(dev_priv))
 		return cpt_digital_port_connected(dev_priv, port);
 	else if (IS_BROXTON(dev_priv))
 		return bxt_digital_port_connected(dev_priv, port);
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

✗ Fi.CI.BAT: failure for drm/i915: Add missing 'else' to intel_digital_port_connected()

In reply to [email protected]
== Summary ==

== Summary ==

Series 3292v1 drm/i915: Add missing 'else' to intel_digital_port_connected()
http://patchwork.freedesktop.org/api/1.0/series/3292/revisions/1/mbox/

Test gem_mmap_gtt:

        Subgroup basic-small-copy-xy:
                pass       -> DMESG-FAIL (ilk-hp8440p)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (bsw-nuc-2)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                pass       -> DMESG-WARN (bsw-nuc-2)
                fail       -> PASS       (bdw-nuci7)
        Subgroup basic-rte:
                dmesg-warn -> PASS       (bsw-nuc-2)
                pass       -> FAIL       (bdw-ultra)
bdw-nuci7        total:162  pass:152  dwarn:0   dfail:0   fail:0   skip:10 
bdw-ultra        total:165  pass:151  dwarn:0   dfail:0   fail:1   skip:13 
bsw-nuc-2        total:165  pass:135  dwarn:1   dfail:0   fail:0   skip:29 
byt-nuc          total:165  pass:141  dwarn:0   dfail:0   fail:0   skip:24 
hsw-brixbox      total:165  pass:151  dwarn:0   dfail:0   fail:0   skip:14 
hsw-gt2          total:165  pass:154  dwarn:0   dfail:0   fail:1   skip:10 
ilk-hp8440p      total:165  pass:115  dwarn:0   dfail:1   fail:1   skip:48 
ivb-t430s        total:165  pass:150  dwarn:0   dfail:0   fail:1   skip:14 
skl-i5k-2        total:165  pass:149  dwarn:1   dfail:0   fail:0   skip:15 
snb-dellxps      total:165  pass:142  dwarn:0   dfail:0   fail:1   skip:22 
snb-x220t        total:165  pass:142  dwarn:0   dfail:0   fail:2   skip:21 

Results at /archive/results/CI_IGT_test/Patchwork_1396/

f2110d8eac120416f8f5669f2aa561d9ab330a77 drm-intel-nightly: 2016y-02m-15d-09h-53m-04s UTC integration manifest bb6fd4ba57d864494466a3bd498428f71db09492 drm/i915: Add missing 'else' to intel_digital_port_connected()

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Re: ✗ Fi.CI.BAT: failure for drm/i915: Add missing 'else' to intel_digital_port_connected()

Quoted 8 lines · Patchwork

== Summary ==

Series 3292v1 drm/i915: Add missing 'else' to intel_digital_port_connected()
http://patchwork.freedesktop.org/api/1.0/series/3292/revisions/1/mbox/

Test gem_mmap_gtt:

        Subgroup basic-small-copy-xy:
                pass       -> DMESG-FAIL (ilk-hp8440p)

Some kind of corrupted spinlock:

[  488.270400] BUG: unable to handle kernel paging request at 00000000ffffeef7
[  488.270487] IP: [<ffffffff810c9efc>] __lock_acquire+0x1ac/0x1f70
[  488.270555] PGD 13006a067 PUD 0 
[  488.270605] Oops: 0000 [#1] PREEMPT SMP 
[  488.270667] Modules linked in: snd_hda_intel i915 ax88179_178a usbnet mii snd_hda_codec_hdmi snd_hda_codec_generic intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul snd_hda_codec ghash_clmulni_intel snd_hwdep snd_hda_core snd_pcm mei_me mei lpc_ich sdhci_pci sdhci mmc_core e1000e ptp pps_core [last unloaded: i915]
[  488.271084] CPU: 0 PID: 6426 Comm: gem_mmap_gtt Tainted: G     U          4.5.0-rc3-gfxbench+ #1
[  488.271162] Hardware name: Hewlett-Packard HP EliteBook 8440p/172A, BIOS 68CCU Ver. F.24 09/13/2013
[  488.271240] task: ffff8800b4afcb00 ti: ffff880132314000 task.ti: ffff880132314000
[  488.271306] RIP: 0010:[<ffffffff810c9efc>]  [<ffffffff810c9efc>] __lock_acquire+0x1ac/0x1f70
[  488.271387] RSP: 0018:ffff880132317c10  EFLAGS: 00010002
[  488.271437] RAX: 0000000000000001 RBX: ffff8800b4afcb00 RCX: 0000000000000000
[  488.271499] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000ffffeef7
[  488.271561] RBP: ffff880132317cd0 R08: 0000000000000001 R09: 0000000000000000
[  488.271623] R10: 00000000ffffeef7 R11: 0000000000000000 R12: 0000000000000000
[  488.271685] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[  488.271749] FS:  00007f700065a740(0000) GS:ffff880137c00000(0000) knlGS:0000000000000000
[  488.271820] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  488.271872] CR2: 00000000ffffeef7 CR3: 0000000130068000 CR4: 00000000000006f0
[  488.271934] Stack:
[  488.271958]  ffff880131f09c38 ffff8800b4afcb00 0000000000000005 0000000000000003
[  488.272047]  0000000000000001 ffff8800b4afd350 ffff880132317d08 00000000000000b8
[  488.272136]  ffffffff00000000 ffff880131f09bb8 ffff8801329d1bc0 ffff880132317d98
[  488.272224] Call Trace:
[  488.272256]  [<ffffffff81000ff7>] ? trace_hardirqs_on_thunk+0x17/0x19
[  488.272315]  [<ffffffff810cc533>] lock_acquire+0xc3/0x1d0
[  488.272368]  [<ffffffff81236e78>] ? drop_pagecache_sb+0x68/0xe0
[  488.272426]  [<ffffffff817b8c26>] _raw_spin_lock+0x36/0x50
[  488.272479]  [<ffffffff81236e78>] ? drop_pagecache_sb+0x68/0xe0
[  488.272535]  [<ffffffff81236e78>] drop_pagecache_sb+0x68/0xe0
[  488.272589]  [<ffffffff81236e10>] ? do_coredump+0xf70/0xf70
[  488.272645]  [<ffffffff811d3899>] iterate_supers+0xa9/0x100
[  488.272698]  [<ffffffff81236f3e>] drop_caches_sysctl_handler+0x4e/0xb0
[  488.272761]  [<ffffffff81246251>] proc_sys_call_handler+0xc1/0xe0
[  488.272817]  [<ffffffff8124627f>] proc_sys_write+0xf/0x20
[  488.272868]  [<ffffffff811cf263>] __vfs_write+0x23/0xe0
[  488.272920]  [<ffffffff810c5a22>] ? percpu_down_read+0x52/0x90
[  488.272975]  [<ffffffff811d35e4>] ? __sb_start_write+0xd4/0xf0
[  488.273030]  [<ffffffff811d35e4>] ? __sb_start_write+0xd4/0xf0
[  488.273085]  [<ffffffff811cffb4>] vfs_write+0xa4/0x190
[  488.273136]  [<ffffffff811ee67a>] ? __fget_light+0x6a/0x90
[  488.273188]  [<ffffffff811d0e54>] SyS_write+0x44/0xb0
[  488.273237]  [<ffffffff817b989b>] entry_SYSCALL_64_fastpath+0x16/0x73
[  488.273294] Code: b7 a7 01 85 c0 75 0a 45 3b 7e 28 0f 85 1f 0a 00 00 4d 85 f6 75 40 45 31 e4 48 8d 65 d8 44 89 e0 5b 41 5c 41 5d 41 5e 41 5f 5d c3 <49> 81 3a c0 d4 ea 81 b8 00 00 00 00 44 0f 44 c0 41 83 ff 01 0f 
[  488.273912] RIP  [<ffffffff810c9efc>] __lock_acquire+0x1ac/0x1f70
[  488.273975]  RSP <ffff880132317c10>
[  488.274009] CR2: 00000000ffffeef7
[  488.274044] ---[ end trace cca43566d6f09c11 ]---

Imre and I had a look and this would seem to correspond to this C code:

	if (!prove_locking || lock->key == &__lockdep_no_validate__)
                check = 0;

so the passed lockdep_map was garbage for some reason.

Quoted 6 lines

Test kms_pipe_crc_basic:

        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (bsw-nuc-2)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                pass       -> DMESG-WARN (bsw-nuc-2)

*ERROR* Unclaimed access detected prior to suspending

Seems to have been there for quite a while. Filed a bug
https://bugs.freedesktop.org/show_bug.cgi?id=94164

Quoted 4 lines
                fail       -> PASS       (bdw-nuci7)
        Subgroup basic-rte:
                dmesg-warn -> PASS       (bsw-nuc-2)
                pass       -> FAIL       (bdw-ultra)

The rpm tests seem unstable. Bunch of random fails here and there. Filed https://bugs.freedesktop.org/show_bug.cgi?id=94163

Quoted 17 lines
bdw-nuci7        total:162  pass:152  dwarn:0   dfail:0   fail:0   skip:10 
bdw-ultra        total:165  pass:151  dwarn:0   dfail:0   fail:1   skip:13 
bsw-nuc-2        total:165  pass:135  dwarn:1   dfail:0   fail:0   skip:29 
byt-nuc          total:165  pass:141  dwarn:0   dfail:0   fail:0   skip:24 
hsw-brixbox      total:165  pass:151  dwarn:0   dfail:0   fail:0   skip:14 
hsw-gt2          total:165  pass:154  dwarn:0   dfail:0   fail:1   skip:10 
ilk-hp8440p      total:165  pass:115  dwarn:0   dfail:1   fail:1   skip:48 
ivb-t430s        total:165  pass:150  dwarn:0   dfail:0   fail:1   skip:14 
skl-i5k-2        total:165  pass:149  dwarn:1   dfail:0   fail:0   skip:15 
snb-dellxps      total:165  pass:142  dwarn:0   dfail:0   fail:1   skip:22 
snb-x220t        total:165  pass:142  dwarn:0   dfail:0   fail:2   skip:21 

Results at /archive/results/CI_IGT_test/Patchwork_1396/

f2110d8eac120416f8f5669f2aa561d9ab330a77 drm-intel-nightly: 2016y-02m-15d-09h-53m-04s UTC integration manifest bb6fd4ba57d864494466a3bd498428f71db09492 drm/i915: Add missing 'else' to intel_digital_port_connected()

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

Re: ✗ Fi.CI.BAT: failure for drm/i915: Add missing 'else' to intel_digital_port_connected()

Quoted 78 lines · Ville Syrjälä
Quoted 8 lines · Patchwork

== Summary ==

Series 3292v1 drm/i915: Add missing 'else' to intel_digital_port_connected()
http://patchwork.freedesktop.org/api/1.0/series/3292/revisions/1/mbox/

Test gem_mmap_gtt:

        Subgroup basic-small-copy-xy:
                pass       -> DMESG-FAIL (ilk-hp8440p)

Some kind of corrupted spinlock:

[  488.270400] BUG: unable to handle kernel paging request at 00000000ffffeef7
[  488.270487] IP: [<ffffffff810c9efc>] __lock_acquire+0x1ac/0x1f70
[  488.270555] PGD 13006a067 PUD 0 
[  488.270605] Oops: 0000 [#1] PREEMPT SMP 
[  488.270667] Modules linked in: snd_hda_intel i915 ax88179_178a usbnet mii snd_hda_codec_hdmi snd_hda_codec_generic intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul snd_hda_codec ghash_clmulni_intel snd_hwdep snd_hda_core snd_pcm mei_me mei lpc_ich sdhci_pci sdhci mmc_core e1000e ptp pps_core [last unloaded: i915]
[  488.271084] CPU: 0 PID: 6426 Comm: gem_mmap_gtt Tainted: G     U          4.5.0-rc3-gfxbench+ #1
[  488.271162] Hardware name: Hewlett-Packard HP EliteBook 8440p/172A, BIOS 68CCU Ver. F.24 09/13/2013
[  488.271240] task: ffff8800b4afcb00 ti: ffff880132314000 task.ti: ffff880132314000
[  488.271306] RIP: 0010:[<ffffffff810c9efc>]  [<ffffffff810c9efc>] __lock_acquire+0x1ac/0x1f70
[  488.271387] RSP: 0018:ffff880132317c10  EFLAGS: 00010002
[  488.271437] RAX: 0000000000000001 RBX: ffff8800b4afcb00 RCX: 0000000000000000
[  488.271499] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000ffffeef7
[  488.271561] RBP: ffff880132317cd0 R08: 0000000000000001 R09: 0000000000000000
[  488.271623] R10: 00000000ffffeef7 R11: 0000000000000000 R12: 0000000000000000
[  488.271685] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[  488.271749] FS:  00007f700065a740(0000) GS:ffff880137c00000(0000) knlGS:0000000000000000
[  488.271820] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  488.271872] CR2: 00000000ffffeef7 CR3: 0000000130068000 CR4: 00000000000006f0
[  488.271934] Stack:
[  488.271958]  ffff880131f09c38 ffff8800b4afcb00 0000000000000005 0000000000000003
[  488.272047]  0000000000000001 ffff8800b4afd350 ffff880132317d08 00000000000000b8
[  488.272136]  ffffffff00000000 ffff880131f09bb8 ffff8801329d1bc0 ffff880132317d98
[  488.272224] Call Trace:
[  488.272256]  [<ffffffff81000ff7>] ? trace_hardirqs_on_thunk+0x17/0x19
[  488.272315]  [<ffffffff810cc533>] lock_acquire+0xc3/0x1d0
[  488.272368]  [<ffffffff81236e78>] ? drop_pagecache_sb+0x68/0xe0
[  488.272426]  [<ffffffff817b8c26>] _raw_spin_lock+0x36/0x50
[  488.272479]  [<ffffffff81236e78>] ? drop_pagecache_sb+0x68/0xe0
[  488.272535]  [<ffffffff81236e78>] drop_pagecache_sb+0x68/0xe0
[  488.272589]  [<ffffffff81236e10>] ? do_coredump+0xf70/0xf70
[  488.272645]  [<ffffffff811d3899>] iterate_supers+0xa9/0x100
[  488.272698]  [<ffffffff81236f3e>] drop_caches_sysctl_handler+0x4e/0xb0
[  488.272761]  [<ffffffff81246251>] proc_sys_call_handler+0xc1/0xe0
[  488.272817]  [<ffffffff8124627f>] proc_sys_write+0xf/0x20
[  488.272868]  [<ffffffff811cf263>] __vfs_write+0x23/0xe0
[  488.272920]  [<ffffffff810c5a22>] ? percpu_down_read+0x52/0x90
[  488.272975]  [<ffffffff811d35e4>] ? __sb_start_write+0xd4/0xf0
[  488.273030]  [<ffffffff811d35e4>] ? __sb_start_write+0xd4/0xf0
[  488.273085]  [<ffffffff811cffb4>] vfs_write+0xa4/0x190
[  488.273136]  [<ffffffff811ee67a>] ? __fget_light+0x6a/0x90
[  488.273188]  [<ffffffff811d0e54>] SyS_write+0x44/0xb0
[  488.273237]  [<ffffffff817b989b>] entry_SYSCALL_64_fastpath+0x16/0x73
[  488.273294] Code: b7 a7 01 85 c0 75 0a 45 3b 7e 28 0f 85 1f 0a 00 00 4d 85 f6 75 40 45 31 e4 48 8d 65 d8 44 89 e0 5b 41 5c 41 5d 41 5e 41 5f 5d c3 <49> 81 3a c0 d4 ea 81 b8 00 00 00 00 44 0f 44 c0 41 83 ff 01 0f 
[  488.273912] RIP  [<ffffffff810c9efc>] __lock_acquire+0x1ac/0x1f70
[  488.273975]  RSP <ffff880132317c10>
[  488.274009] CR2: 00000000ffffeef7
[  488.274044] ---[ end trace cca43566d6f09c11 ]---

Imre and I had a look and this would seem to correspond to this C code:

	if (!prove_locking || lock->key == &__lockdep_no_validate__)
                check = 0;

so the passed lockdep_map was garbage for some reason.

Quoted 6 lines

Test kms_pipe_crc_basic:

        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (bsw-nuc-2)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                pass       -> DMESG-WARN (bsw-nuc-2)

*ERROR* Unclaimed access detected prior to suspending

Seems to have been there for quite a while. Filed a bug
https://bugs.freedesktop.org/show_bug.cgi?id=94164

Quoted 7 lines
Quoted 4 lines
                fail       -> PASS       (bdw-nuci7)
        Subgroup basic-rte:
                dmesg-warn -> PASS       (bsw-nuc-2)
                pass       -> FAIL       (bdw-ultra)

The rpm tests seem unstable. Bunch of random fails here and there. Filed https://bugs.freedesktop.org/show_bug.cgi?id=94163

None of that seems related to my little 'else' so I went and pushed the patch to dinq. Thanks for the review.

Quoted 26 lines
Quoted 18 lines

bdw-nuci7        total:162  pass:152  dwarn:0   dfail:0   fail:0   skip:10 
bdw-ultra        total:165  pass:151  dwarn:0   dfail:0   fail:1   skip:13 
bsw-nuc-2        total:165  pass:135  dwarn:1   dfail:0   fail:0   skip:29 
byt-nuc          total:165  pass:141  dwarn:0   dfail:0   fail:0   skip:24 
hsw-brixbox      total:165  pass:151  dwarn:0   dfail:0   fail:0   skip:14 
hsw-gt2          total:165  pass:154  dwarn:0   dfail:0   fail:1   skip:10 
ilk-hp8440p      total:165  pass:115  dwarn:0   dfail:1   fail:1   skip:48 
ivb-t430s        total:165  pass:150  dwarn:0   dfail:0   fail:1   skip:14 
skl-i5k-2        total:165  pass:149  dwarn:1   dfail:0   fail:0   skip:15 
snb-dellxps      total:165  pass:142  dwarn:0   dfail:0   fail:1   skip:22 
snb-x220t        total:165  pass:142  dwarn:0   dfail:0   fail:2   skip:21 

Results at /archive/results/CI_IGT_test/Patchwork_1396/

f2110d8eac120416f8f5669f2aa561d9ab330a77 drm-intel-nightly: 2016y-02m-15d-09h-53m-04s UTC integration manifest bb6fd4ba57d864494466a3bd498428f71db09492 drm/i915: Add missing 'else' to intel_digital_port_connected()

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx