* [PATCH 1/1] tests/gem_ctx_exec: fix destroy ioctl number
@ 2013-02-04 13:13 Mika Kuoppala
2013-02-04 16:27 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Mika Kuoppala @ 2013-02-04 13:13 UTC (permalink / raw)
To: intel-gfx
Destroy was never called properly
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
tests/gem_ctx_exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/gem_ctx_exec.c b/tests/gem_ctx_exec.c
index 423f1ee..0288fe8 100644
--- a/tests/gem_ctx_exec.c
+++ b/tests/gem_ctx_exec.c
@@ -57,7 +57,7 @@ struct local_drm_i915_gem_context_destroy {
};
#define CONTEXT_CREATE_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x2d, struct local_drm_i915_gem_context_create)
-#define CONTEXT_DESTROY_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x23, struct local_drm_i915_gem_context_destroy)
+#define CONTEXT_DESTROY_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x2e, struct local_drm_i915_gem_context_destroy)
static uint32_t context_create(int fd)
{
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] tests/gem_ctx_exec: fix destroy ioctl number
2013-02-04 13:13 [PATCH 1/1] tests/gem_ctx_exec: fix destroy ioctl number Mika Kuoppala
@ 2013-02-04 16:27 ` Daniel Vetter
2013-02-05 10:26 ` [PATCH] tests/gem_ctx_exec: properly test destroy_ctx ioctl Mika Kuoppala
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2013-02-04 16:27 UTC (permalink / raw)
To: Mika Kuoppala; +Cc: intel-gfx
On Mon, Feb 04, 2013 at 03:13:30PM +0200, Mika Kuoppala wrote:
> Destroy was never called properly
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Oops, that's a bit a goof-up, nice catch. While at it, can you please
augment the test to check whether a destroyed context doesn't work any
more for batchbuffers? It looks like gem_ctx_exec.c should be easy to
extend with this.
-Daniel
> ---
> tests/gem_ctx_exec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/gem_ctx_exec.c b/tests/gem_ctx_exec.c
> index 423f1ee..0288fe8 100644
> --- a/tests/gem_ctx_exec.c
> +++ b/tests/gem_ctx_exec.c
> @@ -57,7 +57,7 @@ struct local_drm_i915_gem_context_destroy {
> };
>
> #define CONTEXT_CREATE_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x2d, struct local_drm_i915_gem_context_create)
> -#define CONTEXT_DESTROY_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x23, struct local_drm_i915_gem_context_destroy)
> +#define CONTEXT_DESTROY_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x2e, struct local_drm_i915_gem_context_destroy)
>
> static uint32_t context_create(int fd)
> {
> --
> 1.7.9.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] tests/gem_ctx_exec: properly test destroy_ctx ioctl
2013-02-04 16:27 ` Daniel Vetter
@ 2013-02-05 10:26 ` Mika Kuoppala
2013-02-05 11:06 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Mika Kuoppala @ 2013-02-05 10:26 UTC (permalink / raw)
To: intel-gfx
Call context destroy with proper ioctl number and
add test to verify that we can't post batchbuffers
with destroyed context.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
tests/gem_ctx_exec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/gem_ctx_exec.c b/tests/gem_ctx_exec.c
index 423f1ee..b0362cc 100644
--- a/tests/gem_ctx_exec.c
+++ b/tests/gem_ctx_exec.c
@@ -57,7 +57,7 @@ struct local_drm_i915_gem_context_destroy {
};
#define CONTEXT_CREATE_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x2d, struct local_drm_i915_gem_context_create)
-#define CONTEXT_DESTROY_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x23, struct local_drm_i915_gem_context_destroy)
+#define CONTEXT_DESTROY_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x2e, struct local_drm_i915_gem_context_destroy)
static uint32_t context_create(int fd)
{
@@ -135,5 +135,7 @@ int main(int argc, char *argv[])
assert(exec(fd, handle, I915_EXEC_RENDER, ctx_id) == 0);
context_destroy(fd, ctx_id);
+ assert(exec(fd, handle, I915_EXEC_RENDER, ctx_id) < 0);
+
exit(EXIT_SUCCESS);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/gem_ctx_exec: properly test destroy_ctx ioctl
2013-02-05 10:26 ` [PATCH] tests/gem_ctx_exec: properly test destroy_ctx ioctl Mika Kuoppala
@ 2013-02-05 11:06 ` Daniel Vetter
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-02-05 11:06 UTC (permalink / raw)
To: Mika Kuoppala; +Cc: intel-gfx
On Tue, Feb 05, 2013 at 12:26:49PM +0200, Mika Kuoppala wrote:
> Call context destroy with proper ioctl number and
> add test to verify that we can't post batchbuffers
> with destroyed context.
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Merged, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-05 11:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-04 13:13 [PATCH 1/1] tests/gem_ctx_exec: fix destroy ioctl number Mika Kuoppala
2013-02-04 16:27 ` Daniel Vetter
2013-02-05 10:26 ` [PATCH] tests/gem_ctx_exec: properly test destroy_ctx ioctl Mika Kuoppala
2013-02-05 11:06 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox