Commit fbb55663 authored by Alex Deucher's avatar Alex Deucher

drm/radeon/7xx: add support for golden register init

Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2e1b65f9
...@@ -205,6 +205,653 @@ int rv770_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk) ...@@ -205,6 +205,653 @@ int rv770_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk)
return 0; return 0;
} }
static const u32 r7xx_golden_registers[] =
{
0x8d00, 0xffffffff, 0x0e0e0074,
0x8d04, 0xffffffff, 0x013a2b34,
0x9508, 0xffffffff, 0x00000002,
0x8b20, 0xffffffff, 0,
0x88c4, 0xffffffff, 0x000000c2,
0x28350, 0xffffffff, 0,
0x9058, 0xffffffff, 0x0fffc40f,
0x240c, 0xffffffff, 0x00000380,
0x733c, 0xffffffff, 0x00000002,
0x2650, 0x00040000, 0,
0x20bc, 0x00040000, 0,
0x7300, 0xffffffff, 0x001000f0
};
static const u32 r7xx_golden_dyn_gpr_registers[] =
{
0x8db0, 0xffffffff, 0x98989898,
0x8db4, 0xffffffff, 0x98989898,
0x8db8, 0xffffffff, 0x98989898,
0x8dbc, 0xffffffff, 0x98989898,
0x8dc0, 0xffffffff, 0x98989898,
0x8dc4, 0xffffffff, 0x98989898,
0x8dc8, 0xffffffff, 0x98989898,
0x8dcc, 0xffffffff, 0x98989898,
0x88c4, 0xffffffff, 0x00000082
};
static const u32 rv770_golden_registers[] =
{
0x562c, 0xffffffff, 0,
0x3f90, 0xffffffff, 0,
0x9148, 0xffffffff, 0,
0x3f94, 0xffffffff, 0,
0x914c, 0xffffffff, 0,
0x9698, 0x18000000, 0x18000000
};
static const u32 rv770ce_golden_registers[] =
{
0x562c, 0xffffffff, 0,
0x3f90, 0xffffffff, 0x00cc0000,
0x9148, 0xffffffff, 0x00cc0000,
0x3f94, 0xffffffff, 0x00cc0000,
0x914c, 0xffffffff, 0x00cc0000,
0x9b7c, 0xffffffff, 0x00fa0000,
0x3f8c, 0xffffffff, 0x00fa0000,
0x9698, 0x18000000, 0x18000000
};
static const u32 rv770_mgcg_init[] =
{
0x8bcc, 0xffffffff, 0x130300f9,
0x5448, 0xffffffff, 0x100,
0x55e4, 0xffffffff, 0x100,
0x160c, 0xffffffff, 0x100,
0x5644, 0xffffffff, 0x100,
0xc164, 0xffffffff, 0x100,
0x8a18, 0xffffffff, 0x100,
0x897c, 0xffffffff, 0x8000100,
0x8b28, 0xffffffff, 0x3c000100,
0x9144, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x10000,
0x9a50, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x10001,
0x9a50, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x10002,
0x9a50, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x10003,
0x9a50, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x0,
0x9870, 0xffffffff, 0x100,
0x8d58, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x0,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x1,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x2,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x3,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x4,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x5,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x6,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x7,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x8,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x9,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x8000,
0x9490, 0xffffffff, 0x0,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x1,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x2,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x3,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x4,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x5,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x6,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x7,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x8,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x9,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x8000,
0x9604, 0xffffffff, 0x0,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x1,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x2,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x3,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x4,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x5,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x6,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x7,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x8,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x9,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x80000000,
0x9030, 0xffffffff, 0x100,
0x9034, 0xffffffff, 0x100,
0x9038, 0xffffffff, 0x100,
0x903c, 0xffffffff, 0x100,
0x9040, 0xffffffff, 0x100,
0xa200, 0xffffffff, 0x100,
0xa204, 0xffffffff, 0x100,
0xa208, 0xffffffff, 0x100,
0xa20c, 0xffffffff, 0x100,
0x971c, 0xffffffff, 0x100,
0x915c, 0xffffffff, 0x00020001,
0x9160, 0xffffffff, 0x00040003,
0x916c, 0xffffffff, 0x00060005,
0x9170, 0xffffffff, 0x00080007,
0x9174, 0xffffffff, 0x000a0009,
0x9178, 0xffffffff, 0x000c000b,
0x917c, 0xffffffff, 0x000e000d,
0x9180, 0xffffffff, 0x0010000f,
0x918c, 0xffffffff, 0x00120011,
0x9190, 0xffffffff, 0x00140013,
0x9194, 0xffffffff, 0x00020001,
0x9198, 0xffffffff, 0x00040003,
0x919c, 0xffffffff, 0x00060005,
0x91a8, 0xffffffff, 0x00080007,
0x91ac, 0xffffffff, 0x000a0009,
0x91b0, 0xffffffff, 0x000c000b,
0x91b4, 0xffffffff, 0x000e000d,
0x91b8, 0xffffffff, 0x0010000f,
0x91c4, 0xffffffff, 0x00120011,
0x91c8, 0xffffffff, 0x00140013,
0x91cc, 0xffffffff, 0x00020001,
0x91d0, 0xffffffff, 0x00040003,
0x91d4, 0xffffffff, 0x00060005,
0x91e0, 0xffffffff, 0x00080007,
0x91e4, 0xffffffff, 0x000a0009,
0x91e8, 0xffffffff, 0x000c000b,
0x91ec, 0xffffffff, 0x00020001,
0x91f0, 0xffffffff, 0x00040003,
0x91f4, 0xffffffff, 0x00060005,
0x9200, 0xffffffff, 0x00080007,
0x9204, 0xffffffff, 0x000a0009,
0x9208, 0xffffffff, 0x000c000b,
0x920c, 0xffffffff, 0x000e000d,
0x9210, 0xffffffff, 0x0010000f,
0x921c, 0xffffffff, 0x00120011,
0x9220, 0xffffffff, 0x00140013,
0x9224, 0xffffffff, 0x00020001,
0x9228, 0xffffffff, 0x00040003,
0x922c, 0xffffffff, 0x00060005,
0x9238, 0xffffffff, 0x00080007,
0x923c, 0xffffffff, 0x000a0009,
0x9240, 0xffffffff, 0x000c000b,
0x9244, 0xffffffff, 0x000e000d,
0x9248, 0xffffffff, 0x0010000f,
0x9254, 0xffffffff, 0x00120011,
0x9258, 0xffffffff, 0x00140013,
0x925c, 0xffffffff, 0x00020001,
0x9260, 0xffffffff, 0x00040003,
0x9264, 0xffffffff, 0x00060005,
0x9270, 0xffffffff, 0x00080007,
0x9274, 0xffffffff, 0x000a0009,
0x9278, 0xffffffff, 0x000c000b,
0x927c, 0xffffffff, 0x000e000d,
0x9280, 0xffffffff, 0x0010000f,
0x928c, 0xffffffff, 0x00120011,
0x9290, 0xffffffff, 0x00140013,
0x9294, 0xffffffff, 0x00020001,
0x929c, 0xffffffff, 0x00040003,
0x92a0, 0xffffffff, 0x00060005,
0x92a4, 0xffffffff, 0x00080007
};
static const u32 rv710_golden_registers[] =
{
0x3f90, 0x00ff0000, 0x00fc0000,
0x9148, 0x00ff0000, 0x00fc0000,
0x3f94, 0x00ff0000, 0x00fc0000,
0x914c, 0x00ff0000, 0x00fc0000,
0xb4c, 0x00000020, 0x00000020,
0xa180, 0xffffffff, 0x00003f3f
};
static const u32 rv710_mgcg_init[] =
{
0x8bcc, 0xffffffff, 0x13030040,
0x5448, 0xffffffff, 0x100,
0x55e4, 0xffffffff, 0x100,
0x160c, 0xffffffff, 0x100,
0x5644, 0xffffffff, 0x100,
0xc164, 0xffffffff, 0x100,
0x8a18, 0xffffffff, 0x100,
0x897c, 0xffffffff, 0x8000100,
0x8b28, 0xffffffff, 0x3c000100,
0x9144, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x10000,
0x9a50, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x0,
0x9870, 0xffffffff, 0x100,
0x8d58, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x0,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x1,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x8000,
0x9490, 0xffffffff, 0x0,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x1,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x8000,
0x9604, 0xffffffff, 0x0,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x1,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x80000000,
0x9030, 0xffffffff, 0x100,
0x9034, 0xffffffff, 0x100,
0x9038, 0xffffffff, 0x100,
0x903c, 0xffffffff, 0x100,
0x9040, 0xffffffff, 0x100,
0xa200, 0xffffffff, 0x100,
0xa204, 0xffffffff, 0x100,
0xa208, 0xffffffff, 0x100,
0xa20c, 0xffffffff, 0x100,
0x971c, 0xffffffff, 0x100,
0x915c, 0xffffffff, 0x00020001,
0x9174, 0xffffffff, 0x00000003,
0x9178, 0xffffffff, 0x00050001,
0x917c, 0xffffffff, 0x00030002,
0x918c, 0xffffffff, 0x00000004,
0x9190, 0xffffffff, 0x00070006,
0x9194, 0xffffffff, 0x00050001,
0x9198, 0xffffffff, 0x00030002,
0x91a8, 0xffffffff, 0x00000004,
0x91ac, 0xffffffff, 0x00070006,
0x91e8, 0xffffffff, 0x00000001,
0x9294, 0xffffffff, 0x00000001,
0x929c, 0xffffffff, 0x00000002,
0x92a0, 0xffffffff, 0x00040003,
0x9150, 0xffffffff, 0x4d940000
};
static const u32 rv730_golden_registers[] =
{
0x3f90, 0x00ff0000, 0x00f00000,
0x9148, 0x00ff0000, 0x00f00000,
0x3f94, 0x00ff0000, 0x00f00000,
0x914c, 0x00ff0000, 0x00f00000,
0x900c, 0xffffffff, 0x003b033f,
0xb4c, 0x00000020, 0x00000020,
0xa180, 0xffffffff, 0x00003f3f
};
static const u32 rv730_mgcg_init[] =
{
0x8bcc, 0xffffffff, 0x130300f9,
0x5448, 0xffffffff, 0x100,
0x55e4, 0xffffffff, 0x100,
0x160c, 0xffffffff, 0x100,
0x5644, 0xffffffff, 0x100,
0xc164, 0xffffffff, 0x100,
0x8a18, 0xffffffff, 0x100,
0x897c, 0xffffffff, 0x8000100,
0x8b28, 0xffffffff, 0x3c000100,
0x9144, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x10000,
0x9a50, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x10001,
0x9a50, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x0,
0x9870, 0xffffffff, 0x100,
0x8d58, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x0,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x1,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x2,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x3,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x4,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x5,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x6,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x7,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x8000,
0x9490, 0xffffffff, 0x0,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x1,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x2,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x3,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x4,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x5,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x6,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x7,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x8000,
0x9604, 0xffffffff, 0x0,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x1,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x2,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x3,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x4,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x5,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x6,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x7,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x80000000,
0x9030, 0xffffffff, 0x100,
0x9034, 0xffffffff, 0x100,
0x9038, 0xffffffff, 0x100,
0x903c, 0xffffffff, 0x100,
0x9040, 0xffffffff, 0x100,
0xa200, 0xffffffff, 0x100,
0xa204, 0xffffffff, 0x100,
0xa208, 0xffffffff, 0x100,
0xa20c, 0xffffffff, 0x100,
0x971c, 0xffffffff, 0x100,
0x915c, 0xffffffff, 0x00020001,
0x916c, 0xffffffff, 0x00040003,
0x9170, 0xffffffff, 0x00000005,
0x9178, 0xffffffff, 0x00050001,
0x917c, 0xffffffff, 0x00030002,
0x918c, 0xffffffff, 0x00000004,
0x9190, 0xffffffff, 0x00070006,
0x9194, 0xffffffff, 0x00050001,
0x9198, 0xffffffff, 0x00030002,
0x91a8, 0xffffffff, 0x00000004,
0x91ac, 0xffffffff, 0x00070006,
0x91b0, 0xffffffff, 0x00050001,
0x91b4, 0xffffffff, 0x00030002,
0x91c4, 0xffffffff, 0x00000004,
0x91c8, 0xffffffff, 0x00070006,
0x91cc, 0xffffffff, 0x00050001,
0x91d0, 0xffffffff, 0x00030002,
0x91e0, 0xffffffff, 0x00000004,
0x91e4, 0xffffffff, 0x00070006,
0x91e8, 0xffffffff, 0x00000001,
0x91ec, 0xffffffff, 0x00050001,
0x91f0, 0xffffffff, 0x00030002,
0x9200, 0xffffffff, 0x00000004,
0x9204, 0xffffffff, 0x00070006,
0x9208, 0xffffffff, 0x00050001,
0x920c, 0xffffffff, 0x00030002,
0x921c, 0xffffffff, 0x00000004,
0x9220, 0xffffffff, 0x00070006,
0x9224, 0xffffffff, 0x00050001,
0x9228, 0xffffffff, 0x00030002,
0x9238, 0xffffffff, 0x00000004,
0x923c, 0xffffffff, 0x00070006,
0x9240, 0xffffffff, 0x00050001,
0x9244, 0xffffffff, 0x00030002,
0x9254, 0xffffffff, 0x00000004,
0x9258, 0xffffffff, 0x00070006,
0x9294, 0xffffffff, 0x00000001,
0x929c, 0xffffffff, 0x00000002,
0x92a0, 0xffffffff, 0x00040003,
0x92a4, 0xffffffff, 0x00000005
};
static const u32 rv740_golden_registers[] =
{
0x88c4, 0xffffffff, 0x00000082,
0x28a50, 0xfffffffc, 0x00000004,
0x2650, 0x00040000, 0,
0x20bc, 0x00040000, 0,
0x733c, 0xffffffff, 0x00000002,
0x7300, 0xffffffff, 0x001000f0,
0x3f90, 0x00ff0000, 0,
0x9148, 0x00ff0000, 0,
0x3f94, 0x00ff0000, 0,
0x914c, 0x00ff0000, 0,
0x240c, 0xffffffff, 0x00000380,
0x8a14, 0x00000007, 0x00000007,
0x8b24, 0xffffffff, 0x00ff0fff,
0x28a4c, 0xffffffff, 0x00004000,
0xa180, 0xffffffff, 0x00003f3f,
0x8d00, 0xffffffff, 0x0e0e003a,
0x8d04, 0xffffffff, 0x013a0e2a,
0x8c00, 0xffffffff, 0xe400000f,
0x8db0, 0xffffffff, 0x98989898,
0x8db4, 0xffffffff, 0x98989898,
0x8db8, 0xffffffff, 0x98989898,
0x8dbc, 0xffffffff, 0x98989898,
0x8dc0, 0xffffffff, 0x98989898,
0x8dc4, 0xffffffff, 0x98989898,
0x8dc8, 0xffffffff, 0x98989898,
0x8dcc, 0xffffffff, 0x98989898,
0x9058, 0xffffffff, 0x0fffc40f,
0x900c, 0xffffffff, 0x003b033f,
0x28350, 0xffffffff, 0,
0x8cf0, 0x1fffffff, 0x08e00420,
0x9508, 0xffffffff, 0x00000002,
0x88c4, 0xffffffff, 0x000000c2,
0x9698, 0x18000000, 0x18000000
};
static const u32 rv740_mgcg_init[] =
{
0x8bcc, 0xffffffff, 0x13030100,
0x5448, 0xffffffff, 0x100,
0x55e4, 0xffffffff, 0x100,
0x160c, 0xffffffff, 0x100,
0x5644, 0xffffffff, 0x100,
0xc164, 0xffffffff, 0x100,
0x8a18, 0xffffffff, 0x100,
0x897c, 0xffffffff, 0x100,
0x8b28, 0xffffffff, 0x100,
0x9144, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x10000,
0x9a50, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x10001,
0x9a50, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x10002,
0x9a50, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x10003,
0x9a50, 0xffffffff, 0x100,
0x9a1c, 0xffffffff, 0x0,
0x9870, 0xffffffff, 0x100,
0x8d58, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x0,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x1,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x2,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x3,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x4,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x5,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x6,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x7,
0x9510, 0xffffffff, 0x100,
0x9500, 0xffffffff, 0x8000,
0x9490, 0xffffffff, 0x0,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x1,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x2,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x3,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x4,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x5,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x6,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x7,
0x949c, 0xffffffff, 0x100,
0x9490, 0xffffffff, 0x8000,
0x9604, 0xffffffff, 0x0,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x1,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x2,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x3,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x4,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x5,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x6,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x7,
0x9654, 0xffffffff, 0x100,
0x9604, 0xffffffff, 0x80000000,
0x9030, 0xffffffff, 0x100,
0x9034, 0xffffffff, 0x100,
0x9038, 0xffffffff, 0x100,
0x903c, 0xffffffff, 0x100,
0x9040, 0xffffffff, 0x100,
0xa200, 0xffffffff, 0x100,
0xa204, 0xffffffff, 0x100,
0xa208, 0xffffffff, 0x100,
0xa20c, 0xffffffff, 0x100,
0x971c, 0xffffffff, 0x100,
0x915c, 0xffffffff, 0x00020001,
0x9160, 0xffffffff, 0x00040003,
0x916c, 0xffffffff, 0x00060005,
0x9170, 0xffffffff, 0x00080007,
0x9174, 0xffffffff, 0x000a0009,
0x9178, 0xffffffff, 0x000c000b,
0x917c, 0xffffffff, 0x000e000d,
0x9180, 0xffffffff, 0x0010000f,
0x918c, 0xffffffff, 0x00120011,
0x9190, 0xffffffff, 0x00140013,
0x9194, 0xffffffff, 0x00020001,
0x9198, 0xffffffff, 0x00040003,
0x919c, 0xffffffff, 0x00060005,
0x91a8, 0xffffffff, 0x00080007,
0x91ac, 0xffffffff, 0x000a0009,
0x91b0, 0xffffffff, 0x000c000b,
0x91b4, 0xffffffff, 0x000e000d,
0x91b8, 0xffffffff, 0x0010000f,
0x91c4, 0xffffffff, 0x00120011,
0x91c8, 0xffffffff, 0x00140013,
0x91cc, 0xffffffff, 0x00020001,
0x91d0, 0xffffffff, 0x00040003,
0x91d4, 0xffffffff, 0x00060005,
0x91e0, 0xffffffff, 0x00080007,
0x91e4, 0xffffffff, 0x000a0009,
0x91e8, 0xffffffff, 0x000c000b,
0x91ec, 0xffffffff, 0x00020001,
0x91f0, 0xffffffff, 0x00040003,
0x91f4, 0xffffffff, 0x00060005,
0x9200, 0xffffffff, 0x00080007,
0x9204, 0xffffffff, 0x000a0009,
0x9208, 0xffffffff, 0x000c000b,
0x920c, 0xffffffff, 0x000e000d,
0x9210, 0xffffffff, 0x0010000f,
0x921c, 0xffffffff, 0x00120011,
0x9220, 0xffffffff, 0x00140013,
0x9224, 0xffffffff, 0x00020001,
0x9228, 0xffffffff, 0x00040003,
0x922c, 0xffffffff, 0x00060005,
0x9238, 0xffffffff, 0x00080007,
0x923c, 0xffffffff, 0x000a0009,
0x9240, 0xffffffff, 0x000c000b,
0x9244, 0xffffffff, 0x000e000d,
0x9248, 0xffffffff, 0x0010000f,
0x9254, 0xffffffff, 0x00120011,
0x9258, 0xffffffff, 0x00140013,
0x9294, 0xffffffff, 0x00020001,
0x929c, 0xffffffff, 0x00040003,
0x92a0, 0xffffffff, 0x00060005,
0x92a4, 0xffffffff, 0x00080007
};
static void rv770_init_golden_registers(struct radeon_device *rdev)
{
switch (rdev->family) {
case CHIP_RV770:
radeon_program_register_sequence(rdev,
r7xx_golden_registers,
(const u32)ARRAY_SIZE(r7xx_golden_registers));
radeon_program_register_sequence(rdev,
r7xx_golden_dyn_gpr_registers,
(const u32)ARRAY_SIZE(r7xx_golden_dyn_gpr_registers));
if (rdev->pdev->device == 0x994e)
radeon_program_register_sequence(rdev,
rv770ce_golden_registers,
(const u32)ARRAY_SIZE(rv770ce_golden_registers));
else
radeon_program_register_sequence(rdev,
rv770_golden_registers,
(const u32)ARRAY_SIZE(rv770_golden_registers));
radeon_program_register_sequence(rdev,
rv770_mgcg_init,
(const u32)ARRAY_SIZE(rv770_mgcg_init));
break;
case CHIP_RV730:
radeon_program_register_sequence(rdev,
r7xx_golden_registers,
(const u32)ARRAY_SIZE(r7xx_golden_registers));
radeon_program_register_sequence(rdev,
r7xx_golden_dyn_gpr_registers,
(const u32)ARRAY_SIZE(r7xx_golden_dyn_gpr_registers));
radeon_program_register_sequence(rdev,
rv730_golden_registers,
(const u32)ARRAY_SIZE(rv770_golden_registers));
radeon_program_register_sequence(rdev,
rv730_mgcg_init,
(const u32)ARRAY_SIZE(rv770_mgcg_init));
break;
case CHIP_RV710:
radeon_program_register_sequence(rdev,
r7xx_golden_registers,
(const u32)ARRAY_SIZE(r7xx_golden_registers));
radeon_program_register_sequence(rdev,
r7xx_golden_dyn_gpr_registers,
(const u32)ARRAY_SIZE(r7xx_golden_dyn_gpr_registers));
radeon_program_register_sequence(rdev,
rv710_golden_registers,
(const u32)ARRAY_SIZE(rv770_golden_registers));
radeon_program_register_sequence(rdev,
rv710_mgcg_init,
(const u32)ARRAY_SIZE(rv770_mgcg_init));
break;
case CHIP_RV740:
radeon_program_register_sequence(rdev,
rv740_golden_registers,
(const u32)ARRAY_SIZE(rv770_golden_registers));
radeon_program_register_sequence(rdev,
rv740_mgcg_init,
(const u32)ARRAY_SIZE(rv770_mgcg_init));
break;
default:
break;
}
}
#define PCIE_BUS_CLK 10000 #define PCIE_BUS_CLK 10000
#define TCLK (PCIE_BUS_CLK / 10) #define TCLK (PCIE_BUS_CLK / 10)
...@@ -1390,6 +2037,9 @@ int rv770_resume(struct radeon_device *rdev) ...@@ -1390,6 +2037,9 @@ int rv770_resume(struct radeon_device *rdev)
/* post card */ /* post card */
atom_asic_init(rdev->mode_info.atom_context); atom_asic_init(rdev->mode_info.atom_context);
/* init golden registers */
rv770_init_golden_registers(rdev);
rdev->accel_working = true; rdev->accel_working = true;
r = rv770_startup(rdev); r = rv770_startup(rdev);
if (r) { if (r) {
...@@ -1447,6 +2097,8 @@ int rv770_init(struct radeon_device *rdev) ...@@ -1447,6 +2097,8 @@ int rv770_init(struct radeon_device *rdev)
DRM_INFO("GPU not posted. posting now...\n"); DRM_INFO("GPU not posted. posting now...\n");
atom_asic_init(rdev->mode_info.atom_context); atom_asic_init(rdev->mode_info.atom_context);
} }
/* init golden registers */
rv770_init_golden_registers(rdev);
/* Initialize scratch registers */ /* Initialize scratch registers */
r600_scratch_init(rdev); r600_scratch_init(rdev);
/* Initialize surface registers */ /* Initialize surface registers */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment