intel-gpu-tools Reference Manual: GEM Tests

## GEM Tests GEM Tests — Tests for core drm ioctls and behaviour. |

## Programs

gem_bad_length |
gem_bad_reloc |
gem_basic |
gem_caching |
gem_close_race |
gem_concurrent_blit |
gem_cpu_reloc |
gem_cs_prefetch |
gem_cs_tlb |
gem_ctx_bad_destroy |
gem_ctx_bad_exec |
gem_ctx_basic |
gem_ctx_create |
gem_ctx_exec |
gem_double_irq_loop |
gem_dummy_reloc_loop |
gem_evict_alignment |
gem_evict_everything |
gem_exec_bad_domains |
gem_exec_big |
gem_exec_blt |
gem_exec_faulting_reloc |
gem_exec_lut_handle |
gem_exec_nop |
gem_exec_params |
gem_exec_parse |
gem_fd_exhaustion |
gem_fenced_exec_thrash |
gem_fence_thrash |
gem_fence_upload |
gem_flink |
gem_flink_race |
gem_gpgpu_fill |
gem_gtt_cpu_tlb |
gem_gtt_hog |
gem_gtt_speed |
gem_hangcheck_forcewake |
gem_largeobject |
gem_linear_blits |
gem_lut_handle |
gem_madvise |
gem_media_fill |
gem_mmap |
gem_mmap_gtt |
gem_mmap_offset_exhaustion |
gem_multi_bsd_sync_loop |
gem_partial_pwrite_pread |
gem_persistent_relocs |
gem_pin |
gem_pipe_control_store_loop |
gem_ppgtt |
gem_pread |
gem_pread_after_blit |
gem_pwrite |
gem_pwrite_pread |
gem_readwrite |
gem_reg_read |
gem_reloc_overflow |
gem_reloc_vs_gpu |
gem_render_copy |
gem_render_copy_redux |
gem_render_linear_blits |
gem_render_tiled_blits |
gem_reset_stats |
gem_ringfill |
gem_ring_sync_copy |
gem_ring_sync_loop |
gem_seqno_wrap |
gem_set_tiling_vs_blt |
gem_set_tiling_vs_gtt |
gem_set_tiling_vs_pwrite |
gem_storedw_batches_loop |
gem_storedw_loop_blt |
gem_storedw_loop_bsd |
gem_storedw_loop_render |
gem_storedw_loop_vebox |
gem_threaded_access_tiled |
gem_tiled_blits |
gem_tiled_fence_blits |
gem_tiled_partial_pwrite_pread |
gem_tiled_pread |
gem_tiled_pread_pwrite |
gem_tiled_swapping |
gem_tiled_wb |
gem_tiling_max_stride |
gem_unfence_active_buffers |
gem_unref_active_buffers |
gem_userptr_blits |
gem_wait |
gem_workarounds |
gem_write_read_ring_switch |

## Description

### gem_bad_length

Test minimal bo_create and batchbuffer exec.

### gem_bad_reloc

Simulates SNA behaviour using negative self-relocations for STATE_BASE_ADDRESS command packets.

#### Subtests

negative-reloc
negative-reloc-lut
negative-reloc-blt

### gem_basic

#### Subtests

bad-close
create-close
create-fd-close

### gem_caching

Test snoop consistency when touching partial cachelines.

#### Subtests

reads
writes
read-writes

### gem_close_race

#### Subtests

process-exit
gem-close-race

### gem_concurrent_blit

Test of pread/pwrite behavior when writing to active buffers.

#### Subtests

