search for: alloc_apertur

Displaying 20 results from an estimated 34 matches for "alloc_apertur".

Did you mean: alloc_apertures
2010 May 16
0
[PATCH v3 1/3] fbdev: allow passing more than one aperture for handoff
...a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c @@ -191,11 +191,16 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, /* setup aperture base/size for vesafb takeover */ - info->aperture_base = dev->mode_config.fb_base; + info->apertures = alloc_apertures(1); + if (!info->apertures) { + ret = -ENOMEM; + goto out_unpin; + } + info->apertures->ranges[0].base = dev->mode_config.fb_base; if (IS_I9XX(dev)) - info->aperture_size = pci_resource_len(dev->pdev, 2); + info->apertures->ranges[0].size = pci_resource_len(dev->p...
2010 Apr 12
1
[PATCHv2 1/2] fbdev: allow passing more than one aperture for handoff
...a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c @@ -192,11 +192,16 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, /* setup aperture base/size for vesafb takeover */ - info->aperture_base = dev->mode_config.fb_base; + info->apertures = alloc_apertures(1); + if (!info->apertures) { + ret = -ENOMEM; + goto out_unpin; + } + info->apertures->ranges[0].base = dev->mode_config.fb_base; if (IS_I9XX(dev)) - info->aperture_size = pci_resource_len(dev->pdev, 2); + info->apertures->ranges[0].size = pci_resource_len(dev->p...
2010 Apr 10
3
[PATCH 1/3] fbmem: fix aperture overlapping check
fb_do_apertures_overlap is returning wrong value when one aperture is completely whithin the other. Add generic ranges_overlap macro (probably kernel.h candidate) and use it here. Signed-off-by: Marcin Slusarz <marcin.slusarz at gmail.com> Cc: Dave Airlie <airlied at redhat.com> Cc: Peter Jones <pjones at redhat.com> Cc: Andrew Morton <akpm at linux-foundation.org> ---
2015 Apr 01
2
[PATCH v2 4/4] Add virtio-vga bits.
...u_drm_bus.c +++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c @@ -37,6 +37,26 @@ int drm_virtio_set_busid(struct drm_device *dev, struct drm_master *master) return 0; } +static void virtio_pci_kick_out_firmware_fb(struct pci_dev *pci_dev) +{ + struct apertures_struct *ap; + bool primary; + + ap = alloc_apertures(1); + if (!ap) + return; + + ap->ranges[0].base = pci_resource_start(pci_dev, 2); + ap->ranges[0].size = pci_resource_len(pci_dev, 2); + + primary = pci_dev->resource[PCI_ROM_RESOURCE].flags + & IORESOURCE_ROM_SHADOW; + + remove_conflicting_framebuffers(ap, "virtiodrmfb",...
2015 Apr 01
2
[PATCH v2 4/4] Add virtio-vga bits.
...u_drm_bus.c +++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c @@ -37,6 +37,26 @@ int drm_virtio_set_busid(struct drm_device *dev, struct drm_master *master) return 0; } +static void virtio_pci_kick_out_firmware_fb(struct pci_dev *pci_dev) +{ + struct apertures_struct *ap; + bool primary; + + ap = alloc_apertures(1); + if (!ap) + return; + + ap->ranges[0].base = pci_resource_start(pci_dev, 2); + ap->ranges[0].size = pci_resource_len(pci_dev, 2); + + primary = pci_dev->resource[PCI_ROM_RESOURCE].flags + & IORESOURCE_ROM_SHADOW; + + remove_conflicting_framebuffers(ap, "virtiodrmfb",...
2017 Nov 24
8
[PATCH 00/13] remove_conflicting_framebuffers() cleanup
This series cleans up duplicated code for replacing firmware FB driver with proper DRI driver and adds handover support to Tegra driver. The last patch is here because it uses new semantics of remove_conflicting_framebuffers() from this series. This can be considered independently, though. --- Micha? Miros?aw (13): fbdev: show fbdev number for debugging fbdev: add
2017 Nov 24
8
[PATCH 00/13] remove_conflicting_framebuffers() cleanup
This series cleans up duplicated code for replacing firmware FB driver with proper DRI driver and adds handover support to Tegra driver. The last patch is here because it uses new semantics of remove_conflicting_framebuffers() from this series. This can be considered independently, though. --- Micha? Miros?aw (13): fbdev: show fbdev number for debugging fbdev: add
2018 Sep 01
17
[PATCH v3 00/13] remove_conflicting_framebuffers() cleanup
This series cleans up duplicated code for replacing firmware FB driver with proper DRI driver and adds handover support to Tegra driver. This is a sligtly updated version of a series sent on 24 Nov 2017. --- v2: - rebased on current drm-next - dropped staging/sm750fb changes - added kernel docs for DRM helpers v3: - move kerneldoc to fbdev, where functions are implemented - split kerneldoc
2018 Sep 01
17
[PATCH v3 00/13] remove_conflicting_framebuffers() cleanup
This series cleans up duplicated code for replacing firmware FB driver with proper DRI driver and adds handover support to Tegra driver. This is a sligtly updated version of a series sent on 24 Nov 2017. --- v2: - rebased on current drm-next - dropped staging/sm750fb changes - added kernel docs for DRM helpers v3: - move kerneldoc to fbdev, where functions are implemented - split kerneldoc
2010 Jun 07
1
Building Nouveau DRM for a recent kernel (linux-2.6.35-rc1)
.../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 sa...
2018 Dec 07
2
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...re booting - * fbdev off the hardware, as there's no way to put it back. - */ - ret = nvkm_device_pci_new(pdev, NULL, "error", true, false, 0, &device); - if (ret) - return ret; - - nvkm_device_del(&device); - - /* Remove conflicting drivers (vesafb, efifb etc). */ - aper = alloc_apertures(3); - if (!aper) - return -ENOMEM; - - aper->ranges[0].base = pci_resource_start(pdev, 1); - aper->ranges[0].size = pci_resource_len(pdev, 1); - aper->count = 1; - - if (pci_resource_len(pdev, 2)) { - aper->ranges[aper->count].base = pci_resource_start(pdev, 2); - aper->range...
2010 May 16
0
[PATCH v2 2/3] fbmem, drm/nouveau: kick firmware framebuffers as soon as possible
...apertures_struct *aper; int size, ret; mode_cmd.width = surface_width; @@ -281,28 +280,12 @@ nouveau_fbcon_create(struct drm_device *dev, uint32_t fb_width, info->fix.mmio_len = pci_resource_len(pdev, 1); /* Set aperture base/size for vesafb takeover */ - aper = info->apertures = alloc_apertures(3); + info->apertures = dev_priv->apertures; if (!info->apertures) { ret = -ENOMEM; goto out_unref; } - aper->ranges[0].base = pci_resource_start(pdev, 1); - aper->ranges[0].size = pci_resource_len(pdev, 1); - aper->count = 1; - - if (pci_resource_len(pdev, 2)) { -...
2018 Dec 08
0
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...39;s no way to put it back. > - */ > - ret = nvkm_device_pci_new(pdev, NULL, "error", true, false, 0, > &device); > - if (ret) > - return ret; > - > - nvkm_device_del(&device); > - > - /* Remove conflicting drivers (vesafb, efifb etc). */ > - aper = alloc_apertures(3); > - if (!aper) > - return -ENOMEM; > - > - aper->ranges[0].base = pci_resource_start(pdev, 1); > - aper->ranges[0].size = pci_resource_len(pdev, 1); > - aper->count = 1; > - > - if (pci_resource_len(pdev, 2)) { > - aper->ranges[aper->count].base = p...
2016 Jan 11
0
[PATCH v5 11/12] drm/nouveau: Defer probe if gmux is present but its driver isn't
...*/ + if (IS_ENABLED(CONFIG_VGA_ARB) && IS_ENABLED(CONFIG_VGA_SWITCHEROO) && + apple_gmux_present() && pdev != vga_default_device() && + !vga_switcheroo_handler_flags()) + return -EPROBE_DEFER; + /* remove conflicting drivers (vesafb, efifb etc) */ aper = alloc_apertures(3); if (!aper) -- 1.8.5.2 (Apple Git-48)
2015 Apr 01
0
[PATCH v2 4/4] Add virtio-vga bits.
On Wed, Apr 01, 2015 at 03:15:30PM +0200, Gerd Hoffmann wrote: > +static void virtio_pci_kick_out_firmware_fb(struct pci_dev *pci_dev) > +{ > + struct apertures_struct *ap; > + bool primary; > + > + ap = alloc_apertures(1); > + if (!ap) > + return; > + > + ap->ranges[0].base = pci_resource_start(pci_dev, 2); > + ap->ranges[0].size = pci_resource_len(pci_dev, 2); I thought you mentioned it's better to switch to a different BAR to be compatible with stdvga? -- MST
2015 Jun 16
0
[PATCH 1/3] Add virtio-vga bits.
...u_drm_bus.c +++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c @@ -37,6 +37,26 @@ int drm_virtio_set_busid(struct drm_device *dev, struct drm_master *master) return 0; } +static void virtio_pci_kick_out_firmware_fb(struct pci_dev *pci_dev) +{ + struct apertures_struct *ap; + bool primary; + + ap = alloc_apertures(1); + if (!ap) + return; + + ap->ranges[0].base = pci_resource_start(pci_dev, 0); + ap->ranges[0].size = pci_resource_len(pci_dev, 0); + + primary = pci_dev->resource[PCI_ROM_RESOURCE].flags + & IORESOURCE_ROM_SHADOW; + + remove_conflicting_framebuffers(ap, "virtiodrmfb",...
2017 Nov 24
0
[PATCH 05/13] drm/cirrus: use simpler remove_conflicting_pci_framebuffers()
...2 100644 --- a/drivers/gpu/drm/cirrus/cirrus_drv.c +++ b/drivers/gpu/drm/cirrus/cirrus_drv.c @@ -42,33 +42,12 @@ static const struct pci_device_id pciidlist[] = { }; -static int cirrus_kick_out_firmware_fb(struct pci_dev *pdev) -{ - struct apertures_struct *ap; - bool primary = false; - - ap = alloc_apertures(1); - if (!ap) - return -ENOMEM; - - ap->ranges[0].base = pci_resource_start(pdev, 0); - ap->ranges[0].size = pci_resource_len(pdev, 0); - -#ifdef CONFIG_X86 - primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; -#endif - drm_fb_helper_remove_conflicting_frameb...
2017 Nov 24
0
[PATCH 02/13] fbdev: add remove_conflicting_pci_framebuffers()
...@ -1788,6 +1789,27 @@ int remove_conflicting_framebuffers(struct apertures_struct *a, } EXPORT_SYMBOL(remove_conflicting_framebuffers); +int remove_conflicting_pci_framebuffers(struct pci_dev *pdev, int res_id, const char *name) +{ + struct apertures_struct *ap; + bool primary = false; + + ap = alloc_apertures(1); + if (!ap) + return -ENOMEM; + + ap->ranges[0].base = pci_resource_start(pdev, res_id); + ap->ranges[0].size = pci_resource_len(pdev, res_id); +#ifdef CONFIG_X86 + primary = pdev->resource[PCI_ROM_RESOURCE].flags & + IORESOURCE_ROM_SHADOW; +#endif + remove_conflicting_frameb...
2017 Nov 24
0
[PATCH 04/13] drm/bochs: use simpler remove_conflicting_pci_framebuffers()
...st struct dev_pm_ops bochs_pm_ops = { /* ---------------------------------------------------------------------- */ /* pci interface */ -static int bochs_kick_out_firmware_fb(struct pci_dev *pdev) -{ - struct apertures_struct *ap; - - ap = alloc_apertures(1); - if (!ap) - return -ENOMEM; - - ap->ranges[0].base = pci_resource_start(pdev, 0); - ap->ranges[0].size = pci_resource_len(pdev, 0); - drm_fb_helper_remove_conflicting_framebuffers(ap, "bochsdrmfb", false); - kfree(ap); - - return 0; -} - static int bochs_pci_probe(struct pc...
2015 Jun 16
0
[PATCH 1/3] Add virtio-vga bits.
...u_drm_bus.c +++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c @@ -37,6 +37,26 @@ int drm_virtio_set_busid(struct drm_device *dev, struct drm_master *master) return 0; } +static void virtio_pci_kick_out_firmware_fb(struct pci_dev *pci_dev) +{ + struct apertures_struct *ap; + bool primary; + + ap = alloc_apertures(1); + if (!ap) + return; + + ap->ranges[0].base = pci_resource_start(pci_dev, 0); + ap->ranges[0].size = pci_resource_len(pci_dev, 0); + + primary = pci_dev->resource[PCI_ROM_RESOURCE].flags + & IORESOURCE_ROM_SHADOW; + + remove_conflicting_framebuffers(ap, "virtiodrmfb",...