Skip to contentSkip to conversation

drm/i915/bdw: Return -ENONENT on default ctx destroy

PATCH In review Ben Widawsky 2 participants 2 messages Dec 25, 2013 – Dec 30, 2013

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

PATCH 1/1 drm/i915/bdw: Return -ENONENT on default ctx destroy

This was an accidental "ABI" change introduced during PPGTT:

commit 0eea67eb26000657079b7fc41079097942339452

Author: Ben Widawsky <[email protected]>
Date:   Fri Dec 6 14:11:19 2013 -0800

drm/i915: Create a per file_priv default context

The failure test application actually tests the return type. The other option is to simply change the test.

---
 drivers/gpu/drm/i915/i915_gem_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_context.c +1 -1
index ebe0f67..15d1f96 100644
@@ -769,7 +769,7 @@ int i915_gem_context_destroy_ioctl(struct drm_device *dev, void *data,
 		return -ENODEV;
 
 	if (args->ctx_id == DEFAULT_CONTEXT_ID)
-		return -EPERM;
+		return -ENOENT;
 
 	ret = i915_mutex_lock_interruptible(dev);
 	if (ret)
Signature · 1 line
1.8.5.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Ben Widawsky

This was an accidental "ABI" change introduced during PPGTT:

commit 0eea67eb26000657079b7fc41079097942339452

Author: Ben Widawsky <[email protected]>
Date:   Fri Dec 6 14:11:19 2013 -0800
Quoted 6 lines

drm/i915: Create a per file_priv default context

The failure test application actually tests the return type. The other option is to simply change the test.

I was thinking that EPERM on the untouchable default context was right, until I noticed that this was destroy and it is never possible to destroy the default. (Not even root can, so you can not raise your privileges and make the ioctl work.)

-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre