From 4db16a9480af2c4f36eb8023193cd54545efbe54 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 11 Oct 2011 15:59:03 -0700 Subject: intel: Add .aub file output support. This will allow the driver to capture all of its execution state to a file for later debugging. intel_gpu_dump is limited in that it only captures batchbuffers, and Mesa's captures, while more complete, still capture only a portion of the state involved in execution. This is a squash commit of a long series of hacking as we tried to get the resulting traces to work in the internal simulator. It contains contributions by Yuanhan Liu and Kenneth Graunke. v2: Drop the MI_FLUSH_ENABLE setup. Reviewed-by: Kenneth Graunke Signed-off-by: Eric Anholt Signed-off-by: Yuanhan Liu Signed-off-by: Kenneth Graunke --- intel/intel_bufmgr.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'intel/intel_bufmgr.h') diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h index 8036031c..fa6f2b8e 100644 --- a/intel/intel_bufmgr.h +++ b/intel/intel_bufmgr.h @@ -36,6 +36,7 @@ #include #include +#include struct drm_clip_rect; @@ -84,6 +85,13 @@ struct _drm_intel_bo { int handle; }; +enum aub_dump_bmp_format { + AUB_DUMP_BMP_FORMAT_8BIT = 1, + AUB_DUMP_BMP_FORMAT_ARGB_4444 = 4, + AUB_DUMP_BMP_FORMAT_ARGB_0888 = 6, + AUB_DUMP_BMP_FORMAT_ARGB_8888 = 7, +}; + #define BO_ALLOC_FOR_RENDER (1<<0) drm_intel_bo *drm_intel_bo_alloc(drm_intel_bufmgr *bufmgr, const char *name, @@ -154,6 +162,12 @@ int drm_intel_gem_bo_get_reloc_count(drm_intel_bo *bo); void drm_intel_gem_bo_clear_relocs(drm_intel_bo *bo, int start); void drm_intel_gem_bo_start_gtt_access(drm_intel_bo *bo, int write_enable); +void drm_intel_bufmgr_gem_set_aub_dump(drm_intel_bufmgr *bufmgr, int enable); +void drm_intel_gem_bo_aub_dump_bmp(drm_intel_bo *bo, + int x1, int y1, int width, int height, + enum aub_dump_bmp_format format, + int pitch, int offset); + int drm_intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, int crtc_id); int drm_intel_get_aperture_sizes(int fd, size_t *mappable, size_t *total); -- cgit v1.2.3