1247N/A * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. 1247N/A * Permission is hereby granted, free of charge, to any person obtaining a 1247N/A * copy of this software and associated documentation files (the "Software"), 1247N/A * to deal in the Software without restriction, including without limitation 1247N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense, 1247N/A * and/or sell copies of the Software, and to permit persons to whom the 1247N/A * Software is furnished to do so, subject to the following conditions: 1247N/A * The above copyright notice and this permission notice (including the next 1247N/A * paragraph) shall be included in all copies or substantial portions of the 1247N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1247N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1247N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1247N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1247N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1247N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1247N/A * DEALINGS IN THE SOFTWARE. 1247N/A * This test will open the device, read and write some registers 1247N/A * after mmaping in the register and frame buffer spaces. 1247N/A * Test the software bits of the status register. 1247N/A * Complement the bits, and see if they read back 1247N/A /* Save the original status. */ 1247N/A /* Write the status with the software bits complemented. */ 1247N/A /* Restore the old status. */ 1247N/A /* Check if the software bits did complement. */ 1247N/A * Test the software bits of the crtc cursor registers. 1247N/A * Complement the bits, and see if they read back 1247N/A /* Save the cursor location. */ 1247N/A /* Write the cursor location with the bits complemented. */ 1247N/A /* Read back the new cursor location. */ 1247N/A /* Restore the old cursor location, */ 1247N/A printf(
"loc 0x%02x 0x%02x 0x%02x, 0x%02x 0x%02x 0x%02x\n",
1247N/A * Test the dac by modifying cursor color 15. Complement 1247N/A * some of the bits, and see if they read back 1247N/A /* Save the original dac index. */ 1247N/A /* Restore the original dac index. */ 1247N/A /* Check if the software bits did complement. */ 1247N/A "green 0x%02x 0x%02x 0x%02x, " 1247N/A "blue 0x%02x 0x%02x 0x%02x\n",