1 /* 2 * Copyright © 2016 Rob Clark <[email protected]> 3 * SPDX-License-Identifier: MIT 4 * 5 * Authors: 6 * Rob Clark <[email protected]> 7 */ 8 9 #ifndef FD5_SCREEN_H_ 10 #define FD5_SCREEN_H_ 11 12 #include "pipe/p_screen.h" 13 14 #include "freedreno_util.h" 15 16 #include "a5xx.xml.h" 17 18 void fd5_screen_init(struct pipe_screen *pscreen); 19 20 static inline void emit_marker5(struct fd_ringbuffer * ring,int scratch_idx)21emit_marker5(struct fd_ringbuffer *ring, int scratch_idx) 22 { 23 extern int32_t marker_cnt; 24 unsigned reg = REG_A5XX_CP_SCRATCH_REG(scratch_idx); 25 if (__EMIT_MARKER) { 26 OUT_WFI5(ring); 27 OUT_PKT4(ring, reg, 1); 28 OUT_RING(ring, p_atomic_inc_return(&marker_cnt)); 29 } 30 } 31 32 #endif /* FD5_SCREEN_H_ */ 33