author | David Marx <David.M.Marx@Oracle.Com> |
Mon, 16 Sep 2013 15:54:13 -0700 | |
changeset 1407 | 72726c775cc9 |
parent 1117 | 629ac4b133bc |
permissions | -rw-r--r-- |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
1 |
/* |
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
2 |
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
3 |
* |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
4 |
* Permission is hereby granted, free of charge, to any person obtaining a |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
5 |
* copy of this software and associated documentation files (the "Software"), |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
6 |
* to deal in the Software without restriction, including without limitation |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
7 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
8 |
* and/or sell copies of the Software, and to permit persons to whom the |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
9 |
* Software is furnished to do so, subject to the following conditions: |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
10 |
* |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
11 |
* The above copyright notice and this permission notice (including the next |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
12 |
* paragraph) shall be included in all copies or substantial portions of the |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
13 |
* Software. |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
14 |
* |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
15 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
16 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
17 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
18 |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
19 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
20 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
21 |
* DEALINGS IN THE SOFTWARE. |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
22 |
*/ |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
23 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
24 |
#include "libvtsSUNWast.h" /* VTS library definitions for ast device */ |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
25 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
26 |
/* |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
27 |
* ast_test_chip() |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
28 |
* |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
29 |
* Test Chip, functional tests. |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
30 |
*/ |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
31 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
32 |
return_packet * |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
33 |
ast_test_chip( |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
34 |
register int const fd) |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
35 |
{ |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
36 |
static return_packet rp; |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
37 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
38 |
memset(&rp, 0, sizeof (return_packet)); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
39 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
40 |
if (gfx_vts_debug_mask & GRAPHICS_VTS_CHIP_OFF) |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
41 |
return (&rp); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
42 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
43 |
TraceMessage(VTS_DEBUG, "ast_test_chip", |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
44 |
"ast_test_chip running\n"); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
45 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
46 |
ast_block_signals(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
47 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
48 |
ast_lock_display(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
49 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
50 |
chip_test(&rp, fd); |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
51 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
52 |
ast_unlock_display(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
53 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
54 |
ast_restore_signals(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
55 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
56 |
TraceMessage(VTS_DEBUG, "ast_test_chip", |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
57 |
"ast_test_chip completed\n"); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
58 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
59 |
return (&rp); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
60 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
61 |
} /* ast_test_chip() */ |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
62 |
|
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
63 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
64 |
int |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
65 |
chip_test( |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
66 |
register return_packet *const rp, |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
67 |
register int const fd) |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
68 |
{ |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
69 |
register uint_t black; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
70 |
register uint_t white; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
71 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
72 |
memset(&ast_info, 0, sizeof (ast_info)); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
73 |
ast_info.ast_fd = fd; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
74 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
75 |
if (ast_map_mem(rp, GRAPHICS_ERR_CHIP) != 0) |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
76 |
return (-1); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
77 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
78 |
if (ast_init_info(rp, GRAPHICS_ERR_CHIP) != 0) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
79 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
80 |
return (-1); |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
81 |
} |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
82 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
83 |
if (ast_init_graphics() < 0) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
84 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
85 |
return (0); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
86 |
} |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
87 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
88 |
if (ast_save_palet() < 0) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
89 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
90 |
return (0); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
91 |
} |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
92 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
93 |
if (ast_set_palet() < 0) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
94 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
95 |
return (0); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
96 |
} |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
97 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
98 |
/* Clear screen black */ |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
99 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
100 |
black = ast_color(0x00, 0x00, 0x00); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
101 |
if (!ast_fill_solid_rect(0, 0, |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
102 |
ast_info.ast_width, ast_info.ast_height, black)) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
103 |
ast_restore_palet(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
104 |
ast_finish_graphics(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
105 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
106 |
return (-1); |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
107 |
} |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
108 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
109 |
if (!ast_wait_idle()) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
110 |
ast_restore_palet(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
111 |
ast_finish_graphics(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
112 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
113 |
return (-1); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
114 |
} |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
115 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
116 |
/* line test */ |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
117 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
118 |
if (!draw_lines(ast_info.ast_width, ast_info.ast_height)) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
119 |
ast_restore_palet(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
120 |
ast_finish_graphics(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
121 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
122 |
return (-1); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
123 |
} |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
124 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
125 |
if (!ast_wait_idle()) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
126 |
ast_restore_palet(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
127 |
ast_finish_graphics(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
128 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
129 |
return (-1); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
130 |
} |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
131 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
132 |
if (ast_sleep(2)) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
133 |
ast_restore_palet(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
134 |
ast_finish_graphics(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
135 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
136 |
return (-1); |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
137 |
} |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
138 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
139 |
/* fill rectangle test */ |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
140 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
141 |
if (!draw_cascaded_box(ast_info.ast_width, ast_info.ast_height)) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
142 |
ast_restore_palet(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
143 |
ast_finish_graphics(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
144 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
145 |
return (-1); |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
146 |
} |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
147 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
148 |
if (!ast_wait_idle()) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
149 |
ast_restore_palet(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
150 |
ast_finish_graphics(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
151 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
152 |
return (-1); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
153 |
} |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
154 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
155 |
if (ast_sleep(2)) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
156 |
ast_restore_palet(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
157 |
ast_finish_graphics(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
158 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
159 |
return (-1); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
160 |
} |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
161 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
162 |
/* Clear screen white */ |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
163 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
164 |
white = ast_color(0xff, 0xff, 0xff); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
165 |
if (!ast_fill_solid_rect(0, 0, |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
166 |
ast_info.ast_width, ast_info.ast_height, white)) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
167 |
ast_restore_palet(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
168 |
ast_finish_graphics(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
169 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
170 |
return (-1); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
171 |
} |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
172 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
173 |
if (!ast_wait_idle()) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
174 |
ast_restore_palet(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
175 |
ast_finish_graphics(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
176 |
ast_unmap_mem(NULL, GRAPHICS_ERR_CHIP); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
177 |
return (-1); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
178 |
} |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
179 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
180 |
ast_sleep(2); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
181 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
182 |
ast_restore_palet(); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
183 |
ast_finish_graphics(); |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
184 |
|
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
185 |
/* |
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
186 |
* Unmap the registers & frame buffers memory |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
187 |
*/ |
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
188 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
189 |
if (ast_unmap_mem(rp, GRAPHICS_ERR_CHIP) != 0) |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
190 |
return (-1); |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
191 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
192 |
return (0); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
193 |
} |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
194 |
int |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
195 |
draw_lines( |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
196 |
register uint_t const width, |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
197 |
register uint_t const height) |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
198 |
{ |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
199 |
register uint_t x1; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
200 |
register uint_t y1; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
201 |
register uint_t x2; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
202 |
register uint_t y2; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
203 |
register uint_t color; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
204 |
register uint_t lineon; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
205 |
register uint_t const numlines = 128; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
206 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
207 |
for (lineon = 0; lineon < numlines; lineon++) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
208 |
color = ast_color(0xaf, lineon, lineon); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
209 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
210 |
x1 = (uint_t)((width * lineon) / numlines); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
211 |
x2 = x1; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
212 |
y1 = 0; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
213 |
y2 = height; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
214 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
215 |
if (!ast_draw_solid_line(x1, y1, x2, y2, color)) |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
216 |
return (0); |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
217 |
} |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
218 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
219 |
for (lineon = 0; lineon < numlines; lineon++) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
220 |
color = ast_color(0xaf, lineon, lineon); |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
221 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
222 |
x1 = 0; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
223 |
x2 = width; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
224 |
y1 = (uint_t)((height * lineon) / numlines); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
225 |
y2 = y1; |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
226 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
227 |
if (!ast_draw_solid_line(x1, y1, x2, y2, color)) |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
228 |
return (0); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
229 |
} |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
230 |
return (1); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
231 |
} |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
232 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
233 |
int |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
234 |
draw_cascaded_box( |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
235 |
register uint_t const width, |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
236 |
register uint_t const height) |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
237 |
{ |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
238 |
register uint_t x1; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
239 |
register uint_t y1; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
240 |
register uint_t x2; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
241 |
register uint_t y2; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
242 |
register uint_t color; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
243 |
register uint_t recton; |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
244 |
register uint_t const numrects = 256; |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
245 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
246 |
for (recton = 0; recton < numrects; recton++) { |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
247 |
|
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
248 |
x1 = (uint_t)((width * recton) / 512); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
249 |
x2 = width - x1; |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
250 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
251 |
y1 = (uint_t)((height * recton) / 512); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
252 |
y2 = height - y1; |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
253 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
254 |
color = ast_color(recton, recton, recton); |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
255 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
256 |
if (!ast_fill_solid_rect(x1, y1, x2, y2, color)) |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
257 |
return (0); |
1117
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
258 |
} |
629ac4b133bc
7039328 Move SPARC Graphics utilities to X consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
259 |
|
1407
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
260 |
return (1); |
72726c775cc9
17020010 Screen turned to BLUE after running VTS graphicstest on Xorg(ast driver)
David Marx <David.M.Marx@Oracle.Com>
parents:
1117
diff
changeset
|
261 |
} |