[Libva] [PATCH] Add new debug option for aub dump

Zhao, Yakui yakui.zhao at intel.com
Thu Dec 25 19:42:33 PST 2014


On Wed, 2014-12-24 at 22:38 -0700, Zhenyu Wang wrote:
> New VA debug option to dump aub file.
> 

LGTM.

> Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>

Add: Reviewed-by: Zhao Yakui <yakui.zhao at intel.com>
> ---
>  src/intel_driver.h | 1 +
>  src/intel_memman.c | 6 ++++++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/src/intel_driver.h b/src/intel_driver.h
> index 432a0d9..8745b9c 100644
> --- a/src/intel_driver.h
> +++ b/src/intel_driver.h
> @@ -79,6 +79,7 @@ struct intel_batchbuffer;
>  extern uint32_t g_intel_debug_option_flags;
>  #define VA_INTEL_DEBUG_OPTION_ASSERT    (1 << 0)
>  #define VA_INTEL_DEBUG_OPTION_BENCH     (1 << 1)
> +#define VA_INTEL_DEBUG_OPTION_DUMP_AUB  (1 << 2)
>  
>  #define ASSERT_RET(value, fail_ret) do {    \
>          if (!(value)) {                     \
> diff --git a/src/intel_memman.c b/src/intel_memman.c
> index 7d56e96..03ed216 100644
> --- a/src/intel_memman.c
> +++ b/src/intel_memman.c
> @@ -38,6 +38,12 @@ intel_memman_init(struct intel_driver_data *intel)
>      assert(intel->bufmgr);
>      intel_bufmgr_gem_enable_reuse(intel->bufmgr);
>  
> +    if (g_intel_debug_option_flags & VA_INTEL_DEBUG_OPTION_DUMP_AUB) {
> +	drm_intel_bufmgr_gem_set_aub_filename(intel->bufmgr,
> +					      "va.aub");
> +	drm_intel_bufmgr_gem_set_aub_dump(intel->bufmgr, 1);
> +    }
> +
>      return True;
>  }
>  




More information about the Libva mailing list