[Nouveau] Building Nouveau DRM for a recent kernel (linux-2.6.35-rc1)

Sebastian Jegerås jegeras at gmail.com
Mon Jun 7 06:18:54 PDT 2010


Hello.
I had some trouble building nouveau drm for linux-2.6.35-rc1.
I investigated a bit why it failed and noticed that the fb_info-structure
had changed slightly.

Since I do not have any previous knowledge of how the driver works, I'm not
certain if this is a proper fix, but it seems to work.
I'm curious if there's a better solution, or if my solution breaks in all
other cases.

diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 8e7dc1d..3943a00 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -317,6 +317,9 @@ nouveau_fbcon_create(struct drm_device *dev,
uint32_t fb_width,
 	info->fix.mmio_len = pci_resource_len(dev->pdev, 1);

 	/* Set aperture base/size for vesafb takeover */
+
+    info->apertures = alloc_apertures(1);
+
 #if defined(__i386__) || defined(__x86_64__)
 	if (nouveau_fbcon_has_vesafb_or_efifb(dev)) {
 		/* Some NVIDIA VBIOS' are stupid and decide to put the
@@ -326,15 +329,15 @@ nouveau_fbcon_create(struct drm_device *dev,
uint32_t fb_width,
 		 * we have left is to find out lfb_base the same way
 		 * vesafb did.
 		 */
-		info->aperture_base = screen_info.lfb_base;
-		info->aperture_size = screen_info.lfb_size;
+		info->apertures->ranges->base = screen_info.lfb_base;
+		info->apertures->ranges->size = screen_info.lfb_size;
 		if (screen_info.orig_video_isVGA == VIDEO_TYPE_VLFB)
-			info->aperture_size *= 65536;
+			info->apertures->ranges->size *= 65536;
 	} else
 #endif
 	{
-		info->aperture_base = info->fix.mmio_start;
-		info->aperture_size = info->fix.mmio_len;
+		info->apertures->ranges->base = info->fix.mmio_start;
+		info->apertures->ranges->size = info->fix.mmio_len;
 	}

 	info->pixmap.size = 64*1024;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20100607/617bc7fe/attachment.html>


More information about the Nouveau mailing list