Home | History | Annotate | Line # | Download | only in radeon
      1  1.2  riastrad /*	$NetBSD: si_reg.h,v 1.3 2021/12/18 23:45:43 riastradh Exp $	*/
      2  1.2  riastrad 
      3  1.1  riastrad /*
      4  1.1  riastrad  * Copyright 2010 Advanced Micro Devices, Inc.
      5  1.1  riastrad  *
      6  1.1  riastrad  * Permission is hereby granted, free of charge, to any person obtaining a
      7  1.1  riastrad  * copy of this software and associated documentation files (the "Software"),
      8  1.1  riastrad  * to deal in the Software without restriction, including without limitation
      9  1.1  riastrad  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
     10  1.1  riastrad  * and/or sell copies of the Software, and to permit persons to whom the
     11  1.1  riastrad  * Software is furnished to do so, subject to the following conditions:
     12  1.1  riastrad  *
     13  1.1  riastrad  * The above copyright notice and this permission notice shall be included in
     14  1.1  riastrad  * all copies or substantial portions of the Software.
     15  1.1  riastrad  *
     16  1.1  riastrad  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     17  1.1  riastrad  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     18  1.1  riastrad  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
     19  1.1  riastrad  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
     20  1.1  riastrad  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
     21  1.1  riastrad  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
     22  1.1  riastrad  * OTHER DEALINGS IN THE SOFTWARE.
     23  1.1  riastrad  *
     24  1.1  riastrad  * Authors: Alex Deucher
     25  1.1  riastrad  */
     26  1.1  riastrad #ifndef __SI_REG_H__
     27  1.1  riastrad #define __SI_REG_H__
     28  1.1  riastrad 
     29  1.1  riastrad /* SI */
     30  1.1  riastrad #define SI_DC_GPIO_HPD_MASK                      0x65b0
     31  1.1  riastrad #define SI_DC_GPIO_HPD_A                         0x65b4
     32  1.1  riastrad #define SI_DC_GPIO_HPD_EN                        0x65b8
     33  1.1  riastrad #define SI_DC_GPIO_HPD_Y                         0x65bc
     34  1.1  riastrad 
     35  1.1  riastrad #define SI_GRPH_CONTROL                          0x6804
     36  1.1  riastrad #       define SI_GRPH_DEPTH(x)                  (((x) & 0x3) << 0)
     37  1.1  riastrad #       define SI_GRPH_DEPTH_8BPP                0
     38  1.1  riastrad #       define SI_GRPH_DEPTH_16BPP               1
     39  1.1  riastrad #       define SI_GRPH_DEPTH_32BPP               2
     40  1.1  riastrad #       define SI_GRPH_NUM_BANKS(x)              (((x) & 0x3) << 2)
     41  1.1  riastrad #       define SI_ADDR_SURF_2_BANK               0
     42  1.1  riastrad #       define SI_ADDR_SURF_4_BANK               1
     43  1.1  riastrad #       define SI_ADDR_SURF_8_BANK               2
     44  1.1  riastrad #       define SI_ADDR_SURF_16_BANK              3
     45  1.1  riastrad #       define SI_GRPH_Z(x)                      (((x) & 0x3) << 4)
     46  1.1  riastrad #       define SI_GRPH_BANK_WIDTH(x)             (((x) & 0x3) << 6)
     47  1.1  riastrad #       define SI_ADDR_SURF_BANK_WIDTH_1         0
     48  1.1  riastrad #       define SI_ADDR_SURF_BANK_WIDTH_2         1
     49  1.1  riastrad #       define SI_ADDR_SURF_BANK_WIDTH_4         2
     50  1.1  riastrad #       define SI_ADDR_SURF_BANK_WIDTH_8         3
     51  1.1  riastrad #       define SI_GRPH_FORMAT(x)                 (((x) & 0x7) << 8)
     52  1.1  riastrad /* 8 BPP */
     53  1.1  riastrad #       define SI_GRPH_FORMAT_INDEXED            0
     54  1.1  riastrad /* 16 BPP */
     55  1.1  riastrad #       define SI_GRPH_FORMAT_ARGB1555           0
     56  1.1  riastrad #       define SI_GRPH_FORMAT_ARGB565            1
     57  1.1  riastrad #       define SI_GRPH_FORMAT_ARGB4444           2
     58  1.1  riastrad #       define SI_GRPH_FORMAT_AI88               3
     59  1.1  riastrad #       define SI_GRPH_FORMAT_MONO16             4
     60  1.1  riastrad #       define SI_GRPH_FORMAT_BGRA5551           5
     61  1.1  riastrad /* 32 BPP */
     62  1.1  riastrad #       define SI_GRPH_FORMAT_ARGB8888           0
     63  1.1  riastrad #       define SI_GRPH_FORMAT_ARGB2101010        1
     64  1.1  riastrad #       define SI_GRPH_FORMAT_32BPP_DIG          2
     65  1.1  riastrad #       define SI_GRPH_FORMAT_8B_ARGB2101010     3
     66  1.1  riastrad #       define SI_GRPH_FORMAT_BGRA1010102        4
     67  1.1  riastrad #       define SI_GRPH_FORMAT_8B_BGRA1010102     5
     68  1.1  riastrad #       define SI_GRPH_FORMAT_RGB111110          6
     69  1.1  riastrad #       define SI_GRPH_FORMAT_BGR101111          7
     70  1.1  riastrad #       define SI_GRPH_BANK_HEIGHT(x)            (((x) & 0x3) << 11)
     71  1.1  riastrad #       define SI_ADDR_SURF_BANK_HEIGHT_1        0
     72  1.1  riastrad #       define SI_ADDR_SURF_BANK_HEIGHT_2        1
     73  1.1  riastrad #       define SI_ADDR_SURF_BANK_HEIGHT_4        2
     74  1.1  riastrad #       define SI_ADDR_SURF_BANK_HEIGHT_8        3
     75  1.1  riastrad #       define SI_GRPH_TILE_SPLIT(x)             (((x) & 0x7) << 13)
     76  1.1  riastrad #       define SI_ADDR_SURF_TILE_SPLIT_64B       0
     77  1.1  riastrad #       define SI_ADDR_SURF_TILE_SPLIT_128B      1
     78  1.1  riastrad #       define SI_ADDR_SURF_TILE_SPLIT_256B      2
     79  1.1  riastrad #       define SI_ADDR_SURF_TILE_SPLIT_512B      3
     80  1.1  riastrad #       define SI_ADDR_SURF_TILE_SPLIT_1KB       4
     81  1.1  riastrad #       define SI_ADDR_SURF_TILE_SPLIT_2KB       5
     82  1.1  riastrad #       define SI_ADDR_SURF_TILE_SPLIT_4KB       6
     83  1.1  riastrad #       define SI_GRPH_MACRO_TILE_ASPECT(x)      (((x) & 0x3) << 18)
     84  1.1  riastrad #       define SI_ADDR_SURF_MACRO_TILE_ASPECT_1  0
     85  1.1  riastrad #       define SI_ADDR_SURF_MACRO_TILE_ASPECT_2  1
     86  1.1  riastrad #       define SI_ADDR_SURF_MACRO_TILE_ASPECT_4  2
     87  1.1  riastrad #       define SI_ADDR_SURF_MACRO_TILE_ASPECT_8  3
     88  1.1  riastrad #       define SI_GRPH_ARRAY_MODE(x)             (((x) & 0x7) << 20)
     89  1.1  riastrad #       define SI_GRPH_ARRAY_LINEAR_GENERAL      0
     90  1.1  riastrad #       define SI_GRPH_ARRAY_LINEAR_ALIGNED      1
     91  1.1  riastrad #       define SI_GRPH_ARRAY_1D_TILED_THIN1      2
     92  1.1  riastrad #       define SI_GRPH_ARRAY_2D_TILED_THIN1      4
     93  1.1  riastrad #       define SI_GRPH_PIPE_CONFIG(x)		 (((x) & 0x1f) << 24)
     94  1.1  riastrad #       define SI_ADDR_SURF_P2			 0
     95  1.1  riastrad #       define SI_ADDR_SURF_P4_8x16		 4
     96  1.1  riastrad #       define SI_ADDR_SURF_P4_16x16		 5
     97  1.1  riastrad #       define SI_ADDR_SURF_P4_16x32		 6
     98  1.1  riastrad #       define SI_ADDR_SURF_P4_32x32		 7
     99  1.1  riastrad #       define SI_ADDR_SURF_P8_16x16_8x16	 8
    100  1.1  riastrad #       define SI_ADDR_SURF_P8_16x32_8x16	 9
    101  1.1  riastrad #       define SI_ADDR_SURF_P8_32x32_8x16	 10
    102  1.1  riastrad #       define SI_ADDR_SURF_P8_16x32_16x16	 11
    103  1.1  riastrad #       define SI_ADDR_SURF_P8_32x32_16x16	 12
    104  1.1  riastrad #       define SI_ADDR_SURF_P8_32x32_16x32	 13
    105  1.1  riastrad #       define SI_ADDR_SURF_P8_32x64_32x32	 14
    106  1.1  riastrad 
    107  1.1  riastrad #endif
    108