diff options
author | Katarzyna Dec <katarzyna.dec@intel.com> | 2018-05-11 08:46:29 +0200 |
---|---|---|
committer | MichaĆ Winiarski <michal.winiarski@intel.com> | 2018-05-15 10:51:45 +0200 |
commit | b8fdb26250064ae7de0e82a02428278196c19afb (patch) | |
tree | 351d4ce80e7fa8a311a89c3ef2e2363024db248e /lib/gpgpu_fill.c | |
parent | 27d4cc664f926525a1280be38aff6901456793fd (diff) |
lib/gpu_fill: Further code unification in gpu_fill
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>
Diffstat (limited to 'lib/gpgpu_fill.c')
-rw-r--r-- | lib/gpgpu_fill.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/gpgpu_fill.c b/lib/gpgpu_fill.c index 52925a5c..9a2598bc 100644 --- a/lib/gpgpu_fill.c +++ b/lib/gpgpu_fill.c @@ -95,6 +95,13 @@ static const uint32_t gen9_gpgpu_kernel[][4] = { */ #define BATCH_STATE_SPLIT 2048 +/* VFE STATE params */ +#define THREADS 1 +#define GEN7_GPGPU_URB_ENTRIES 0 +#define GEN8_GPGPU_URB_ENTRIES 1 +#define GPGPU_URB_SIZE 0 +#define GPGPU_CURBE_SIZE 1 +#define GEN7_VFE_STATE_GPGPU_MODE 1 void gen7_gpgpu_fillfunc(struct intel_batchbuffer *batch, @@ -129,7 +136,9 @@ gen7_gpgpu_fillfunc(struct intel_batchbuffer *batch, OUT_BATCH(GEN7_PIPELINE_SELECT | PIPELINE_SELECT_GPGPU); gen7_emit_state_base_address(batch); - gen7_emit_vfe_state_gpgpu(batch); + gen7_emit_vfe_state(batch, THREADS, GEN7_GPGPU_URB_ENTRIES, + GPGPU_URB_SIZE, GPGPU_CURBE_SIZE, + GEN7_VFE_STATE_GPGPU_MODE); gen7_emit_curbe_load(batch, curbe_buffer); gen7_emit_interface_descriptor_load(batch, interface_descriptor); gen7_emit_gpgpu_walk(batch, x, y, width, height); @@ -176,7 +185,8 @@ gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch, OUT_BATCH(GEN7_PIPELINE_SELECT | PIPELINE_SELECT_GPGPU); gen8_emit_state_base_address(batch); - gen8_emit_vfe_state_gpgpu(batch); + gen8_emit_vfe_state(batch, THREADS, GEN8_GPGPU_URB_ENTRIES, + GPGPU_URB_SIZE, GPGPU_CURBE_SIZE); gen7_emit_curbe_load(batch, curbe_buffer); gen7_emit_interface_descriptor_load(batch, interface_descriptor); gen8_emit_gpgpu_walk(batch, x, y, width, height); @@ -224,7 +234,8 @@ gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch, PIPELINE_SELECT_GPGPU); gen9_emit_state_base_address(batch); - gen8_emit_vfe_state_gpgpu(batch); + gen8_emit_vfe_state(batch, THREADS, GEN8_GPGPU_URB_ENTRIES, + GPGPU_URB_SIZE, GPGPU_CURBE_SIZE); gen7_emit_curbe_load(batch, curbe_buffer); gen7_emit_interface_descriptor_load(batch, interface_descriptor); gen8_emit_gpgpu_walk(batch, x, y, width, height); |