summaryrefslogtreecommitdiff
path: root/lib/media_spin.c
AgeCommit message (Collapse)Author
2018-07-05lib: Constify igt_bufVille Syrjälä
No one generally needs to modify the igt_bufs we pass around, so make them const. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-05-15lib: Rename library from gpu_fill to gpu_cmdsKatarzyna Dec
After refactoring media_spin library - gpu_fill contains helper functions for render copy, *_fill functions and media_spin. Let's rename this library to gpu_cmds. This name will be more general. v2: changed name from gpu_helpers to gpu_cmds Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
2018-05-15lib/gpu_fill: Further code unification in gpu_fillKatarzyna Dec
We can unify gen7_emit_vfe_state and gen8_emit_vfe_state functions for gpgpu/media_fill and media_spin by adding parameters. gen8_emit_media_object was renamed to gen_* and extended with additional offset parameters - we can have one gen7_emit_media_objects for all tests. I have renamed gen8_emit_media_object to gen_emit_*, because function belongs to all gens and it would be odd to have all named genX_* and only one without this prefix. v2: Use #defines instead of variables as emit_vfe_state parameters. Fixed gen7_emit_media_objects. Unified vfe state parameters in media_spin library for gen8 and gen9 (gen9 had different values by mistake). v3: Fixed bug in emit_vfe_state for gen8 and gen9 in gpgpu_fill. Moved #defines for emit_vfe_state to particular libraries. v4: Fixed indentations in media_spin v5: Few more style changes. Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Ewelina Musial <ewelina.musial@intel.com> Reviewed-By: Ewelina Musial <ewelina.musial@intel.com>
2018-05-15lib: Adjust media_spin and gpu_fill to our code styleKatarzyna Dec
Let's adjust code to our coding style during refactoring media_spin code. Few more changes in gpgpu_fill lib was made as well: intend align and /s/unsigned/unsigned int. v2: fixed minor typos v3: few more style changes v4: few indentation changes Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Ewelina Musial <ewelina.musial@intel.com> Reviewed-by: Ewelina Musial <ewelina.musial@intel.com>
2018-05-15lib/media_spin: Remove gen8lp_media_spin functionKatarzyna Dec
Gen8lp function are duplicates of Gen8 with difference in emit_media_objects - we cannot perform media_state_flush on CHT. Similar changes were done previously for gpgpu_fill and media_fill. v2: replaced IS_BRW and IS_CHT with IS_GEN8 v3: removed remaining 8lp spin function Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
2018-05-15lib/media_spin: Move helper functions to gpu_fill libraryKatarzyna Dec
Let's remove duplications introduced by moving media_spin helper functions to gpu_fill. These were mainly the same functions as for Gen8 media/gpgpu fill. gen8_render_flush from media_spin was replaced by gen7_render_flush. The only functions that were left intact are gen8_spin_curbe_buffer_data, gen8_emit_vfe_state_spin, gen8_emit_media_objects_spin and gen8lp_emit_media_objects_spin. v2: squashed patches 1 and 2 from v1 v3: updated commit msg Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
2018-04-24lib/intel_batchbuffer: Move batch functions from media/render/gpgpu libsKalamarz, Lukasz
Batch functions were copy/pasted across several libs. With moving it into intel_batchbuffer lib test can now be easly maintained without worrying that we forgot to modify older version of lib. v2: Added documentation into lib and rebased patch v3: Fixed typos and rebased patch v4: Fixed documentation issues v5: Rename, clean up of leftovers from previous version and documentation polishing v6: Fixing assert Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2015-03-25lib: Add media spinJeff McGee
The media spin utility is derived from media fill. The purpose is to create a simple means to keep the render engine (media pipeline) busy for a controlled amount of time. It does so by emitting a batch with a single execution thread that spins in a tight loop the requested number of times. Each spin increments a counter whose final 32-bit value is written to the destination buffer on completion for checking. The implementation supports Gen8, Gen8lp, and Gen9. v2: Apply the recommendations of igt.cocci. Signed-off-by: Jeff McGee <jeff.mcgee@intel.com> Tested-by: Lei Liu <lei.a.liu@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>