prw-bcs-overwrite-source
prw-bcs-early-read
prw-bcs-gpu-read-after-write
prw-rcs-overwrite-source
prw-rcs-early-read
prw-rcs-gpu-read-after-write
prw-bcs-overwrite-source-interruptible
prw-bcs-early-read-interruptible
prw-bcs-gpu-read-after-write-interruptible
prw-rcs-overwrite-source-interruptible
prw-rcs-early-read-interruptible
prw-rcs-gpu-read-after-write-interruptible
prw-bcs-overwrite-source-forked
prw-bcs-early-read-forked
prw-bcs-gpu-read-after-write-forked
prw-rcs-overwrite-source-forked
prw-rcs-early-read-forked
prw-rcs-gpu-read-after-write-forked
cpu-bcs-overwrite-source
cpu-bcs-early-read
cpu-bcs-gpu-read-after-write
cpu-rcs-overwrite-source
cpu-rcs-early-read
cpu-rcs-gpu-read-after-write
cpu-bcs-overwrite-source-interruptible
cpu-bcs-early-read-interruptible
cpu-bcs-gpu-read-after-write-interruptible
cpu-rcs-overwrite-source-interruptible
cpu-rcs-early-read-interruptible
cpu-rcs-gpu-read-after-write-interruptible
cpu-bcs-overwrite-source-forked
cpu-bcs-early-read-forked
cpu-bcs-gpu-read-after-write-forked
cpu-rcs-overwrite-source-forked
cpu-rcs-early-read-forked
cpu-rcs-gpu-read-after-write-forked
gtt-bcs-overwrite-source
gtt-bcs-early-read
gtt-bcs-gpu-read-after-write
gtt-rcs-overwrite-source
gtt-rcs-early-read
gtt-rcs-gpu-read-after-write
gtt-bcs-overwrite-source-interruptible
gtt-bcs-early-read-interruptible
gtt-bcs-gpu-read-after-write-interruptible
gtt-rcs-overwrite-source-interruptible
gtt-rcs-early-read-interruptible
gtt-rcs-gpu-read-after-write-interruptible
gtt-bcs-overwrite-source-forked
gtt-bcs-early-read-forked
gtt-bcs-gpu-read-after-write-forked
gtt-rcs-overwrite-source-forked
gtt-rcs-early-read-forked
gtt-rcs-gpu-read-after-write-forked
gttX-bcs-overwrite-source
gttX-bcs-early-read
gttX-bcs-gpu-read-after-write
gttX-rcs-overwrite-source
gttX-rcs-early-read
gttX-rcs-gpu-read-after-write
gttX-bcs-overwrite-source-interruptible
gttX-bcs-early-read-interruptible
gttX-bcs-gpu-read-after-write-interruptible
gttX-rcs-overwrite-source-interruptible
gttX-rcs-early-read-interruptible
gttX-rcs-gpu-read-after-write-interruptible
gttX-bcs-overwrite-source-forked
gttX-bcs-early-read-forked
gttX-bcs-gpu-read-after-write-forked
gttX-rcs-overwrite-source-forked
gttX-rcs-early-read-forked
gttX-rcs-gpu-read-after-write-forked
gpu-bcs-overwrite-source
gpu-bcs-early-read
gpu-bcs-gpu-read-after-write
gpu-rcs-overwrite-source
gpu-rcs-early-read
gpu-rcs-gpu-read-after-write
gpu-bcs-overwrite-source-interruptible
gpu-bcs-early-read-interruptible
gpu-bcs-gpu-read-after-write-interruptible
gpu-rcs-overwrite-source-interruptible
gpu-rcs-early-read-interruptible
gpu-rcs-gpu-read-after-write-interruptible
gpu-bcs-overwrite-source-forked
gpu-bcs-early-read-forked
gpu-bcs-gpu-read-after-write-forked
gpu-rcs-overwrite-source-forked
gpu-rcs-early-read-forked
gpu-rcs-gpu-read-after-write-forked
gpuX-bcs-overwrite-source
gpuX-bcs-early-read
gpuX-bcs-gpu-read-after-write
gpuX-rcs-overwrite-source
gpuX-rcs-early-read
gpuX-rcs-gpu-read-after-write
gpuX-bcs-overwrite-source-interruptible
gpuX-bcs-early-read-interruptible
gpuX-bcs-gpu-read-after-write-interruptible
gpuX-rcs-overwrite-source-interruptible
gpuX-rcs-early-read-interruptible
gpuX-rcs-gpu-read-after-write-interruptible
gpuX-bcs-overwrite-source-forked
gpuX-bcs-early-read-forked
gpuX-bcs-gpu-read-after-write-forked
gpuX-rcs-overwrite-source-forked
gpuX-rcs-early-read-forked
gpuX-rcs-gpu-read-after-write-forked

