162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright 2010 Advanced Micro Devices, Inc. 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 562306a36Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 662306a36Sopenharmony_ci * to deal in the Software without restriction, including without limitation 762306a36Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 862306a36Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 962306a36Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 1062306a36Sopenharmony_ci * 1162306a36Sopenharmony_ci * The above copyright notice and this permission notice shall be included in 1262306a36Sopenharmony_ci * all copies or substantial portions of the Software. 1362306a36Sopenharmony_ci * 1462306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1562306a36Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1662306a36Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1762306a36Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 1862306a36Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1962306a36Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2062306a36Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE. 2162306a36Sopenharmony_ci * 2262306a36Sopenharmony_ci * Authors: Alex Deucher 2362306a36Sopenharmony_ci */ 2462306a36Sopenharmony_ci#ifndef __SI_REG_H__ 2562306a36Sopenharmony_ci#define __SI_REG_H__ 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci/* SI */ 2862306a36Sopenharmony_ci#define SI_DC_GPIO_HPD_MASK 0x65b0 2962306a36Sopenharmony_ci#define SI_DC_GPIO_HPD_A 0x65b4 3062306a36Sopenharmony_ci#define SI_DC_GPIO_HPD_EN 0x65b8 3162306a36Sopenharmony_ci#define SI_DC_GPIO_HPD_Y 0x65bc 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci#define SI_GRPH_CONTROL 0x6804 3462306a36Sopenharmony_ci# define SI_GRPH_DEPTH(x) (((x) & 0x3) << 0) 3562306a36Sopenharmony_ci# define SI_GRPH_DEPTH_8BPP 0 3662306a36Sopenharmony_ci# define SI_GRPH_DEPTH_16BPP 1 3762306a36Sopenharmony_ci# define SI_GRPH_DEPTH_32BPP 2 3862306a36Sopenharmony_ci# define SI_GRPH_NUM_BANKS(x) (((x) & 0x3) << 2) 3962306a36Sopenharmony_ci# define SI_ADDR_SURF_2_BANK 0 4062306a36Sopenharmony_ci# define SI_ADDR_SURF_4_BANK 1 4162306a36Sopenharmony_ci# define SI_ADDR_SURF_8_BANK 2 4262306a36Sopenharmony_ci# define SI_ADDR_SURF_16_BANK 3 4362306a36Sopenharmony_ci# define SI_GRPH_Z(x) (((x) & 0x3) << 4) 4462306a36Sopenharmony_ci# define SI_GRPH_BANK_WIDTH(x) (((x) & 0x3) << 6) 4562306a36Sopenharmony_ci# define SI_ADDR_SURF_BANK_WIDTH_1 0 4662306a36Sopenharmony_ci# define SI_ADDR_SURF_BANK_WIDTH_2 1 4762306a36Sopenharmony_ci# define SI_ADDR_SURF_BANK_WIDTH_4 2 4862306a36Sopenharmony_ci# define SI_ADDR_SURF_BANK_WIDTH_8 3 4962306a36Sopenharmony_ci# define SI_GRPH_FORMAT(x) (((x) & 0x7) << 8) 5062306a36Sopenharmony_ci/* 8 BPP */ 5162306a36Sopenharmony_ci# define SI_GRPH_FORMAT_INDEXED 0 5262306a36Sopenharmony_ci/* 16 BPP */ 5362306a36Sopenharmony_ci# define SI_GRPH_FORMAT_ARGB1555 0 5462306a36Sopenharmony_ci# define SI_GRPH_FORMAT_ARGB565 1 5562306a36Sopenharmony_ci# define SI_GRPH_FORMAT_ARGB4444 2 5662306a36Sopenharmony_ci# define SI_GRPH_FORMAT_AI88 3 5762306a36Sopenharmony_ci# define SI_GRPH_FORMAT_MONO16 4 5862306a36Sopenharmony_ci# define SI_GRPH_FORMAT_BGRA5551 5 5962306a36Sopenharmony_ci/* 32 BPP */ 6062306a36Sopenharmony_ci# define SI_GRPH_FORMAT_ARGB8888 0 6162306a36Sopenharmony_ci# define SI_GRPH_FORMAT_ARGB2101010 1 6262306a36Sopenharmony_ci# define SI_GRPH_FORMAT_32BPP_DIG 2 6362306a36Sopenharmony_ci# define SI_GRPH_FORMAT_8B_ARGB2101010 3 6462306a36Sopenharmony_ci# define SI_GRPH_FORMAT_BGRA1010102 4 6562306a36Sopenharmony_ci# define SI_GRPH_FORMAT_8B_BGRA1010102 5 6662306a36Sopenharmony_ci# define SI_GRPH_FORMAT_RGB111110 6 6762306a36Sopenharmony_ci# define SI_GRPH_FORMAT_BGR101111 7 6862306a36Sopenharmony_ci# define SI_GRPH_BANK_HEIGHT(x) (((x) & 0x3) << 11) 6962306a36Sopenharmony_ci# define SI_ADDR_SURF_BANK_HEIGHT_1 0 7062306a36Sopenharmony_ci# define SI_ADDR_SURF_BANK_HEIGHT_2 1 7162306a36Sopenharmony_ci# define SI_ADDR_SURF_BANK_HEIGHT_4 2 7262306a36Sopenharmony_ci# define SI_ADDR_SURF_BANK_HEIGHT_8 3 7362306a36Sopenharmony_ci# define SI_GRPH_TILE_SPLIT(x) (((x) & 0x7) << 13) 7462306a36Sopenharmony_ci# define SI_ADDR_SURF_TILE_SPLIT_64B 0 7562306a36Sopenharmony_ci# define SI_ADDR_SURF_TILE_SPLIT_128B 1 7662306a36Sopenharmony_ci# define SI_ADDR_SURF_TILE_SPLIT_256B 2 7762306a36Sopenharmony_ci# define SI_ADDR_SURF_TILE_SPLIT_512B 3 7862306a36Sopenharmony_ci# define SI_ADDR_SURF_TILE_SPLIT_1KB 4 7962306a36Sopenharmony_ci# define SI_ADDR_SURF_TILE_SPLIT_2KB 5 8062306a36Sopenharmony_ci# define SI_ADDR_SURF_TILE_SPLIT_4KB 6 8162306a36Sopenharmony_ci# define SI_GRPH_MACRO_TILE_ASPECT(x) (((x) & 0x3) << 18) 8262306a36Sopenharmony_ci# define SI_ADDR_SURF_MACRO_TILE_ASPECT_1 0 8362306a36Sopenharmony_ci# define SI_ADDR_SURF_MACRO_TILE_ASPECT_2 1 8462306a36Sopenharmony_ci# define SI_ADDR_SURF_MACRO_TILE_ASPECT_4 2 8562306a36Sopenharmony_ci# define SI_ADDR_SURF_MACRO_TILE_ASPECT_8 3 8662306a36Sopenharmony_ci# define SI_GRPH_ARRAY_MODE(x) (((x) & 0x7) << 20) 8762306a36Sopenharmony_ci# define SI_GRPH_ARRAY_LINEAR_GENERAL 0 8862306a36Sopenharmony_ci# define SI_GRPH_ARRAY_LINEAR_ALIGNED 1 8962306a36Sopenharmony_ci# define SI_GRPH_ARRAY_1D_TILED_THIN1 2 9062306a36Sopenharmony_ci# define SI_GRPH_ARRAY_2D_TILED_THIN1 4 9162306a36Sopenharmony_ci# define SI_GRPH_PIPE_CONFIG(x) (((x) & 0x1f) << 24) 9262306a36Sopenharmony_ci# define SI_ADDR_SURF_P2 0 9362306a36Sopenharmony_ci# define SI_ADDR_SURF_P4_8x16 4 9462306a36Sopenharmony_ci# define SI_ADDR_SURF_P4_16x16 5 9562306a36Sopenharmony_ci# define SI_ADDR_SURF_P4_16x32 6 9662306a36Sopenharmony_ci# define SI_ADDR_SURF_P4_32x32 7 9762306a36Sopenharmony_ci# define SI_ADDR_SURF_P8_16x16_8x16 8 9862306a36Sopenharmony_ci# define SI_ADDR_SURF_P8_16x32_8x16 9 9962306a36Sopenharmony_ci# define SI_ADDR_SURF_P8_32x32_8x16 10 10062306a36Sopenharmony_ci# define SI_ADDR_SURF_P8_16x32_16x16 11 10162306a36Sopenharmony_ci# define SI_ADDR_SURF_P8_32x32_16x16 12 10262306a36Sopenharmony_ci# define SI_ADDR_SURF_P8_32x32_16x32 13 10362306a36Sopenharmony_ci# define SI_ADDR_SURF_P8_32x64_32x32 14 10462306a36Sopenharmony_ci 10562306a36Sopenharmony_ci#endif 106