summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2014-01-23 00:15:32 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2014-01-23 00:15:32 +0000
commite2a098bb90019fde2d7b17d149ee75a46580a0bb (patch)
treefb241d3fa40fe11a912376a57c0b35504d21a642 /sys/dev
parent798bd9a6147219f5b9a2033c57f9834a9c421990 (diff)
drm/radeon: fix resume on some rs4xx boards (v2)
From Alex Deucher e46cac0111dfea1fc18a513067abc67dd38e422f in ubuntu 3.8 acf88deb8ddbb73acd1c3fa32fde51af9153227f in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/radeon/rs400.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/radeon/rs400.c b/sys/dev/pci/drm/radeon/rs400.c
index d4177402430..83822ebebf9 100644
--- a/sys/dev/pci/drm/radeon/rs400.c
+++ b/sys/dev/pci/drm/radeon/rs400.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rs400.c,v 1.1 2013/08/12 04:11:53 jsg Exp $ */
+/* $OpenBSD: rs400.c,v 1.2 2014/01/23 00:15:31 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -173,10 +173,13 @@ int rs400_gart_enable(struct radeon_device *rdev)
/* FIXME: according to doc we should set HIDE_MMCFG_BAR=0,
* AGPMODE30=0 & AGP30ENHANCED=0 in NB_CNTL */
if ((rdev->family == CHIP_RS690) || (rdev->family == CHIP_RS740)) {
- WREG32_MC(RS480_MC_MISC_CNTL,
- (RS480_GART_INDEX_REG_EN | RS690_BLOCK_GFX_D3_EN));
+ tmp = RREG32_MC(RS480_MC_MISC_CNTL);
+ tmp |= RS480_GART_INDEX_REG_EN | RS690_BLOCK_GFX_D3_EN;
+ WREG32_MC(RS480_MC_MISC_CNTL, tmp);
} else {
- WREG32_MC(RS480_MC_MISC_CNTL, RS480_GART_INDEX_REG_EN);
+ tmp = RREG32_MC(RS480_MC_MISC_CNTL);
+ tmp |= RS480_GART_INDEX_REG_EN;
+ WREG32_MC(RS480_MC_MISC_CNTL, tmp);
}
/* Enable gart */
WREG32_MC(RS480_AGP_ADDRESS_SPACE_SIZE, (RS480_GART_EN | size_reg));