mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
drm/radeon: add some additional 6xx/7xx/EG register init
commit b866d1334b
upstream.
- SMX_SAR_CTL0 needs to be programmed correctly to prevent
problems with memory exports in certain cases.
- VC_ENHANCE needs to be initialized on 6xx/7xx.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2a82d9e11a
commit
789ed2afd3
6 changed files with 13 additions and 1 deletions
|
@ -2210,6 +2210,9 @@ static void evergreen_gpu_init(struct radeon_device *rdev)
|
|||
smx_dc_ctl0 |= NUMBER_OF_SETS(rdev->config.evergreen.sx_num_of_sets);
|
||||
WREG32(SMX_DC_CTL0, smx_dc_ctl0);
|
||||
|
||||
if (rdev->family <= CHIP_SUMO2)
|
||||
WREG32(SMX_SAR_CTL0, 0x00010000);
|
||||
|
||||
WREG32(SX_EXPORT_BUFFER_SIZES, (COLOR_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_size / 4) - 1) |
|
||||
POSITION_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_pos_size / 4) - 1) |
|
||||
SMX_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_smx_size / 4) - 1)));
|
||||
|
|
|
@ -273,6 +273,7 @@
|
|||
#define SCRATCH_UMSK 0x8540
|
||||
#define SCRATCH_ADDR 0x8544
|
||||
|
||||
#define SMX_SAR_CTL0 0xA008
|
||||
#define SMX_DC_CTL0 0xA020
|
||||
#define USE_HASH_FUNCTION (1 << 0)
|
||||
#define NUMBER_OF_SETS(x) ((x) << 1)
|
||||
|
|
|
@ -1906,6 +1906,7 @@ void r600_gpu_init(struct radeon_device *rdev)
|
|||
WREG32(PA_CL_ENHANCE, (CLIP_VTX_REORDER_ENA |
|
||||
NUM_CLIP_SEQ(3)));
|
||||
WREG32(PA_SC_ENHANCE, FORCE_EOV_MAX_CLK_CNT(4095));
|
||||
WREG32(VC_ENHANCE, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -483,6 +483,7 @@
|
|||
#define TC_L2_SIZE(x) ((x)<<5)
|
||||
#define L2_DISABLE_LATE_HIT (1<<9)
|
||||
|
||||
#define VC_ENHANCE 0x9714
|
||||
|
||||
#define VGT_CACHE_INVALIDATION 0x88C4
|
||||
#define CACHE_INVALIDATION(x) ((x)<<0)
|
||||
|
|
|
@ -782,6 +782,9 @@ static void rv770_gpu_init(struct radeon_device *rdev)
|
|||
ACK_FLUSH_CTL(3) |
|
||||
SYNC_FLUSH_CTL));
|
||||
|
||||
if (rdev->family != CHIP_RV770)
|
||||
WREG32(SMX_SAR_CTL0, 0x00003f3f);
|
||||
|
||||
db_debug3 = RREG32(DB_DEBUG3);
|
||||
db_debug3 &= ~DB_CLK_OFF_DELAY(0x1f);
|
||||
switch (rdev->family) {
|
||||
|
@ -960,7 +963,7 @@ static void rv770_gpu_init(struct radeon_device *rdev)
|
|||
|
||||
WREG32(PA_CL_ENHANCE, (CLIP_VTX_REORDER_ENA |
|
||||
NUM_CLIP_SEQ(3)));
|
||||
|
||||
WREG32(VC_ENHANCE, 0);
|
||||
}
|
||||
|
||||
void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc)
|
||||
|
|
|
@ -208,6 +208,7 @@
|
|||
#define SCRATCH_UMSK 0x8540
|
||||
#define SCRATCH_ADDR 0x8544
|
||||
|
||||
#define SMX_SAR_CTL0 0xA008
|
||||
#define SMX_DC_CTL0 0xA020
|
||||
#define USE_HASH_FUNCTION (1 << 0)
|
||||
#define CACHE_DEPTH(x) ((x) << 1)
|
||||
|
@ -307,6 +308,8 @@
|
|||
#define TCP_CNTL 0x9610
|
||||
#define TCP_CHAN_STEER 0x9614
|
||||
|
||||
#define VC_ENHANCE 0x9714
|
||||
|
||||
#define VGT_CACHE_INVALIDATION 0x88C4
|
||||
#define CACHE_INVALIDATION(x) ((x)<<0)
|
||||
#define VC_ONLY 0
|
||||
|
|
Loading…
Reference in a new issue