### gem_cpu_reloc

Test the relocations through the CPU domain.

### gem_cs_prefetch

Test the CS prefetch behaviour on batches.

### gem_cs_tlb

Check whether we correctly invalidate the cs tlb.

#### Subtests

render
bsd
blt
vebox

### gem_ctx_bad_destroy

Negative test cases for destroy contexts.

### gem_ctx_bad_exec

Test that context cannot be submitted to unsupported rings.

#### Subtests

render
bsd
blt
vebox

### gem_ctx_basic

Basic test for memory and refcount leaks.

### gem_ctx_create

### gem_ctx_exec

Test basic context switch functionality.

#### Subtests

basic
eviction
reset-pin-leak

### gem_double_irq_loop

Basic check for missed IRQs on blt ring.

### gem_dummy_reloc_loop

Check ring<->cpu sync using a dummy reloc.

#### Subtests

render
bsd
blt
vebox
mixed
mixed_multi_fd

### gem_evict_alignment

Run a couple of big batches to force the unbind on misalignment code.

#### Subtests

minor-normal
major-normal
minor-interruptible
major-interruptible

### gem_evict_everything

Run a couple of big batches to force the eviction code.

#### Subtests

forked-normal
forked-interruptible
forked-swapping-normal
forked-swapping-interruptible
forked-multifd-normal
forked-multifd-interruptible
forked-swapping-multifd-normal
forked-swapping-multifd-interruptible
forked-mempressure-normal
forked-mempressure-interruptible
forked-swapping-mempressure-normal
forked-swapping-mempressure-interruptible
forked-multifd-mempressure-normal
forked-multifd-mempressure-interruptible
forked-swapping-multifd-mempressure-normal
forked-swapping-multifd-mempressure-interruptible
swapping-normal
minor-normal
major-normal
swapping-interruptible
minor-interruptible
major-interruptible

### gem_exec_bad_domains

Test whether the kernel rejects relocations with non-gpu domains.

#### Subtests

cpu-domain
gtt-domain
conflicting-write-domain
double-write-domain
invalid-gpu-domain

### gem_exec_big

Run a large nop batch to stress test the error capture code.

### gem_exec_blt

### gem_exec_faulting_reloc

Submit patches with relocations in memory that will fault.

#### Subtests

normal
no-prefault

### gem_exec_lut_handle

Exercises the basic execbuffer using the handle LUT interface.

### gem_exec_nop

#### Subtests

render
bsd
blt
vebox

### gem_exec_params

#### Subtests

control
no-bsd
no-blt
no-vebox
invalid-ring
invalid-ring2
rel-constants-invalid-ring
rel-constants-invalid-rel-gen5
rel-constants-invalid
sol-reset-invalid
sol-reset-not-gen7
secure-non-root
secure-non-master
invalid-flag
cliprects-invalid
rsvd2-dirt
cliprects_ptr-dirt
DR1-dirt
DR4-dirt

### gem_exec_parse

#### Subtests

basic-allowed
basic-rejected
registers
bitmasks
batch-without-end
cmd-crossing-page
oacontrol-tracking
chained-batch

### gem_fd_exhaustion

### gem_fenced_exec_thrash

Test execbuf fence accounting.

#### Subtests

2-spare-fences
no-spare-fences
no-spare-fences-busy
no-spare-fences-interruptible
no-spare-fences-busy-interruptible
too-many-fences

### gem_fence_thrash

#### Subtests

bo-write-verify-none
bo-write-verify-x
bo-write-verify-y
bo-write-verify-threaded-none
bo-write-verify-threaded-x
bo-write-verify-threaded-y
bo-copy

### gem_fence_upload

#### Subtests

performance
thread-contention
thread-performance-read
thread-performance-write
thread-performance-both

### gem_flink

#### Subtests

