gfx_rndr.c revision f29dbc25
1/* Copyright (c) 2005 Advanced Micro Devices, Inc. 2 * 3 * Permission is hereby granted, free of charge, to any person obtaining a copy 4 * of this software and associated documentation files (the "Software"), to 5 * deal in the Software without restriction, including without limitation the 6 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 * sell copies of the Software, and to permit persons to whom the Software is 8 * furnished to do so, subject to the following conditions: 9 * 10 * The above copyright notice and this permission notice shall be included in 11 * all copies or substantial portions of the Software. 12 * 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 * IN THE SOFTWARE. 20 * 21 * Neither the name of the Advanced Micro Devices, Inc. nor the names of its 22 * contributors may be used to endorse or promote products derived from this 23 * software without specific prior written permission. 24 * */ 25 26/* 27 * This file contains routines to program the 2D acceleration hardware: 28 * 29 * gfx_set_bpp 30 * gfx_set_solid_pattern 31 * gfx_set_mono_pattern 32 * gfx_set_color_pattern 33 * gfx_load_color_pattern_line 34 * gfx_set_solid_source 35 * gfx_set_mono_source 36 * gfx_set_raster_operation 37 * gfx_pattern_fill 38 * gfx_color_pattern_fill 39 * gfx_screen_to_screen_blt 40 * gfx_screen_to_screen_xblt 41 * gfx_color_bitmap_to_screen_blt 42 * gfx_color_bitmap_to_screen_xblt 43 * gfx_mono_bitmap_to_screen_blt 44 * gfx_bresenham_line 45 * gfx_wait_until_idle 46 * */ 47 48/* STATIC VARIABLES */ 49 50unsigned short GFXbpp = 16; 51unsigned short GFXbb0Base = 0x400; 52unsigned short GFXbb1Base = 0x930; 53unsigned short GFXbufferWidthPixels = 400; 54 55unsigned short GFXpatternFlags = 0; 56unsigned short GFXsourceFlags = 0; 57unsigned long GFXsavedColor = 0; 58unsigned short GFXsavedRop = 0; 59unsigned short GFXusesDstData = 0; 60 61/* INCLUDE SUPPORT FOR FIRST GENERATION, IF SPECIFIED. */ 62 63#if GFX_2DACCEL_GU1 64#include "rndr_gu1.c" 65#endif 66 67/* INCLUDE SUPPORT FOR SECOND GENERATION, IF SPECIFIED. */ 68 69#if GFX_2DACCEL_GU2 70#include "rndr_gu2.c" 71#endif 72 73/* WRAPPERS IF DYNAMIC SELECTION */ 74/* Extra layer to call either first or second generation routines. */ 75 76#if GFX_2DACCEL_DYNAMIC 77 78/*--------------------------------------------------------------------------- 79 * gfx_reset_pitch (PRIVATE ROUTINE - NOT PART OF API) 80 *--------------------------------------------------------------------------- 81 */ 82void 83gfx_reset_pitch(unsigned short pitch) 84{ 85#if GFX_2DACCEL_GU2 86 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 87 gu2_reset_pitch(pitch); 88#endif 89} 90 91/*--------------------------------------------------------------------------- 92 * gfx_set_bpp 93 *--------------------------------------------------------------------------- 94 */ 95void 96gfx_set_bpp(unsigned short bpp) 97{ 98#if GFX_2DACCEL_GU1 99 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 100 gu1_set_bpp(bpp); 101#endif 102#if GFX_2DACCEL_GU2 103 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 104 gu2_set_bpp(bpp); 105#endif 106} 107 108/*--------------------------------------------------------------------------- 109 * gfx_set_solid_source 110 *--------------------------------------------------------------------------- 111 */ 112void 113gfx_set_solid_source(unsigned long color) 114{ 115#if GFX_2DACCEL_GU1 116 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 117 gu1_set_solid_source(color); 118#endif 119#if GFX_2DACCEL_GU2 120 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 121 gu2_set_solid_source(color); 122#endif 123} 124 125/*--------------------------------------------------------------------------- 126 * gfx_set_mono_source 127 *--------------------------------------------------------------------------- 128 */ 129void 130gfx_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, 131 unsigned short transparent) 132{ 133#if GFX_2DACCEL_GU1 134 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 135 gu1_set_mono_source(bgcolor, fgcolor, transparent); 136#endif 137#if GFX_2DACCEL_GU2 138 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 139 gu2_set_mono_source(bgcolor, fgcolor, transparent); 140#endif 141} 142 143void 144gfx_set_pattern_flags(unsigned short flags) 145{ 146 GFXpatternFlags |= flags; 147} 148 149/*--------------------------------------------------------------------------- 150 * gfx_set_solid_pattern 151 *--------------------------------------------------------------------------- 152 */ 153void 154gfx_set_solid_pattern(unsigned long color) 155{ 156#if GFX_2DACCEL_GU1 157 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 158 gu1_set_solid_pattern(color); 159#endif 160#if GFX_2DACCEL_GU2 161 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 162 gu2_set_solid_pattern(color); 163#endif 164} 165 166/*--------------------------------------------------------------------------- 167 * gfx_set_mono_pattern 168 *--------------------------------------------------------------------------- 169 */ 170void 171gfx_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, 172 unsigned long data0, unsigned long data1, unsigned char transparent) 173{ 174#if GFX_2DACCEL_GU1 175 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 176 gu1_set_mono_pattern(bgcolor, fgcolor, data0, data1, transparent); 177#endif 178#if GFX_2DACCEL_GU2 179 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 180 gu2_set_mono_pattern(bgcolor, fgcolor, data0, data1, transparent); 181#endif 182} 183 184/*--------------------------------------------------------------------------- 185 * gfx_set_color_pattern 186 *--------------------------------------------------------------------------- 187 */ 188void 189gfx_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor, 190 unsigned long data0, unsigned long data1, 191 unsigned long data2, unsigned long data3, unsigned char transparent) 192{ 193#if GFX_2DACCEL_GU1 194 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 195 gu1_set_color_pattern(bgcolor, fgcolor, data0, data1, data2, data3, 196 transparent); 197#endif 198#if GFX_2DACCEL_GU2 199 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 200 gu2_set_color_pattern(bgcolor, fgcolor, data0, data1, data2, data3, 201 transparent); 202#endif 203} 204 205/*--------------------------------------------------------------------------- 206 * gfx_load_color_pattern_line 207 *--------------------------------------------------------------------------- 208 */ 209void 210gfx_load_color_pattern_line(short y, unsigned long *pattern_8x8) 211{ 212#if GFX_2DACCEL_GU1 213 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 214 gu1_load_color_pattern_line(y, pattern_8x8); 215#endif 216#if GFX_2DACCEL_GU2 217 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 218 gu2_load_color_pattern_line(y, pattern_8x8); 219#endif 220} 221 222/*--------------------------------------------------------------------------- 223 * gfx_set_raster_operation 224 *--------------------------------------------------------------------------- 225 */ 226void 227gfx_set_raster_operation(unsigned char rop) 228{ 229#if GFX_2DACCEL_GU1 230 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 231 gu1_set_raster_operation(rop); 232#endif 233#if GFX_2DACCEL_GU2 234 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 235 gu2_set_raster_operation(rop); 236#endif 237} 238 239/*--------------------------------------------------------------------------- 240 * gfx_pattern_fill 241 *--------------------------------------------------------------------------- 242 */ 243void 244gfx_pattern_fill(unsigned short x, unsigned short y, 245 unsigned short width, unsigned short height) 246{ 247#if GFX_2DACCEL_GU1 248 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 249 gu1_pattern_fill(x, y, width, height); 250#endif 251#if GFX_2DACCEL_GU2 252 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 253 gu2_pattern_fill(x, y, width, height); 254#endif 255} 256 257/*--------------------------------------------------------------------------- 258 * gfx_color_pattern_fill 259 *--------------------------------------------------------------------------- 260 */ 261void 262gfx_color_pattern_fill(unsigned short x, unsigned short y, 263 unsigned short width, unsigned short height, unsigned long *pattern) 264{ 265#if GFX_2DACCEL_GU1 266 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 267 gu1_color_pattern_fill(x, y, width, height, pattern); 268#endif 269#if GFX_2DACCEL_GU2 270 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 271 gu2_color_pattern_fill(x, y, width, height, pattern); 272#endif 273} 274 275/*--------------------------------------------------------------------------- 276 * gfx_screen_to_screen_blt 277 *--------------------------------------------------------------------------- 278 */ 279void 280gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, 281 unsigned short dstx, unsigned short dsty, unsigned short width, 282 unsigned short height) 283{ 284#if GFX_2DACCEL_GU1 285 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 286 gu1_screen_to_screen_blt(srcx, srcy, dstx, dsty, width, height); 287#endif 288#if GFX_2DACCEL_GU2 289 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 290 gu2_screen_to_screen_blt(srcx, srcy, dstx, dsty, width, height); 291#endif 292} 293 294/*--------------------------------------------------------------------------- 295 * gfx_screen_to_screen_xblt 296 *--------------------------------------------------------------------------- 297 */ 298void 299gfx_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, 300 unsigned short dstx, unsigned short dsty, unsigned short width, 301 unsigned short height, unsigned long color) 302{ 303#if GFX_2DACCEL_GU1 304 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 305 gu1_screen_to_screen_xblt(srcx, srcy, dstx, dsty, width, height, 306 color); 307#endif 308#if GFX_2DACCEL_GU2 309 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 310 gu2_screen_to_screen_xblt(srcx, srcy, dstx, dsty, width, height, 311 color); 312#endif 313} 314 315/*--------------------------------------------------------------------------- 316 * gfx_color_bitmap_to_screen_blt 317 *--------------------------------------------------------------------------- 318 */ 319void 320gfx_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, 321 unsigned short dstx, unsigned short dsty, unsigned short width, 322 unsigned short height, unsigned char *data, long pitch) 323{ 324#if GFX_2DACCEL_GU1 325 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 326 gu1_color_bitmap_to_screen_blt(srcx, srcy, dstx, dsty, width, height, 327 data, pitch); 328#endif 329#if GFX_2DACCEL_GU2 330 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 331 gu2_color_bitmap_to_screen_blt(srcx, srcy, dstx, dsty, width, height, 332 data, pitch); 333#endif 334} 335 336/*--------------------------------------------------------------------------- 337 * gfx_color_bitmap_to_screen_xblt 338 *--------------------------------------------------------------------------- 339 */ 340void 341gfx_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, 342 unsigned short dstx, unsigned short dsty, unsigned short width, 343 unsigned short height, unsigned char *data, long pitch, 344 unsigned long color) 345{ 346#if GFX_2DACCEL_GU1 347 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 348 gu1_color_bitmap_to_screen_xblt(srcx, srcy, dstx, dsty, width, height, 349 data, pitch, color); 350#endif 351#if GFX_2DACCEL_GU2 352 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 353 gu2_color_bitmap_to_screen_xblt(srcx, srcy, dstx, dsty, width, height, 354 data, pitch, color); 355#endif 356} 357 358/*--------------------------------------------------------------------------- 359 * gfx_mono_bitmap_to_screen_blt 360 *--------------------------------------------------------------------------- 361 */ 362void 363gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, 364 unsigned short dstx, unsigned short dsty, unsigned short width, 365 unsigned short height, unsigned char *data, short pitch) 366{ 367#if GFX_2DACCEL_GU1 368 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 369 gu1_mono_bitmap_to_screen_blt(srcx, srcy, dstx, dsty, width, height, 370 data, pitch); 371#endif 372#if GFX_2DACCEL_GU2 373 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 374 gu2_mono_bitmap_to_screen_blt(srcx, srcy, dstx, dsty, width, height, 375 data, pitch); 376#endif 377} 378 379/*--------------------------------------------------------------------------- 380 * gfx_text_blt 381 *--------------------------------------------------------------------------- 382 */ 383void 384gfx_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, 385 unsigned short height, unsigned char *data) 386{ 387#if GFX_2DACCEL_GU1 388 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 389 gu1_text_blt(dstx, dsty, width, height, data); 390#endif 391#if GFX_2DACCEL_GU2 392 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 393 gu2_text_blt(dstx, dsty, width, height, data); 394#endif 395} 396 397/*--------------------------------------------------------------------------- 398 * gfx_bresenham_line 399 *--------------------------------------------------------------------------- 400 */ 401void 402gfx_bresenham_line(unsigned short x, unsigned short y, 403 unsigned short length, unsigned short initerr, 404 unsigned short axialerr, unsigned short diagerr, unsigned short flags) 405{ 406#if GFX_2DACCEL_GU1 407 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 408 gu1_bresenham_line(x, y, length, initerr, axialerr, diagerr, flags); 409#endif 410#if GFX_2DACCEL_GU2 411 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 412 gu2_bresenham_line(x, y, length, initerr, axialerr, diagerr, flags); 413#endif 414} 415 416/*--------------------------------------------------------------------------- 417 * gfx_wait_until_idle 418 *--------------------------------------------------------------------------- 419 */ 420void 421gfx_wait_until_idle(void) 422{ 423#if GFX_2DACCEL_GU1 424 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 425 gu1_wait_until_idle(); 426#endif 427#if GFX_2DACCEL_GU2 428 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 429 gu2_wait_until_idle(); 430#endif 431} 432 433/*--------------------------------------------------------------------------- 434 * gfx_test_blt_pending 435 *--------------------------------------------------------------------------- 436 */ 437int 438gfx_test_blt_pending(void) 439{ 440 int retval = 0; 441 442#if GFX_2DACCEL_GU1 443 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) 444 retval = gu1_test_blt_pending(); 445#endif 446#if GFX_2DACCEL_GU2 447 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 448 retval = gu2_test_blt_pending(); 449#endif 450 return (retval); 451} 452 453/*--------------------------------------------------------------------------- 454 * NEW ROUTINES FOR REDCLOUD 455 *--------------------------------------------------------------------------- 456 */ 457 458/*--------------------------------------------------------------------------- 459 * gfx2_set_source_stride 460 *--------------------------------------------------------------------------- 461 */ 462void 463gfx2_set_source_stride(unsigned short stride) 464{ 465#if GFX_2DACCEL_GU2 466 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 467 gu22_set_source_stride(stride); 468#endif 469} 470 471/*--------------------------------------------------------------------------- 472 * gfx2_set_destination_stride 473 *--------------------------------------------------------------------------- 474 */ 475void 476gfx2_set_destination_stride(unsigned short stride) 477{ 478#if GFX_2DACCEL_GU2 479 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 480 gu22_set_destination_stride(stride); 481#endif 482} 483 484/*--------------------------------------------------------------------------- 485 * gfx2_set_pattern_origin 486 *--------------------------------------------------------------------------- 487 */ 488void 489gfx2_set_pattern_origin(int x, int y) 490{ 491#if GFX_2DACCEL_GU2 492 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 493 gu22_set_pattern_origin(x, y); 494#endif 495} 496 497/*--------------------------------------------------------------------------- 498 * gfx2_set_source_transparency 499 *--------------------------------------------------------------------------- 500 */ 501void 502gfx2_set_source_transparency(unsigned long color, unsigned long mask) 503{ 504#if GFX_2DACCEL_GU2 505 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 506 gu22_set_source_transparency(color, mask); 507#endif 508} 509 510/*--------------------------------------------------------------------------- 511 * gfx2_set_alpha_mode 512 *--------------------------------------------------------------------------- 513 */ 514void 515gfx2_set_alpha_mode(int mode) 516{ 517#if GFX_2DACCEL_GU2 518 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 519 gu22_set_alpha_mode(mode); 520#endif 521} 522 523/*--------------------------------------------------------------------------- 524 * gfx2_set_alpha_value 525 *--------------------------------------------------------------------------- 526 */ 527void 528gfx2_set_alpha_value(unsigned char value) 529{ 530#if GFX_2DACCEL_GU2 531 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 532 gu22_set_alpha_value(value); 533#endif 534} 535 536/*--------------------------------------------------------------------------- 537 * gfx2_pattern_fill 538 *--------------------------------------------------------------------------- 539 */ 540void 541gfx2_pattern_fill(unsigned long dstoffset, unsigned short width, 542 unsigned short height) 543{ 544#if GFX_2DACCEL_GU2 545 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 546 gu22_pattern_fill(dstoffset, width, height); 547#endif 548} 549 550/*--------------------------------------------------------------------------- 551 * gfx2_color_pattern_fill 552 *--------------------------------------------------------------------------- 553 */ 554void 555gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, 556 unsigned short height, unsigned long *pattern) 557{ 558#if GFX_2DACCEL_GU2 559 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 560 gu22_color_pattern_fill(dstoffset, width, height, pattern); 561#endif 562} 563 564/*--------------------------------------------------------------------------- 565 * gfx2_screen_to_screen_blt 566 *--------------------------------------------------------------------------- 567 */ 568void 569gfx2_screen_to_screen_blt(unsigned long srcoffset, unsigned long dstoffset, 570 unsigned short width, unsigned short height, int flags) 571{ 572#if GFX_2DACCEL_GU2 573 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 574 gu22_screen_to_screen_blt(srcoffset, dstoffset, width, height, flags); 575#endif 576} 577 578/*--------------------------------------------------------------------------- 579 * gfx2_mono_expand_blt 580 *--------------------------------------------------------------------------- 581 */ 582void 583gfx2_mono_expand_blt(unsigned long srcbase, unsigned short srcx, 584 unsigned short srcy, unsigned long dstoffset, unsigned short width, 585 unsigned short height, int byte_packed) 586{ 587#if GFX_2DACCEL_GU2 588 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 589 gu22_mono_expand_blt(srcbase, srcx, srcy, dstoffset, width, height, 590 byte_packed); 591#endif 592} 593 594/*--------------------------------------------------------------------------- 595 * gfx2_color_bitmap_to_screen_blt 596 *--------------------------------------------------------------------------- 597 */ 598void 599gfx2_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, 600 unsigned long dstoffset, unsigned short width, unsigned short height, 601 unsigned char *data, short pitch) 602{ 603#if GFX_2DACCEL_GU2 604 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 605 gu22_color_bitmap_to_screen_blt(srcx, srcy, dstoffset, width, height, 606 data, pitch); 607#endif 608} 609 610/*--------------------------------------------------------------------------- 611 * gfx2_text_blt 612 *--------------------------------------------------------------------------- 613 */ 614void 615gfx2_text_blt(unsigned long dstoffset, unsigned short width, 616 unsigned short height, unsigned char *data) 617{ 618#if GFX_2DACCEL_GU2 619 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 620 gu22_text_blt(dstoffset, width, height, data); 621#endif 622} 623 624/*--------------------------------------------------------------------------- 625 * gfx2_mono_bitmap_to_screen_blt 626 *--------------------------------------------------------------------------- 627 */ 628void 629gfx2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, 630 unsigned long dstoffset, unsigned short width, unsigned short height, 631 unsigned char *data, short pitch) 632{ 633#if GFX_2DACCEL_GU2 634 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 635 gu22_mono_bitmap_to_screen_blt(srcx, srcy, dstoffset, width, height, 636 data, pitch); 637#endif 638} 639 640/*--------------------------------------------------------------------------- 641 * gfx2_bresenham_line 642 *--------------------------------------------------------------------------- 643 */ 644void 645gfx2_bresenham_line(unsigned long dstoffset, 646 unsigned short length, unsigned short initerr, 647 unsigned short axialerr, unsigned short diagerr, unsigned short flags) 648{ 649#if GFX_2DACCEL_GU2 650 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 651 gu22_bresenham_line(dstoffset, length, initerr, axialerr, diagerr, 652 flags); 653#endif 654} 655 656/*--------------------------------------------------------------------------- 657 * gfx2_sync_to_vblank 658 *--------------------------------------------------------------------------- 659 */ 660void 661gfx2_sync_to_vblank(void) 662{ 663#if GFX_2DACCEL_GU2 664 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) 665 gu22_sync_to_vblank(); 666#endif 667} 668 669#endif /* GFX_2DACCEL_DYNAMIC */ 670 671/* END OF FILE */ 672