From 674cefd4fe4b537a20a10edcb4ec5df55facca8e Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Mon, 26 Mar 2007 19:43:48 +1000 Subject: nouveau: move card initialisation into the drm The PGRAPH init for the various cards will need cleaning up at some point, a lot of the values written there are per-context state left over from the all the hardcoding done in the ddx. It's possible some cards get broken by this commit, let me know. Tested on: NV5, NV18, NV28, NV35, NV40, NV4E --- shared-core/nv10_fb.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 shared-core/nv10_fb.c (limited to 'shared-core/nv10_fb.c') diff --git a/shared-core/nv10_fb.c b/shared-core/nv10_fb.c new file mode 100644 index 00000000..e8336a2d --- /dev/null +++ b/shared-core/nv10_fb.c @@ -0,0 +1,26 @@ +#include "drmP.h" +#include "drm.h" +#include "nouveau_drv.h" +#include "nouveau_drm.h" + +int +nv10_fb_init(drm_device_t *dev) +{ + drm_nouveau_private_t *dev_priv = dev->dev_private; + uint32_t fb_bar_size; + int i; + + fb_bar_size = drm_get_resource_len(dev, 0) - 1; + for (i=0; i