Skip to contentSkip to conversation

drm/i915: fix wrong ifdef condition for mutex owner

PATCH New Hong Liu 4 participants 5 messages Jul 11, 2016 – Jul 12, 2016

Subsystems (2)
lore
Share & tools
lore

Hong Liu

author
#0 lore raw

PATCH 1/1 drm/i915: fix wrong ifdef condition for mutex owner

Got compiling error if disabling MUTEX_SPIN_ON_OWNER and DEBUG_MUTEXES:

drivers/gpu/drm/i915/i915_gem_shrinker.c:44:14: error: 'struct mutex' has no member named 'owner'.

---
 drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_shrinker.c +1 -1
index 067632a..0066b9c 100644
@@ -40,7 +40,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
 	if (!mutex_is_locked(mutex))
 		return false;
 
-#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES)
+#if defined(CONFIG_SMP) && defined(CONFIG_DEBUG_MUTEXES)
 	return mutex->owner == task;
 #else
 	/* Since UP may be pre-empted, we cannot assume that we own the lock */
Signature · 6 lines
2.7.4

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

PATCH 1/1 drm/i915: Update ifdeffery for mutex->owner

In commit 7608a43d8f2e ("locking/mutexes: Use MUTEX_SPIN_ON_OWNER when appropriate") the owner field in the mutex was updated from being dependent upon CONFIG_SMP to using optimistic spin. Update our peek function to suite.

Fixes 7608a43d8f2e ("locking/mutexes: Use MUTEX_SPIN_ON_OWNER...")
---
 drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_shrinker.c +1 -1
index 8ad95695f80c..ef2bd970ef0b 100644
@@ -40,7 +40,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
 	if (!mutex_is_locked(mutex))
 		return false;
 
-#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES)
+#if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTEX_SPIN_ON_OWNER)
 	return mutex->owner == task;
 #else
 	/* Since UP may be pre-empted, we cannot assume that we own the lock */
Signature · 6 lines
2.8.1

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

Re: [PATCH] drm/i915: Update ifdeffery for mutex->owner

Quoted 1 line · Matthew Auld

Thanks, pushed.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

✗ Ro.CI.BAT: failure for drm/i915: fix wrong ifdef condition for mutex owner (rev2)

In reply to Hong Liu
== Series Details ==

== Series Details ==

Series: drm/i915: fix wrong ifdef condition for mutex owner (rev2)
URL : https://patchwork.freedesktop.org/series/9718/
State : failure

== Summary ==

Series 9718v2 drm/i915: fix wrong ifdef condition for mutex owner
http://patchwork.freedesktop.org/api/1.0/series/9718/revisions/2/mbox

Test gem_sync:

        Subgroup basic-store-each:
                pass       -> DMESG-FAIL (ro-bdw-i7-5600u)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-b:
                pass       -> SKIP       (fi-skl-i5-6260u)
        Subgroup nonblocking-crc-pipe-c-frame-sequence:
                pass       -> SKIP       (fi-skl-i5-6260u)
        Subgroup suspend-read-crc-pipe-a:
                skip       -> DMESG-WARN (ro-bdw-i7-5557U)
fi-kbl-qkkr      total:237  pass:168  dwarn:27  dfail:2   fail:5   skip:35 
fi-skl-i5-6260u  total:237  pass:210  dwarn:0   dfail:1   fail:4   skip:22 
fi-skl-i7-6700k  total:237  pass:198  dwarn:0   dfail:1   fail:4   skip:34 
fi-snb-i7-2600   total:237  pass:184  dwarn:0   dfail:1   fail:4   skip:48 
ro-bdw-i5-5250u  total:237  pass:207  dwarn:1   dfail:1   fail:4   skip:24 
ro-bdw-i7-5557U  total:237  pass:207  dwarn:2   dfail:1   fail:4   skip:23 
ro-bdw-i7-5600u  total:237  pass:192  dwarn:0   dfail:2   fail:4   skip:39 
ro-bsw-n3050     total:217  pass:170  dwarn:0   dfail:0   fail:4   skip:42 
ro-byt-n2820     total:237  pass:183  dwarn:0   dfail:1   fail:7   skip:46 
ro-hsw-i3-4010u  total:237  pass:200  dwarn:0   dfail:1   fail:4   skip:32 
ro-hsw-i7-4770r  total:237  pass:200  dwarn:0   dfail:1   fail:4   skip:32 
ro-ilk-i7-620lm  total:237  pass:160  dwarn:0   dfail:1   fail:5   skip:71 
ro-ilk1-i5-650   total:232  pass:160  dwarn:0   dfail:1   fail:5   skip:66 
ro-ivb-i7-3770   total:237  pass:191  dwarn:0   dfail:1   fail:4   skip:41 
ro-skl3-i5-6260u total:237  pass:211  dwarn:1   dfail:1   fail:4   skip:20 
ro-snb-i7-2620M  total:237  pass:182  dwarn:0   dfail:1   fail:5   skip:49 

Results at /archive/results/CI_IGT_test/RO_Patchwork_1466/

e549c0b drm-intel-nightly: 2016y-07m-11d-12h-49m-29s UTC integration manifest 288d53a drm/i915: Update ifdeffery for mutex->owner

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