From 2cf7ad0d9b2f265537c7030c6f93b4275cb2d051 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Thu, 15 Nov 2007 03:43:22 +0100 Subject: [PATCH] nouveau: Copy the PPC bios to RAMIN on init, that lets us do proper output detection in user space. --- shared-core/nouveau_state.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c index 35042cd..57ae924 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;icard_type < NV_10) dev_priv->chipset = dev_priv->card_type; -- 2.7.4