Lines Matching +full:1 +full:br +full:- +full:10
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
11 * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria
13 * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria
28 #define CRITBEGIN spin_lock_irqsave(&ivideo->lockaccel, critflags);
29 #define CRITEND spin_unlock_irqrestore(&ivideo->lockaccel, critflags);
40 #define BR(x) (0x8200 | (x) << 2) macro
61 #define SRCCPUBLITBUF SRCSYSTEM /* source is CPU-driven BitBuffer (for color expand) */
96 #define AGP_BASE 0x8206 /* color-depth dependent value */
127 #define CmdQueLen ivideo->cmdqueuelength
129 /* ------------- SiS 300 series -------------- */
131 /* BR(16) (0x8240):
133 bit 31 2D engine: 1 is idle,
134 bit 30 3D engine: 1 is idle,
135 bit 29 Command queue: 1 is empty
143 while((MMIO_IN16(ivideo->mmio_vbase, BR(16)+2) & 0xE000) != 0xE000){} \
144 while((MMIO_IN16(ivideo->mmio_vbase, BR(16)+2) & 0xE000) != 0xE000){} \
145 while((MMIO_IN16(ivideo->mmio_vbase, BR(16)+2) & 0xE000) != 0xE000){} \
146 CmdQueLen = MMIO_IN16(ivideo->mmio_vbase, 0x8240); \
152 MMIO_OUT32(ivideo->mmio_vbase, BR(0), base);\
153 CmdQueLen--;
157 MMIO_OUT16(ivideo->mmio_vbase, BR(1), pitch);\
158 CmdQueLen--;
162 MMIO_OUT32(ivideo->mmio_vbase, BR(2), (x)<<16 | (y) );\
163 CmdQueLen--;
167 MMIO_OUT32(ivideo->mmio_vbase, BR(4), base);\
168 CmdQueLen--;
172 MMIO_OUT32(ivideo->mmio_vbase, BR(3), (x)<<16 | (y) );\
173 CmdQueLen--;
177 MMIO_OUT32(ivideo->mmio_vbase, BR(5), (y)<<16 | (x) );\
178 CmdQueLen--;
182 MMIO_OUT16(ivideo->mmio_vbase, BR(1)+2, bpp);\
183 CmdQueLen--;
187 MMIO_OUT32(ivideo->mmio_vbase, BR(6), (h)<<16 | (w) );\
188 CmdQueLen--;
192 MMIO_OUT32(ivideo->mmio_vbase, BR(7), color);\
193 CmdQueLen--;
197 MMIO_OUT32(ivideo->mmio_vbase, BR(8), color);\
198 CmdQueLen--;
202 MMIO_OUT32(ivideo->mmio_vbase, BR(9), color);\
203 CmdQueLen--;
207 MMIO_OUT32(ivideo->mmio_vbase, BR(10), color);\
208 CmdQueLen--;
215 if(CmdQueLen <= 1) SiS300Idle;\
216 MMIO_OUT32(ivideo->mmio_vbase, 0x8224, color);\
217 MMIO_OUT32(ivideo->mmio_vbase, 0x8228, color);\
218 CmdQueLen -= 2;
221 if(CmdQueLen <= 1) SiS300Idle;\
222 MMIO_OUT32(ivideo->mmio_vbase, 0x821C, color); \
223 MMIO_OUT32(ivideo->mmio_vbase, 0x8220, color); \
224 CmdQueLen -= 2;
227 if(CmdQueLen <= 1) SiS300Idle;\
228 MMIO_OUT32(ivideo->mmio_vbase, BR(11), p0);\
229 MMIO_OUT32(ivideo->mmio_vbase, BR(12), p1);\
230 CmdQueLen -= 2;
234 MMIO_OUT32(ivideo->mmio_vbase, BR(13), ((left) & 0xFFFF) | (top)<<16 );\
235 CmdQueLen--;
239 MMIO_OUT32(ivideo->mmio_vbase, BR(14), ((right) & 0xFFFF) | (bottom)<<16 );\
240 CmdQueLen--;
244 ivideo->CommandReg = (rop) << 8;
247 ivideo->CommandReg |= (flags);
250 if(CmdQueLen <= 1) SiS300Idle;\
251 MMIO_OUT32(ivideo->mmio_vbase, BR(15), ivideo->CommandReg); \
252 MMIO_OUT32(ivideo->mmio_vbase, BR(16), 0);\
253 CmdQueLen -= 2;
255 /* -------------- SiS 315/330 series --------------- */
258 bit 31 = 1: All engines idle and all queues empty
259 bit 30 = 1: Hardware Queue (=HW CQ, 2D queue, 3D queue) empty
260 bit 29 = 1: 2D engine is idle
261 bit 28 = 1: 3D engine is idle
262 bit 27 = 1: HW command queue empty
263 bit 26 = 1: 2D queue empty
264 bit 25 = 1: 3D queue empty
265 bit 24 = 1: SW command queue empty
268 bits 7:0: 2D counter 1
273 while( (MMIO_IN16(ivideo->mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){} \
274 while( (MMIO_IN16(ivideo->mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){} \
275 while( (MMIO_IN16(ivideo->mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){} \
276 while( (MMIO_IN16(ivideo->mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){} \
282 MMIO_OUT32(ivideo->mmio_vbase, SRC_ADDR, base);\
283 CmdQueLen--;
287 MMIO_OUT16(ivideo->mmio_vbase, SRC_PITCH, pitch);\
288 CmdQueLen--;
292 MMIO_OUT32(ivideo->mmio_vbase, SRC_Y, (x)<<16 | (y) );\
293 CmdQueLen--;
297 MMIO_OUT32(ivideo->mmio_vbase, DST_ADDR, base);\
298 CmdQueLen--;
302 MMIO_OUT32(ivideo->mmio_vbase, DST_Y, (x)<<16 | (y) );\
303 CmdQueLen--;
307 MMIO_OUT32(ivideo->mmio_vbase, DST_PITCH, (y)<<16 | (x) );\
308 CmdQueLen--;
312 MMIO_OUT16(ivideo->mmio_vbase, AGP_BASE, bpp);\
313 CmdQueLen--;
317 MMIO_OUT32(ivideo->mmio_vbase, RECT_WIDTH, (h)<<16 | (w) );\
318 CmdQueLen--;
322 MMIO_OUT32(ivideo->mmio_vbase, PAT_FGCOLOR, color);\
323 CmdQueLen--;
327 MMIO_OUT32(ivideo->mmio_vbase, PAT_BGCOLOR, color);\
328 CmdQueLen--;
332 MMIO_OUT32(ivideo->mmio_vbase, SRC_FGCOLOR, color);\
333 CmdQueLen--;
337 MMIO_OUT32(ivideo->mmio_vbase, SRC_BGCOLOR, color);\
338 CmdQueLen--;
341 if(CmdQueLen <= 1) SiS310Idle;\
342 MMIO_OUT32(ivideo->mmio_vbase, TRANS_SRC_KEY_HIGH, color);\
343 MMIO_OUT32(ivideo->mmio_vbase, TRANS_SRC_KEY_LOW, color);\
344 CmdQueLen -= 2;
347 if(CmdQueLen <= 1) SiS310Idle;\
348 MMIO_OUT32(ivideo->mmio_vbase, TRANS_DST_KEY_HIGH, color); \
349 MMIO_OUT32(ivideo->mmio_vbase, TRANS_DST_KEY_LOW, color); \
350 CmdQueLen -= 2;
353 if(CmdQueLen <= 1) SiS310Idle;\
354 MMIO_OUT32(ivideo->mmio_vbase, MONO_MASK, p0);\
355 MMIO_OUT32(ivideo->mmio_vbase, MONO_MASK+4, p1);\
356 CmdQueLen -= 2;
360 MMIO_OUT32(ivideo->mmio_vbase, LEFT_CLIP, ((left) & 0xFFFF) | (top)<<16 );\
361 CmdQueLen--;
365 MMIO_OUT32(ivideo->mmio_vbase, RIGHT_CLIP, ((right) & 0xFFFF) | (bottom)<<16 );\
366 CmdQueLen--;
369 ivideo->CommandReg = (rop) << 8;
372 ivideo->CommandReg |= (flags);
375 if(CmdQueLen <= 1) SiS310Idle;\
376 MMIO_OUT32(ivideo->mmio_vbase, COMMAND_READY, ivideo->CommandReg); \
377 MMIO_OUT32(ivideo->mmio_vbase, FIRE_TRIGGER, 0); \
378 CmdQueLen -= 2;