mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 09:26:10 +00:00
tests/gem_reloc_vs_gpu: fixup this mess
- fixup pitch mess noticed by Chris Wilson. - we need to diable bo reuse otherwise the kernel won't do the relocs (we might get an already gtt-bound batch from the dummy load). Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
b9629f2d8d
commit
09cba27fdc
@ -56,7 +56,6 @@ drm_intel_bo *dummy_bo;
|
||||
drm_intel_bo *special_bo;
|
||||
uint32_t devid;
|
||||
int fd;
|
||||
unsigned pitch;
|
||||
int special_reloc_ofs;
|
||||
int special_batch_len;
|
||||
|
||||
@ -103,7 +102,7 @@ static void create_special_bo(void)
|
||||
special_batch_len = len*4;
|
||||
}
|
||||
|
||||
static void emit_dummy_load(void)
|
||||
static void emit_dummy_load(int pitch)
|
||||
{
|
||||
int i;
|
||||
uint32_t tile_flags = 0;
|
||||
@ -155,7 +154,8 @@ int main(int argc, char **argv)
|
||||
fd = drm_open_any();
|
||||
|
||||
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
|
||||
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
|
||||
/* disable reuse, otherwise the test fails */
|
||||
//drm_intel_bufmgr_gem_enable_reuse(bufmgr);
|
||||
devid = intel_get_drm_devid(fd);
|
||||
batch = intel_batchbuffer_alloc(bufmgr, devid);
|
||||
|
||||
@ -174,7 +174,8 @@ int main(int argc, char **argv)
|
||||
|
||||
for (i = 0; i < NUM_TARGET_BOS; i++) {
|
||||
pc_target_bo[i] = drm_intel_bo_alloc(bufmgr, "special batch", 4096, 4096);
|
||||
emit_dummy_load();
|
||||
emit_dummy_load(pitch);
|
||||
assert(pc_target_bo[i]->offset == 0);
|
||||
drm_intel_bo_emit_reloc(special_bo, special_reloc_ofs,
|
||||
pc_target_bo[i],
|
||||
0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user