basic
double-flink
bad-flink
bad-open
flink-lifetime

### gem_flink_race

Check for flink/open vs. gem close races.

#### Subtests

flink_name
flink_close

### gem_gpgpu_fill

### gem_gtt_cpu_tlb

Check whether gtt tlbs for cpu access are correctly invalidated.

### gem_gtt_hog

### gem_gtt_speed

### gem_hangcheck_forcewake

Provoke the hangcheck timer on an otherwise idle system.

### gem_largeobject

### gem_linear_blits

Test doing many blits with a working set larger than the aperture size.

#### Subtests

basic
normal
interruptible

### gem_lut_handle

Exercises the basic execbuffer using the handle LUT interface.

### gem_madvise

Checks that the kernel reports EFAULT when trying to use purged bo.

#### Subtests

dontneed-before-mmap
dontneed-after-mmap
dontneed-before-pwrite
dontneed-before-exec

### gem_media_fill

Basic test for the media_fill() function, a very simple workload for the Media pipeline.

### gem_mmap

#### Subtests

bad-object
new-object
short-mmap

### gem_mmap_gtt

#### Subtests

access
short
copy
read
write
write-gtt
read-write
write-read
read-write-distinct
write-read-distinct
fault-concurrent
read-no-prefault
write-no-prefault
write-gtt-no-prefault
write-cpu-read-gtt

### gem_mmap_offset_exhaustion

Checks whether the kernel handles mmap offset exhaustion correctly.

### gem_multi_bsd_sync_loop

Basic check of ring<->ring sync using a dummy reloc.

### gem_partial_pwrite_pread

Test pwrite/pread consistency when touching partial cachelines.

#### Subtests

reads
write
writes-after-reads
reads-uncached
write-uncached
writes-after-reads-uncached
reads-snoop
write-snoop
writes-after-reads-snoop
reads-display
write-display
writes-after-reads-display

### gem_persistent_relocs

Test persistent relocations as used by uxa/libva.

#### Subtests

normal
interruptible
forked
forked-interruptible
forked-faulting-reloc
forked-interruptible-faulting-reloc
forked-thrashing
forked-interruptible-thrashing
forked-faulting-reloc-thrashing
forked-interruptible-faulting-reloc-thrashing
forked-thrash-inactive
forked-interruptible-thrash-inactive
forked-faulting-reloc-thrash-inactive
forked-interruptible-faulting-reloc-thrash-inactive

### gem_pin

Exercises pinning of small buffer objects.

### gem_pipe_control_store_loop

Test (TLB-)Coherency of pipe_control QW writes.

#### Subtests

fresh-buffer
reused-buffer

### gem_ppgtt

#### Subtests

bcs-vs-rcs-ctx0
bcs-vs-rcs-ctxN

### gem_pread

#### Subtests

normal
uncached
snoop
display

### gem_pread_after_blit

Test pread behavior when getting values out of just-drawn-to buffers.

#### Subtests

normal
interruptible
normal-uncached
interruptible-uncached
normal-snoop
interruptible-snoop
normal-display
interruptible-display

### gem_pwrite

#### Subtests

normal
uncached
snoop
display

### gem_pwrite_pread

#### Subtests

uncached-copy-correctness
uncached-copy-performance
uncached-pwrite-blt-gtt_mmap-correctness
uncached-pwrite-blt-gtt_mmap-performance
snooped-copy-correctness
snooped-copy-performance
snooped-pwrite-blt-cpu_mmap-correctness
snooped-pwrite-blt-cpu_mmap-performance
display-copy-correctness
display-copy-performance
display-pwrite-blt-gtt_mmap-correctness
display-pwrite-blt-gtt_mmap-performance

### gem_readwrite

#### Subtests

new-obj
beyond-EOB
read-write
read-bad-handle
write-bad-handle

### gem_reg_read

### gem_reloc_overflow

Check that kernel relocation overflows are caught.

#### Subtests

