aboutsummaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>2007-11-15 03:43:22 +0100
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>2007-11-15 03:44:01 +0100
commit2cf7ad0d9b2f265537c7030c6f93b4275cb2d051 (patch)
tree6fa40f28200f6b827a06a2efb96c0f891968027e /shared-core
parent2eee33ace5b647153a7cf20990efd12313cc8472 (diff)
nouveau: Copy the PPC bios to RAMIN on init, that lets us do proper output detection in user space.
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/nouveau_state.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c
index 35042cd6..57ae9243 100644
--- a/shared-core/nouveau_state.c
+++ b/shared-core/nouveau_state.c
@@ -285,6 +285,9 @@ nouveau_card_init(struct drm_device *dev)
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_engine *engine;
int ret;
+#if defined(__powerpc__)
+ struct device_node *dn;
+#endif
DRM_DEBUG("prev state = %d\n", dev_priv->init_state);
@@ -304,6 +307,22 @@ nouveau_card_init(struct drm_device *dev)
DRM_MEMORYBARRIER();
#endif
+#if defined(__powerpc__)
+ /* if we have an OF card, copy vbios to RAMIN */
+ dn = pci_device_to_OF_node(dev->pdev);
+ if (dn)
+ {
+ int size;
+ const uint32_t *bios = of_get_property(dn, "NVDA,BMP", &size);
+ if (bios)
+ {
+ int i;
+ for(i=0;i<size;i+=4)
+ NV_WI32(i, bios[i/4]);
+ }
+ }
+#endif
+
/* Determine exact chipset we're running on */
if (dev_priv->card_type < NV_10)
dev_priv->chipset = dev_priv->card_type;