1f29dbc25Smrg/* 2f29dbc25Smrg * Copyright (c) 2006-2008 Advanced Micro Devices, Inc. 3f29dbc25Smrg * 4f29dbc25Smrg * Permission is hereby granted, free of charge, to any person obtaining a 5f29dbc25Smrg * copy of this software and associated documentation files (the "Software"), 6f29dbc25Smrg * to deal in the Software without restriction, including without limitation 7f29dbc25Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8f29dbc25Smrg * and/or sell copies of the Software, and to permit persons to whom the 9f29dbc25Smrg * Software is furnished to do so, subject to the following conditions: 10f29dbc25Smrg * 11f29dbc25Smrg * The above copyright notice and this permission notice shall be included in 12f29dbc25Smrg * all copies or substantial portions of the Software. 13f29dbc25Smrg * 14f29dbc25Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15f29dbc25Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16f29dbc25Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17f29dbc25Smrg * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18f29dbc25Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19f29dbc25Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20f29dbc25Smrg * DEALINGS IN THE SOFTWARE. 21f29dbc25Smrg * 22f29dbc25Smrg * Neither the name of the Advanced Micro Devices, Inc. nor the names of its 23f29dbc25Smrg * contributors may be used to endorse or promote products derived from this 24f29dbc25Smrg * software without specific prior written permission. 25f29dbc25Smrg */ 26f29dbc25Smrg 27f29dbc25Smrg/* 28f29dbc25Smrg * This file contains routines to set modes using the VGA registers. 29f29dbc25Smrg * Since this file is for the first generation graphics unit, it interfaces 30f29dbc25Smrg * to SoftVGA registers. It works for both VSA1 and VSA2. 31f29dbc25Smrg */ 32f29dbc25Smrg 33f29dbc25Smrg/* VGA STRUCTURE */ 34f29dbc25Smrg 35f29dbc25Smrgint gu3_get_vga_active(void); 36f29dbc25Smrg 37f29dbc25Smrgint 38f29dbc25Smrggu3_get_vga_active(void) 39f29dbc25Smrg{ 40f29dbc25Smrg int data = READ_REG32(DC3_GENERAL_CFG); 41f29dbc25Smrg 42f29dbc25Smrg return (data & DC3_GCFG_VGAE) ? 1 : 0; 43f29dbc25Smrg} 44