Lines Matching refs:stream
46 static inline void etna_emit_load_state(struct etna_cmd_stream *stream, in etna_emit_load_state() argument
54 etna_cmd_stream_emit(stream, v); in etna_emit_load_state()
57 static inline void etna_set_state(struct etna_cmd_stream *stream, uint32_t address, uint32_t value) in etna_set_state() argument
59 etna_cmd_stream_reserve(stream, 2); in etna_set_state()
60 etna_emit_load_state(stream, address >> 2, 1); in etna_set_state()
61 etna_cmd_stream_emit(stream, value); in etna_set_state()
64 static inline void etna_set_state_from_bo(struct etna_cmd_stream *stream, in etna_set_state_from_bo() argument
67 etna_cmd_stream_reserve(stream, 2); in etna_set_state_from_bo()
68 etna_emit_load_state(stream, address >> 2, 1); in etna_set_state_from_bo()
70 etna_cmd_stream_reloc(stream, &(struct etna_reloc){ in etna_set_state_from_bo()
77 static void gen_cmd_stream(struct etna_cmd_stream *stream, struct etna_bo *bmp, const int width, co… in gen_cmd_stream() argument
82 etna_set_state(stream, VIVS_DE_SRC_STRIDE, 0); in gen_cmd_stream()
83 etna_set_state(stream, VIVS_DE_SRC_ROTATION_CONFIG, 0); in gen_cmd_stream()
84 etna_set_state(stream, VIVS_DE_SRC_CONFIG, 0); in gen_cmd_stream()
85 etna_set_state(stream, VIVS_DE_SRC_ORIGIN, 0); in gen_cmd_stream()
86 etna_set_state(stream, VIVS_DE_SRC_SIZE, 0); in gen_cmd_stream()
87 etna_set_state(stream, VIVS_DE_SRC_COLOR_BG, 0); in gen_cmd_stream()
88 etna_set_state(stream, VIVS_DE_SRC_COLOR_FG, 0); in gen_cmd_stream()
89 etna_set_state(stream, VIVS_DE_STRETCH_FACTOR_LOW, 0); in gen_cmd_stream()
90 etna_set_state(stream, VIVS_DE_STRETCH_FACTOR_HIGH, 0); in gen_cmd_stream()
91 etna_set_state_from_bo(stream, VIVS_DE_DEST_ADDRESS, bmp); in gen_cmd_stream()
92 etna_set_state(stream, VIVS_DE_DEST_STRIDE, width*4); in gen_cmd_stream()
93 etna_set_state(stream, VIVS_DE_DEST_ROTATION_CONFIG, 0); in gen_cmd_stream()
94 etna_set_state(stream, VIVS_DE_DEST_CONFIG, in gen_cmd_stream()
101 etna_set_state(stream, VIVS_DE_ROP, in gen_cmd_stream()
103 etna_set_state(stream, VIVS_DE_CLIP_TOP_LEFT, in gen_cmd_stream()
107 etna_set_state(stream, VIVS_DE_CLIP_BOTTOM_RIGHT, in gen_cmd_stream()
111 etna_set_state(stream, VIVS_DE_CONFIG, 0); /* TODO */ in gen_cmd_stream()
112 etna_set_state(stream, VIVS_DE_SRC_ORIGIN_FRACTION, 0); in gen_cmd_stream()
113 etna_set_state(stream, VIVS_DE_ALPHA_CONTROL, 0); in gen_cmd_stream()
114 etna_set_state(stream, VIVS_DE_ALPHA_MODES, 0); in gen_cmd_stream()
115 etna_set_state(stream, VIVS_DE_DEST_ROTATION_HEIGHT, 0); in gen_cmd_stream()
116 etna_set_state(stream, VIVS_DE_SRC_ROTATION_HEIGHT, 0); in gen_cmd_stream()
117 etna_set_state(stream, VIVS_DE_ROT_ANGLE, 0); in gen_cmd_stream()
120 etna_set_state(stream, VIVS_DE_CLEAR_PIXEL_VALUE32, 0xff40ff40); in gen_cmd_stream()
122 etna_set_state(stream, VIVS_DE_CLEAR_BYTE_MASK, 0xff); in gen_cmd_stream()
123 etna_set_state(stream, VIVS_DE_CLEAR_PIXEL_VALUE_LOW, 0xff40ff40); in gen_cmd_stream()
124 etna_set_state(stream, VIVS_DE_CLEAR_PIXEL_VALUE_HIGH, 0xff40ff40); in gen_cmd_stream()
126 etna_set_state(stream, VIVS_DE_DEST_COLOR_KEY, 0); in gen_cmd_stream()
127 etna_set_state(stream, VIVS_DE_GLOBAL_SRC_COLOR, 0); in gen_cmd_stream()
128 etna_set_state(stream, VIVS_DE_GLOBAL_DEST_COLOR, 0); in gen_cmd_stream()
129 etna_set_state(stream, VIVS_DE_COLOR_MULTIPLY_MODES, 0); in gen_cmd_stream()
130 etna_set_state(stream, VIVS_DE_PE_TRANSPARENCY, 0); in gen_cmd_stream()
131 etna_set_state(stream, VIVS_DE_PE_CONTROL, 0); in gen_cmd_stream()
132 etna_set_state(stream, VIVS_DE_PE_DITHER_LOW, 0xffffffff); in gen_cmd_stream()
133 etna_set_state(stream, VIVS_DE_PE_DITHER_HIGH, 0xffffffff); in gen_cmd_stream()
136 etna_cmd_stream_emit(stream, in gen_cmd_stream()
139 etna_cmd_stream_emit(stream, 0x0); /* rectangles start aligned */ in gen_cmd_stream()
144 etna_cmd_stream_emit(stream, VIV_FE_DRAW_2D_TOP_LEFT_X(x*8) | VIV_FE_DRAW_2D_TOP_LEFT_Y(y*8)); in gen_cmd_stream()
145 …etna_cmd_stream_emit(stream, VIV_FE_DRAW_2D_BOTTOM_RIGHT_X(x*8+4) | VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y(… in gen_cmd_stream()
147 etna_set_state(stream, 1, 0); in gen_cmd_stream()
148 etna_set_state(stream, 1, 0); in gen_cmd_stream()
149 etna_set_state(stream, 1, 0); in gen_cmd_stream()
151 etna_set_state(stream, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_PE2D); in gen_cmd_stream()
164 struct etna_cmd_stream *stream; in main() local
209 stream = etna_cmd_stream_new(pipe, 0x300, NULL, NULL); in main()
210 if (!stream) { in main()
216 gen_cmd_stream(stream, bmp, width, height); in main()
218 etna_cmd_stream_finish(stream); in main()
222 etna_cmd_stream_del(stream); in main()