summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_state.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-11-22 17:17:06 +1100
committerDave Airlie <airlied@redhat.com>2007-11-22 17:17:06 +1100
commita20587e3950f849deb1e723a0b4455a19f7b3fb8 (patch)
treede0a9d0b6558f3b359acf7985ddf4b8e7e83ee24 /shared-core/nouveau_state.c
parent8fd8bf599b42b6caa062afabdfce7385d59a7695 (diff)
parent5dc5c36e624e5393b5427a159ad34e5fc358cc9f (diff)
Merge branch 'origin' into modesetting-101
Conflicts: linux-core/drmP.h shared-core/i915_dma.c shared-core/i915_drm.h shared-core/radeon_drv.h
Diffstat (limited to 'shared-core/nouveau_state.c')
-rw-r--r--shared-core/nouveau_state.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c
index 57ae9243..7c9503e8 100644
--- a/shared-core/nouveau_state.c
+++ b/shared-core/nouveau_state.c
@@ -307,20 +307,29 @@ nouveau_card_init(struct drm_device *dev)
DRM_MEMORYBARRIER();
#endif
-#if defined(__powerpc__)
+#if defined(__linux__) && defined(__powerpc__)
/* if we have an OF card, copy vbios to RAMIN */
dn = pci_device_to_OF_node(dev->pdev);
if (dn)
{
- int size;
+ int size;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
const uint32_t *bios = of_get_property(dn, "NVDA,BMP", &size);
+#else
+ const uint32_t *bios = get_property(dn, "NVDA,BMP", &size);
+#endif
if (bios)
{
int i;
for(i=0;i<size;i+=4)
NV_WI32(i, bios[i/4]);
+ DRM_INFO("OF bios successfully copied (%d bytes)\n",size);
}
+ else
+ DRM_INFO("Unable to get the OF bios\n");
}
+ else
+ DRM_INFO("Unable to get the OF node\n");
#endif
/* Determine exact chipset we're running on */