Path: blob/master/drivers/gpu/drm/radeon/evergreen_reg.h
15113 views
/*1* Copyright 2010 Advanced Micro Devices, Inc.2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice shall be included in11* all copies or substantial portions of the Software.12*13* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL16* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR17* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,18* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR19* OTHER DEALINGS IN THE SOFTWARE.20*21* Authors: Alex Deucher22*/23#ifndef __EVERGREEN_REG_H__24#define __EVERGREEN_REG_H__2526/* evergreen */27#define EVERGREEN_VGA_MEMORY_BASE_ADDRESS 0x31028#define EVERGREEN_VGA_MEMORY_BASE_ADDRESS_HIGH 0x32429#define EVERGREEN_D3VGA_CONTROL 0x3e030#define EVERGREEN_D4VGA_CONTROL 0x3e431#define EVERGREEN_D5VGA_CONTROL 0x3e832#define EVERGREEN_D6VGA_CONTROL 0x3ec3334#define EVERGREEN_P1PLL_SS_CNTL 0x41435#define EVERGREEN_P2PLL_SS_CNTL 0x45436# define EVERGREEN_PxPLL_SS_EN (1 << 12)37/* GRPH blocks at 0x6800, 0x7400, 0x10000, 0x10c00, 0x11800, 0x12400 */38#define EVERGREEN_GRPH_ENABLE 0x680039#define EVERGREEN_GRPH_CONTROL 0x680440# define EVERGREEN_GRPH_DEPTH(x) (((x) & 0x3) << 0)41# define EVERGREEN_GRPH_DEPTH_8BPP 042# define EVERGREEN_GRPH_DEPTH_16BPP 143# define EVERGREEN_GRPH_DEPTH_32BPP 244# define EVERGREEN_GRPH_FORMAT(x) (((x) & 0x7) << 8)45/* 8 BPP */46# define EVERGREEN_GRPH_FORMAT_INDEXED 047/* 16 BPP */48# define EVERGREEN_GRPH_FORMAT_ARGB1555 049# define EVERGREEN_GRPH_FORMAT_ARGB565 150# define EVERGREEN_GRPH_FORMAT_ARGB4444 251# define EVERGREEN_GRPH_FORMAT_AI88 352# define EVERGREEN_GRPH_FORMAT_MONO16 453# define EVERGREEN_GRPH_FORMAT_BGRA5551 554/* 32 BPP */55# define EVERGREEN_GRPH_FORMAT_ARGB8888 056# define EVERGREEN_GRPH_FORMAT_ARGB2101010 157# define EVERGREEN_GRPH_FORMAT_32BPP_DIG 258# define EVERGREEN_GRPH_FORMAT_8B_ARGB2101010 359# define EVERGREEN_GRPH_FORMAT_BGRA1010102 460# define EVERGREEN_GRPH_FORMAT_8B_BGRA1010102 561# define EVERGREEN_GRPH_FORMAT_RGB111110 662# define EVERGREEN_GRPH_FORMAT_BGR101111 763# define EVERGREEN_GRPH_ARRAY_MODE(x) (((x) & 0x7) << 20)64# define EVERGREEN_GRPH_ARRAY_LINEAR_GENERAL 065# define EVERGREEN_GRPH_ARRAY_LINEAR_ALIGNED 166# define EVERGREEN_GRPH_ARRAY_1D_TILED_THIN1 267# define EVERGREEN_GRPH_ARRAY_2D_TILED_THIN1 468#define EVERGREEN_GRPH_SWAP_CONTROL 0x680c69# define EVERGREEN_GRPH_ENDIAN_SWAP(x) (((x) & 0x3) << 0)70# define EVERGREEN_GRPH_ENDIAN_NONE 071# define EVERGREEN_GRPH_ENDIAN_8IN16 172# define EVERGREEN_GRPH_ENDIAN_8IN32 273# define EVERGREEN_GRPH_ENDIAN_8IN64 374# define EVERGREEN_GRPH_RED_CROSSBAR(x) (((x) & 0x3) << 4)75# define EVERGREEN_GRPH_RED_SEL_R 076# define EVERGREEN_GRPH_RED_SEL_G 177# define EVERGREEN_GRPH_RED_SEL_B 278# define EVERGREEN_GRPH_RED_SEL_A 379# define EVERGREEN_GRPH_GREEN_CROSSBAR(x) (((x) & 0x3) << 6)80# define EVERGREEN_GRPH_GREEN_SEL_G 081# define EVERGREEN_GRPH_GREEN_SEL_B 182# define EVERGREEN_GRPH_GREEN_SEL_A 283# define EVERGREEN_GRPH_GREEN_SEL_R 384# define EVERGREEN_GRPH_BLUE_CROSSBAR(x) (((x) & 0x3) << 8)85# define EVERGREEN_GRPH_BLUE_SEL_B 086# define EVERGREEN_GRPH_BLUE_SEL_A 187# define EVERGREEN_GRPH_BLUE_SEL_R 288# define EVERGREEN_GRPH_BLUE_SEL_G 389# define EVERGREEN_GRPH_ALPHA_CROSSBAR(x) (((x) & 0x3) << 10)90# define EVERGREEN_GRPH_ALPHA_SEL_A 091# define EVERGREEN_GRPH_ALPHA_SEL_R 192# define EVERGREEN_GRPH_ALPHA_SEL_G 293# define EVERGREEN_GRPH_ALPHA_SEL_B 394#define EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS 0x681095#define EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS 0x681496# define EVERGREEN_GRPH_DFQ_ENABLE (1 << 0)97# define EVERGREEN_GRPH_SURFACE_ADDRESS_MASK 0xffffff0098#define EVERGREEN_GRPH_PITCH 0x681899#define EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS_HIGH 0x681c100#define EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS_HIGH 0x6820101#define EVERGREEN_GRPH_SURFACE_OFFSET_X 0x6824102#define EVERGREEN_GRPH_SURFACE_OFFSET_Y 0x6828103#define EVERGREEN_GRPH_X_START 0x682c104#define EVERGREEN_GRPH_Y_START 0x6830105#define EVERGREEN_GRPH_X_END 0x6834106#define EVERGREEN_GRPH_Y_END 0x6838107#define EVERGREEN_GRPH_UPDATE 0x6844108# define EVERGREEN_GRPH_SURFACE_UPDATE_PENDING (1 << 2)109# define EVERGREEN_GRPH_UPDATE_LOCK (1 << 16)110#define EVERGREEN_GRPH_FLIP_CONTROL 0x6848111# define EVERGREEN_GRPH_SURFACE_UPDATE_H_RETRACE_EN (1 << 0)112113/* CUR blocks at 0x6998, 0x7598, 0x10198, 0x10d98, 0x11998, 0x12598 */114#define EVERGREEN_CUR_CONTROL 0x6998115# define EVERGREEN_CURSOR_EN (1 << 0)116# define EVERGREEN_CURSOR_MODE(x) (((x) & 0x3) << 8)117# define EVERGREEN_CURSOR_MONO 0118# define EVERGREEN_CURSOR_24_1 1119# define EVERGREEN_CURSOR_24_8_PRE_MULT 2120# define EVERGREEN_CURSOR_24_8_UNPRE_MULT 3121# define EVERGREEN_CURSOR_2X_MAGNIFY (1 << 16)122# define EVERGREEN_CURSOR_FORCE_MC_ON (1 << 20)123# define EVERGREEN_CURSOR_URGENT_CONTROL(x) (((x) & 0x7) << 24)124# define EVERGREEN_CURSOR_URGENT_ALWAYS 0125# define EVERGREEN_CURSOR_URGENT_1_8 1126# define EVERGREEN_CURSOR_URGENT_1_4 2127# define EVERGREEN_CURSOR_URGENT_3_8 3128# define EVERGREEN_CURSOR_URGENT_1_2 4129#define EVERGREEN_CUR_SURFACE_ADDRESS 0x699c130# define EVERGREEN_CUR_SURFACE_ADDRESS_MASK 0xfffff000131#define EVERGREEN_CUR_SIZE 0x69a0132#define EVERGREEN_CUR_SURFACE_ADDRESS_HIGH 0x69a4133#define EVERGREEN_CUR_POSITION 0x69a8134#define EVERGREEN_CUR_HOT_SPOT 0x69ac135#define EVERGREEN_CUR_COLOR1 0x69b0136#define EVERGREEN_CUR_COLOR2 0x69b4137#define EVERGREEN_CUR_UPDATE 0x69b8138# define EVERGREEN_CURSOR_UPDATE_PENDING (1 << 0)139# define EVERGREEN_CURSOR_UPDATE_TAKEN (1 << 1)140# define EVERGREEN_CURSOR_UPDATE_LOCK (1 << 16)141# define EVERGREEN_CURSOR_DISABLE_MULTIPLE_UPDATE (1 << 24)142143/* LUT blocks at 0x69e0, 0x75e0, 0x101e0, 0x10de0, 0x119e0, 0x125e0 */144#define EVERGREEN_DC_LUT_RW_MODE 0x69e0145#define EVERGREEN_DC_LUT_RW_INDEX 0x69e4146#define EVERGREEN_DC_LUT_SEQ_COLOR 0x69e8147#define EVERGREEN_DC_LUT_PWL_DATA 0x69ec148#define EVERGREEN_DC_LUT_30_COLOR 0x69f0149#define EVERGREEN_DC_LUT_VGA_ACCESS_ENABLE 0x69f4150#define EVERGREEN_DC_LUT_WRITE_EN_MASK 0x69f8151#define EVERGREEN_DC_LUT_AUTOFILL 0x69fc152#define EVERGREEN_DC_LUT_CONTROL 0x6a00153#define EVERGREEN_DC_LUT_BLACK_OFFSET_BLUE 0x6a04154#define EVERGREEN_DC_LUT_BLACK_OFFSET_GREEN 0x6a08155#define EVERGREEN_DC_LUT_BLACK_OFFSET_RED 0x6a0c156#define EVERGREEN_DC_LUT_WHITE_OFFSET_BLUE 0x6a10157#define EVERGREEN_DC_LUT_WHITE_OFFSET_GREEN 0x6a14158#define EVERGREEN_DC_LUT_WHITE_OFFSET_RED 0x6a18159160#define EVERGREEN_DATA_FORMAT 0x6b00161# define EVERGREEN_INTERLEAVE_EN (1 << 0)162#define EVERGREEN_DESKTOP_HEIGHT 0x6b04163#define EVERGREEN_VLINE_START_END 0x6b08164#define EVERGREEN_VLINE_STATUS 0x6bb8165# define EVERGREEN_VLINE_STAT (1 << 12)166167#define EVERGREEN_VIEWPORT_START 0x6d70168#define EVERGREEN_VIEWPORT_SIZE 0x6d74169170/* display controller offsets used for crtc/cur/lut/grph/viewport/etc. */171#define EVERGREEN_CRTC0_REGISTER_OFFSET (0x6df0 - 0x6df0)172#define EVERGREEN_CRTC1_REGISTER_OFFSET (0x79f0 - 0x6df0)173#define EVERGREEN_CRTC2_REGISTER_OFFSET (0x105f0 - 0x6df0)174#define EVERGREEN_CRTC3_REGISTER_OFFSET (0x111f0 - 0x6df0)175#define EVERGREEN_CRTC4_REGISTER_OFFSET (0x11df0 - 0x6df0)176#define EVERGREEN_CRTC5_REGISTER_OFFSET (0x129f0 - 0x6df0)177178/* CRTC blocks at 0x6df0, 0x79f0, 0x105f0, 0x111f0, 0x11df0, 0x129f0 */179#define EVERGREEN_CRTC_V_BLANK_START_END 0x6e34180#define EVERGREEN_CRTC_CONTROL 0x6e70181# define EVERGREEN_CRTC_MASTER_EN (1 << 0)182# define EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE (1 << 24)183#define EVERGREEN_CRTC_STATUS 0x6e8c184#define EVERGREEN_CRTC_STATUS_POSITION 0x6e90185#define EVERGREEN_MASTER_UPDATE_MODE 0x6ef8186#define EVERGREEN_CRTC_UPDATE_LOCK 0x6ed4187188#define EVERGREEN_DC_GPIO_HPD_MASK 0x64b0189#define EVERGREEN_DC_GPIO_HPD_A 0x64b4190#define EVERGREEN_DC_GPIO_HPD_EN 0x64b8191#define EVERGREEN_DC_GPIO_HPD_Y 0x64bc192193#endif194195196