tests/gem_wait_rendering_timeout: some fixes for the blt function

- widht/height are in pixel, and the cmd uses 32bit, so we need to
  adjust this.
- we write to the buffer, set the right reloc domain.
This commit is contained in:
Daniel Vetter 2012-05-29 16:34:32 +02:00
parent 25bf5574a2
commit cf979c2063

View File

@ -84,7 +84,7 @@ static void blt_color_fill(struct intel_batchbuffer *batch,
drm_intel_bo *buf,
const unsigned int pages)
{
const unsigned short height = pages;
const unsigned short height = pages/4;
const unsigned short width = 4096;
BEGIN_BATCH(5);
OUT_BATCH(COLOR_BLT_CMD |
@ -95,7 +95,7 @@ static void blt_color_fill(struct intel_batchbuffer *batch,
0); /* Dest pitch is 0 */
OUT_BATCH(width << 16 |
height);
OUT_RELOC(buf, I915_GEM_DOMAIN_RENDER, 0, 0);
OUT_RELOC(buf, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0);
OUT_BATCH(rand()); /* random pattern */
ADVANCE_BATCH();
}