invalid-address
single-overflow
batch-start-unaligned
batch-end-unaligned
wrapped-overflow
source-offset-page-stradle-gen8-reloc-cpu
source-offset-end-gen8-reloc-cpu
source-offset-overflow-gen8-reloc-cpu
source-offset-end-reloc-cpu
source-offset-big-reloc-cpu
source-offset-negative-reloc-cpu
source-offset-unaligned-reloc-cpu
source-offset-page-stradle-gen8-reloc-gtt
source-offset-end-gen8-reloc-gtt
source-offset-overflow-gen8-reloc-gtt
source-offset-end-reloc-gtt
source-offset-big-reloc-gtt
source-offset-negative-reloc-gtt
source-offset-unaligned-reloc-gtt
buffercount-overflow

### gem_reloc_vs_gpu

Test kernel relocations vs. gpu races.

#### Subtests

normal
faulting-reloc
interruptible
faulting-reloc-interruptible
forked
forked-interruptible
forked-faulting-reloc
forked-interruptible-faulting-reloc
forked-thrashing
forked-interruptible-thrashing
forked-faulting-reloc-thrashing
forked-interruptible-faulting-reloc-thrashing
forked-thrash-inactive
forked-interruptible-thrash-inactive
forked-faulting-reloc-thrash-inactive
forked-interruptible-faulting-reloc-thrash-inactive

### gem_render_copy

Basic test for the render_copy() function.

### gem_render_copy_redux

Advanced test for the render_copy() function.

#### Subtests

normal
interruptible
flink
flink-interruptible

### gem_render_linear_blits

### gem_render_tiled_blits

### gem_reset_stats

#### Subtests

params
params-ctx-render
reset-stats-render
reset-stats-ctx-render
ban-render
ban-ctx-render
reset-count-render
reset-count-ctx-render
unrelated-ctx-render
close-pending-render
close-pending-ctx-render
close-pending-fork-render
close-pending-fork-reverse-render
defer-hangcheck-render
params-ctx-blt
reset-stats-blt
reset-stats-ctx-blt
ban-blt
ban-ctx-blt
reset-count-blt
reset-count-ctx-blt
unrelated-ctx-blt
close-pending-blt
close-pending-ctx-blt
close-pending-fork-blt
close-pending-fork-reverse-blt
defer-hangcheck-blt
params-ctx-bsd
reset-stats-bsd
reset-stats-ctx-bsd
ban-bsd
ban-ctx-bsd
reset-count-bsd
reset-count-ctx-bsd
unrelated-ctx-bsd
close-pending-bsd
close-pending-ctx-bsd
close-pending-fork-bsd
close-pending-fork-reverse-bsd
defer-hangcheck-bsd
params-ctx-vebox
reset-stats-vebox
reset-stats-ctx-vebox
ban-vebox
ban-ctx-vebox
reset-count-vebox
reset-count-ctx-vebox
unrelated-ctx-vebox
close-pending-vebox
close-pending-ctx-vebox
close-pending-fork-vebox
close-pending-fork-reverse-vebox
defer-hangcheck-vebox

### gem_ringfill

#### Subtests

blitter
render
blitter-interruptible
render-interruptible

### gem_ring_sync_copy

Ensure inter-ring dependencies are respected.

#### Subtests

sync-render-blitter-write-read
sync-render-blitter-read-write
sync-render-blitter-write-write
sync-blitter-render-write-read
sync-blitter-render-read-write
sync-blitter-render-write-write

### gem_ring_sync_loop

Basic check of ring<->ring sync using a dummy reloc.

### gem_seqno_wrap

Runs blitcopy -> rendercopy with multiple buffers over wrap boundary.

### gem_set_tiling_vs_blt

Check for proper synchronization of tiling changes vs. tiled gpu access.

#### Subtests

untiled-to-tiled
tiled-to-untiled
tiled-to-tiled

### gem_set_tiling_vs_gtt

Check set_tiling vs gtt mmap coherency.

### gem_set_tiling_vs_pwrite

Check set_tiling vs pwrite coherency.

### gem_storedw_batches_loop

#### Subtests

normal
secure-dispatch

### gem_storedw_loop_blt

