Sebastian Jegerås
2010-Jun-07 13:18 UTC
[Nouveau] Building Nouveau DRM for a recent kernel (linux-2.6.35-rc1)
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>
Ben Skeggs
2010-Jun-07 22:04 UTC
[Nouveau] Building Nouveau DRM for a recent kernel (linux-2.6.35-rc1)
On Mon, 2010-06-07 at 15:18 +0200, Sebastian Jeger?s wrote:> 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.This is known. I'll merge Linus' tree into ours when 2.6.35-rc3 is released probably, which will resolve this. Ben.> > 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; > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/nouveau
Possibly Parallel Threads
- [PATCH 1/3] fbmem: fix aperture overlapping check
- [PATCH v3 1/3] fbdev: allow passing more than one aperture for handoff
- [PATCHv2 1/2] fbdev: allow passing more than one aperture for handoff
- [PATCH 1/2] x86, ia64: Move EFI_FB vga_default_device() initialization to pci_vga_fixup()
- Resource map sanity check fails after GRUB "keeps" the gfx mode