aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>2007-10-28 01:59:11 +0200
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>2007-10-28 01:59:39 +0200
commitcc745fcc3a16cb1ffc2ab578155dc880b862f95a (patch)
tree7af0d35c20853cbc588ddc843e674a50a5ec660c
parent1e2a2bababf3fbaa0a665983856761c2284dba30 (diff)
nouveau: don't touch PMC_BOOT_1 on x86, it seems to be undefined on some early cards.
-rw-r--r--shared-core/nouveau_state.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c
index add2d598..c617bfd3 100644
--- a/shared-core/nouveau_state.c
+++ b/shared-core/nouveau_state.c
@@ -283,11 +283,13 @@ nouveau_card_init(struct drm_device *dev)
ret = nouveau_init_card_mappings(dev);
if (ret) return ret;
+#if defined(__powerpc__)
/* Put the card in BE mode if it's not */
if (NV_READ(NV03_PMC_BOOT_1))
NV_WRITE(NV03_PMC_BOOT_1,0x00000001);
DRM_MEMORYBARRIER();
+#endif
/* Determine exact chipset we're running on */
if (dev_priv->card_type < NV_10)
@@ -431,8 +433,10 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
reg0 = readl(regs+NV03_PMC_BOOT_0);
reg1 = readl(regs+NV03_PMC_BOOT_1);
+#if defined(__powerpc__)
if (reg1)
reg0=___swab32(reg0);
+#endif
/* We're dealing with >=NV10 */
if ((reg0 & 0x0f000000) > 0 ) {