Basic blitter MI check using MI_STORE_DATA_IMM.

### gem_storedw_loop_bsd

Basic bsd MI check using MI_STORE_DATA_IMM.

### gem_storedw_loop_render

Basic render MI check using MI_STORE_DATA_IMM.

### gem_storedw_loop_vebox

Basic vebox MI check using MI_STORE_DATA_IMM.

### gem_threaded_access_tiled

Check parallel access to tiled memory.

### gem_tiled_blits

Test doing many tiled blits, with a working set larger than the aperture size.

#### Subtests

basic
normal
interruptible

### gem_tiled_fence_blits

### gem_tiled_partial_pwrite_pread

Test pwrite/pread consistency when touching partial cachelines.

#### Subtests

reads
writes
writes-after-reads

### gem_tiled_pread

Test pread behavior on tiled objects with respect to the reported swizzling value.

### gem_tiled_pread_pwrite

Test swizzling by testing pwrite does the inverse of pread.

### gem_tiled_swapping

Exercise swizzle code for swapping.

#### Subtests

non-threaded
threaded

### gem_tiled_wb

This is a test of write-combining mmap's behavior on tiled objects with respect to the reported swizzling value.

### gem_tiling_max_stride

Check that max fence stride works.

### gem_unfence_active_buffers

Check for use-after-free in the fence stealing code.

### gem_unref_active_buffers

Test unreferencing of active buffers.

### gem_userptr_blits

#### Subtests

input-checking
usage-restrictions
invalid-null-pointer
invalid-gtt-mapping
forked-access
forbidden-operations
create-destroy-unsync
unsync-overlap
unsync-unmap
unsync-unmap-cycles
unsync-unmap-after-close
coherency-unsync
dmabuf-unsync
forked-unsync-normal
forked-unsync-interruptible
forked-unsync-swapping-normal
forked-unsync-swapping-interruptible
forked-unsync-multifd-normal
forked-unsync-multifd-interruptible
forked-unsync-swapping-multifd-normal
forked-unsync-swapping-multifd-interruptible
forked-unsync-mempressure-normal
forked-unsync-mempressure-interruptible
forked-unsync-swapping-mempressure-normal
forked-unsync-swapping-mempressure-interruptible
forked-unsync-multifd-mempressure-normal
forked-unsync-multifd-mempressure-interruptible
forked-unsync-swapping-multifd-mempressure-normal
forked-unsync-swapping-multifd-mempressure-interruptible
swapping-unsync-normal
minor-unsync-normal
major-unsync-normal
swapping-unsync-interruptible
minor-unsync-interruptible
major-unsync-interruptible
process-exit
process-exit-gtt
process-exit-busy
process-exit-gtt-busy
create-destroy-sync
sync-overlap
sync-unmap
sync-unmap-cycles
sync-unmap-after-close
stress-mm
coherency-sync
dmabuf-sync
forked-sync-normal
forked-sync-interruptible
forked-sync-swapping-normal
forked-sync-swapping-interruptible
forked-sync-multifd-normal
forked-sync-multifd-interruptible
forked-sync-swapping-multifd-normal
forked-sync-swapping-multifd-interruptible
forked-sync-mempressure-normal
forked-sync-mempressure-interruptible
forked-sync-swapping-mempressure-normal
forked-sync-swapping-mempressure-interruptible
forked-sync-multifd-mempressure-normal
forked-sync-multifd-mempressure-interruptible
forked-sync-swapping-multifd-mempressure-normal
forked-sync-swapping-multifd-mempressure-interruptible
swapping-normal-sync
minor-normal-sync
major-normal-sync
swapping-sync-interruptible
minor-sync-interruptible
major-sync-interruptible
access-control

### gem_wait

#### Subtests

render_timeout
invalid-flags
invalid-buf

### gem_workarounds

#### Subtests

read
reset
suspend-resume

### gem_write_read_ring_switch

Check read/write syncpoints when switching rings.

#### Subtests

blt2render
blt2bsd
blt2vebox
blt2render-interruptible
blt2bsd-interruptible
blt2vebox-interruptible