mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
iris: Handle new untyped dataport cache flush PIPE_CONTROL field
Also while switching to GPGPU pipeline, make sure to flush the untyped dataport cache. HDC pipeline flush bit must be set if we are flushing untyped dataport L1 data cache. v2: Add utrace support (Lionel) Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16905>
This commit is contained in:
parent
845ab3d627
commit
50802f96a8
3 changed files with 25 additions and 14 deletions
|
|
@ -358,6 +358,7 @@ enum pipe_control_flags
|
|||
PIPE_CONTROL_FLUSH_HDC = (1 << 26),
|
||||
PIPE_CONTROL_PSS_STALL_SYNC = (1 << 27),
|
||||
PIPE_CONTROL_L3_READ_ONLY_CACHE_INVALIDATE = (1 << 28),
|
||||
PIPE_CONTROL_UNTYPED_DATAPORT_CACHE_FLUSH = (1 << 29),
|
||||
};
|
||||
|
||||
#define PIPE_CONTROL_CACHE_FLUSH_BITS \
|
||||
|
|
@ -365,6 +366,7 @@ enum pipe_control_flags
|
|||
PIPE_CONTROL_DATA_CACHE_FLUSH | \
|
||||
PIPE_CONTROL_TILE_CACHE_FLUSH | \
|
||||
PIPE_CONTROL_FLUSH_HDC | \
|
||||
PIPE_CONTROL_UNTYPED_DATAPORT_CACHE_FLUSH | \
|
||||
PIPE_CONTROL_RENDER_TARGET_FLUSH)
|
||||
|
||||
#define PIPE_CONTROL_CACHE_INVALIDATE_BITS \
|
||||
|
|
|
|||
|
|
@ -654,6 +654,7 @@ emit_pipeline_select(struct iris_batch *batch, uint32_t pipeline)
|
|||
PIPE_CONTROL_RENDER_TARGET_FLUSH |
|
||||
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
|
||||
PIPE_CONTROL_DATA_CACHE_FLUSH |
|
||||
PIPE_CONTROL_UNTYPED_DATAPORT_CACHE_FLUSH |
|
||||
PIPE_CONTROL_CS_STALL);
|
||||
|
||||
iris_emit_pipe_control_flush(batch,
|
||||
|
|
@ -8084,7 +8085,7 @@ iris_emit_raw_pipe_control(struct iris_batch *batch,
|
|||
|
||||
if (INTEL_DEBUG(DEBUG_PIPE_CONTROL)) {
|
||||
fprintf(stderr,
|
||||
" PC [%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%"PRIx64"]: %s\n",
|
||||
" PC [%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%"PRIx64"]: %s\n",
|
||||
(flags & PIPE_CONTROL_FLUSH_ENABLE) ? "PipeCon " : "",
|
||||
(flags & PIPE_CONTROL_CS_STALL) ? "CS " : "",
|
||||
(flags & PIPE_CONTROL_STALL_AT_SCOREBOARD) ? "Scoreboard " : "",
|
||||
|
|
@ -8110,6 +8111,7 @@ iris_emit_raw_pipe_control(struct iris_batch *batch,
|
|||
(flags & PIPE_CONTROL_WRITE_TIMESTAMP) ? "WriteTimestamp " : "",
|
||||
(flags & PIPE_CONTROL_FLUSH_HDC) ? "HDC " : "",
|
||||
(flags & PIPE_CONTROL_PSS_STALL_SYNC) ? "PSS " : "",
|
||||
(flags & PIPE_CONTROL_UNTYPED_DATAPORT_CACHE_FLUSH) ? "UntypedDataPortCache " : "",
|
||||
imm, reason);
|
||||
}
|
||||
|
||||
|
|
@ -8131,6 +8133,12 @@ iris_emit_raw_pipe_control(struct iris_batch *batch,
|
|||
#endif
|
||||
#if GFX_VER >= 11
|
||||
pc.HDCPipelineFlushEnable = flags & PIPE_CONTROL_FLUSH_HDC;
|
||||
#endif
|
||||
#if GFX_VERx10 >= 125
|
||||
pc.UntypedDataPortCacheFlushEnable =
|
||||
(flags & PIPE_CONTROL_UNTYPED_DATAPORT_CACHE_FLUSH) &&
|
||||
IS_COMPUTE_PIPELINE(batch);
|
||||
pc.HDCPipelineFlushEnable |= pc.UntypedDataPortCacheFlushEnable;
|
||||
#endif
|
||||
pc.LRIPostSyncOperation = NoLRIOperation;
|
||||
pc.PipeControlFlushEnable = flags & PIPE_CONTROL_FLUSH_ENABLE;
|
||||
|
|
|
|||
|
|
@ -140,19 +140,20 @@ iris_utrace_pipe_flush_bit_to_ds_stall_flag(uint32_t flags)
|
|||
uint32_t iris;
|
||||
enum intel_ds_stall_flag ds;
|
||||
} iris_to_ds_flags[] = {
|
||||
{ .iris = PIPE_CONTROL_DEPTH_CACHE_FLUSH, .ds = INTEL_DS_DEPTH_CACHE_FLUSH_BIT, },
|
||||
{ .iris = PIPE_CONTROL_DATA_CACHE_FLUSH, .ds = INTEL_DS_DATA_CACHE_FLUSH_BIT, },
|
||||
{ .iris = PIPE_CONTROL_TILE_CACHE_FLUSH, .ds = INTEL_DS_TILE_CACHE_FLUSH_BIT, },
|
||||
{ .iris = PIPE_CONTROL_RENDER_TARGET_FLUSH, .ds = INTEL_DS_RENDER_TARGET_CACHE_FLUSH_BIT, },
|
||||
{ .iris = PIPE_CONTROL_STATE_CACHE_INVALIDATE, .ds = INTEL_DS_STATE_CACHE_INVALIDATE_BIT, },
|
||||
{ .iris = PIPE_CONTROL_CONST_CACHE_INVALIDATE, .ds = INTEL_DS_CONST_CACHE_INVALIDATE_BIT, },
|
||||
{ .iris = PIPE_CONTROL_VF_CACHE_INVALIDATE, .ds = INTEL_DS_VF_CACHE_INVALIDATE_BIT, },
|
||||
{ .iris = PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE, .ds = INTEL_DS_TEXTURE_CACHE_INVALIDATE_BIT, },
|
||||
{ .iris = PIPE_CONTROL_INSTRUCTION_INVALIDATE, .ds = INTEL_DS_INST_CACHE_INVALIDATE_BIT, },
|
||||
{ .iris = PIPE_CONTROL_DEPTH_STALL, .ds = INTEL_DS_DEPTH_STALL_BIT, },
|
||||
{ .iris = PIPE_CONTROL_CS_STALL, .ds = INTEL_DS_CS_STALL_BIT, },
|
||||
{ .iris = PIPE_CONTROL_FLUSH_HDC, .ds = INTEL_DS_HDC_PIPELINE_FLUSH_BIT, },
|
||||
{ .iris = PIPE_CONTROL_STALL_AT_SCOREBOARD, .ds = INTEL_DS_STALL_AT_SCOREBOARD_BIT, },
|
||||
{ .iris = PIPE_CONTROL_DEPTH_CACHE_FLUSH, .ds = INTEL_DS_DEPTH_CACHE_FLUSH_BIT, },
|
||||
{ .iris = PIPE_CONTROL_DATA_CACHE_FLUSH, .ds = INTEL_DS_DATA_CACHE_FLUSH_BIT, },
|
||||
{ .iris = PIPE_CONTROL_TILE_CACHE_FLUSH, .ds = INTEL_DS_TILE_CACHE_FLUSH_BIT, },
|
||||
{ .iris = PIPE_CONTROL_RENDER_TARGET_FLUSH, .ds = INTEL_DS_RENDER_TARGET_CACHE_FLUSH_BIT, },
|
||||
{ .iris = PIPE_CONTROL_STATE_CACHE_INVALIDATE, .ds = INTEL_DS_STATE_CACHE_INVALIDATE_BIT, },
|
||||
{ .iris = PIPE_CONTROL_CONST_CACHE_INVALIDATE, .ds = INTEL_DS_CONST_CACHE_INVALIDATE_BIT, },
|
||||
{ .iris = PIPE_CONTROL_VF_CACHE_INVALIDATE, .ds = INTEL_DS_VF_CACHE_INVALIDATE_BIT, },
|
||||
{ .iris = PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE, .ds = INTEL_DS_TEXTURE_CACHE_INVALIDATE_BIT, },
|
||||
{ .iris = PIPE_CONTROL_INSTRUCTION_INVALIDATE, .ds = INTEL_DS_INST_CACHE_INVALIDATE_BIT, },
|
||||
{ .iris = PIPE_CONTROL_DEPTH_STALL, .ds = INTEL_DS_DEPTH_STALL_BIT, },
|
||||
{ .iris = PIPE_CONTROL_CS_STALL, .ds = INTEL_DS_CS_STALL_BIT, },
|
||||
{ .iris = PIPE_CONTROL_FLUSH_HDC, .ds = INTEL_DS_HDC_PIPELINE_FLUSH_BIT, },
|
||||
{ .iris = PIPE_CONTROL_STALL_AT_SCOREBOARD, .ds = INTEL_DS_STALL_AT_SCOREBOARD_BIT, },
|
||||
{ .iris = PIPE_CONTROL_UNTYPED_DATAPORT_CACHE_FLUSH, .ds = INTEL_DS_UNTYPED_DATAPORT_CACHE_FLUSH_BIT, },
|
||||
};
|
||||
|
||||
enum intel_ds_stall_flag ret = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue