public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/bdw: Return -ENONENT on default ctx destroy
@ 2013-12-25  0:02 Ben Widawsky
  2013-12-30 13:09 ` Chris Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Widawsky @ 2013-12-25  0:02 UTC (permalink / raw)
  To: Intel GFX; +Cc: Ben Widawsky, Ben Widawsky

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

commit 0eea67eb26000657079b7fc41079097942339452
Author: Ben Widawsky <ben@bwidawsk.net>
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.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_gem_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index ebe0f67..15d1f96 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -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)
-- 
1.8.5.2

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

* Re: [PATCH] drm/i915/bdw: Return -ENONENT on default ctx destroy
  2013-12-25  0:02 [PATCH] drm/i915/bdw: Return -ENONENT on default ctx destroy Ben Widawsky
@ 2013-12-30 13:09 ` Chris Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2013-12-30 13:09 UTC (permalink / raw)
  To: Ben Widawsky; +Cc: Intel GFX, Ben Widawsky

On Tue, Dec 24, 2013 at 04:02:54PM -0800, Ben Widawsky wrote:
> This was an accidental "ABI" change introduced during PPGTT:
> 
> commit 0eea67eb26000657079b7fc41079097942339452
> Author: Ben Widawsky <ben@bwidawsk.net>
> 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.
> 
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>

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.)

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

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

end of thread, other threads:[~2013-12-30 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-25  0:02 [PATCH] drm/i915/bdw: Return -ENONENT on default ctx destroy Ben Widawsky
2013-12-30 13:09 ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox