igt/intel_aubdump: Use the right ring

Submitted by Ben Widawsky on Nov. 6, 2015, 12:56 a.m.

Details

Message ID 1446771371-15825-1-git-send-email-benjamin.widawsky@intel.com
State Accepted
Commit 134e32378a242e846a6e553ad80317a4a56b13b9
Headers show
Series "igt/intel_aubdump: Use the right ring" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Ben Widawsky Nov. 6, 2015, 12:56 a.m.
This prevents the simulator from barfing when it sees commands from another
ring. I've been using this locally for a very long time.

Cc: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
---
 tools/aubdump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/tools/aubdump.c b/tools/aubdump.c
index a17dc10..d9ee791 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -315,7 +315,7 @@  dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2)
 {
 	struct drm_i915_gem_exec_object2 *exec_objects =
 		(struct drm_i915_gem_exec_object2 *) (uintptr_t) execbuffer2->buffers_ptr;
-	uint32_t ring_flag = 0;
+	uint32_t ring_flag = execbuffer2->flags & I915_EXEC_RING_MASK;
 	uint32_t offset = gtt_size;
 	struct drm_i915_gem_exec_object2 *obj;
 	struct bo *bo, *batch_bo;

Comments

On Thu, Nov 5, 2015 at 4:56 PM, Ben Widawsky
<benjamin.widawsky@intel.com> wrote:
> This prevents the simulator from barfing when it sees commands from another
> ring. I've been using this locally for a very long time.

Yea, that looks good, thanks Ben.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>

> Cc: Kristian Høgsberg <krh@bitplanet.net>
> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
> ---
>  tools/aubdump.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/aubdump.c b/tools/aubdump.c
> index a17dc10..d9ee791 100644
> --- a/tools/aubdump.c
> +++ b/tools/aubdump.c
> @@ -315,7 +315,7 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2)
>  {
>         struct drm_i915_gem_exec_object2 *exec_objects =
>                 (struct drm_i915_gem_exec_object2 *) (uintptr_t) execbuffer2->buffers_ptr;
> -       uint32_t ring_flag = 0;
> +       uint32_t ring_flag = execbuffer2->flags & I915_EXEC_RING_MASK;
>         uint32_t offset = gtt_size;
>         struct drm_i915_gem_exec_object2 *obj;
>         struct bo *bo, *batch_bo;
> --
> 2.6.2
>