search for: apertures_struct

Displaying 20 results from an estimated 30 matches for "apertures_struct".

2010 May 16
0
[PATCH v2 2/3] fbmem, drm/nouveau: kick firmware framebuffers as soon as possible
...drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index ace630a..59641eb 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -621,6 +621,8 @@ struct drm_nouveau_private { struct { struct dentry *channel_root; } debugfs; + + struct apertures_struct *apertures; }; static inline struct drm_nouveau_private * diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 6b2d5ab..660746b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -194,7 +194,6 @@...
2010 Apr 12
1
[PATCHv2 1/2] fbdev: allow passing more than one aperture for handoff
...create(struct drm_device *dev, uint32_t fb_width, struct nouveau_framebuffer *nouveau_fb; struct nouveau_bo *nvbo; struct drm_mode_fb_cmd mode_cmd; - struct device *device = &dev->pdev->dev; + struct pci_dev *pdev = dev->pdev; + struct device *device = &pdev->dev; + struct apertures_struct *aper; int size, ret; mode_cmd.width = surface_width; @@ -314,28 +278,30 @@ nouveau_fbcon_create(struct drm_device *dev, uint32_t fb_width, drm_fb_helper_fill_var(info, fb, fb_width, fb_height); /* FIXME: we really shouldn't expose mmio space at all */ - info->fix.mmio_start = pc...
2010 May 16
0
[PATCH v2 3/3] vga16fb, drm: vga16fb->drm handoff
...es changed, 38 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index 3efc339..83c6c6b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c @@ -666,11 +666,16 @@ static struct apertures_struct *nouveau_get_apertures(struct drm_device *dev) static int nouveau_remove_conflicting_drivers(struct drm_device *dev) { struct drm_nouveau_private *dev_priv = dev->dev_private; + bool primary = false; dev_priv->apertures = nouveau_get_apertures(dev); if (!dev_priv->apertures) ret...
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> ---
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
2017 Nov 24
0
[PATCH 02/13] fbdev: add remove_conflicting_pci_framebuffers()
...dev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -34,6 +34,7 @@ #include <linux/fb.h> #include <linux/fbcon.h> #include <linux/mem_encrypt.h> +#include <linux/pci.h> #include <asm/fb.h> @@ -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...
2018 Sep 01
0
[PATCH v3 04/13] fbdev: add remove_conflicting_pci_framebuffers()
...dev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -34,6 +34,7 @@ #include <linux/fb.h> #include <linux/fbcon.h> #include <linux/mem_encrypt.h> +#include <linux/pci.h> #include <asm/fb.h> @@ -1812,6 +1813,40 @@ int remove_conflicting_framebuffers(struct apertures_struct *a, } EXPORT_SYMBOL(remove_conflicting_framebuffers); +/** + * remove_conflicting_pci_framebuffers - remove firmware-configured framebuffers for PCI devices + * @pdev: PCI device + * @resource_id: index of PCI BAR configuring framebuffer memory + * @name: requesting driver name + * + * This fun...
2010 May 16
0
[PATCH v3 1/3] fbdev: allow passing more than one aperture for handoff
...create(struct drm_device *dev, uint32_t fb_width, struct nouveau_framebuffer *nouveau_fb; struct nouveau_bo *nvbo; struct drm_mode_fb_cmd mode_cmd; - struct device *device = &dev->pdev->dev; + struct pci_dev *pdev = dev->pdev; + struct device *device = &pdev->dev; + struct apertures_struct *aper; int size, ret; mode_cmd.width = surface_width; @@ -313,28 +277,30 @@ nouveau_fbcon_create(struct drm_device *dev, uint32_t fb_width, drm_fb_helper_fill_var(info, fb, fb_width, fb_height); /* FIXME: we really shouldn't expose mmio space at all */ - info->fix.mmio_start = pc...
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
2017 Nov 27
2
[PATCH 02/13] fbdev: add remove_conflicting_pci_framebuffers()
...re/fbmem.c > @@ -34,6 +34,7 @@ > #include <linux/fb.h> > #include <linux/fbcon.h> > #include <linux/mem_encrypt.h> > +#include <linux/pci.h> > > #include <asm/fb.h> > > @@ -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)...
2017 Nov 27
2
[PATCH 02/13] fbdev: add remove_conflicting_pci_framebuffers()
...re/fbmem.c > @@ -34,6 +34,7 @@ > #include <linux/fb.h> > #include <linux/fbcon.h> > #include <linux/mem_encrypt.h> > +#include <linux/pci.h> > > #include <asm/fb.h> > > @@ -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)...
2015 Apr 01
2
[PATCH v2 4/4] Add virtio-vga bits.
...12d5 100644 --- a/drivers/gpu/drm/virtio/virtgpu_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_conflicti...
2015 Apr 01
2
[PATCH v2 4/4] Add virtio-vga bits.
...12d5 100644 --- a/drivers/gpu/drm/virtio/virtgpu_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_conflicti...
2010 Jul 20
2
[PATCH] vga16fb: refuse to load in face of other driver controlling primary card
We don't want vga16fb to mess with hardware initialized by other driver. Detect it and refuse to load. It fixes nouveau interrupt storm on some machines. Signed-off-by: Marcin Slusarz <marcin.slusarz at gmail.com> --- drivers/video/vga16fb.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c index
2018 Dec 07
2
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...uveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -458,75 +458,8 @@ nouveau_accel_init(struct nouveau_drm *drm) nouveau_bo_move_init(drm); } -static int nouveau_drm_probe(struct pci_dev *pdev, - const struct pci_device_id *pent) -{ - struct nvkm_device *device; - struct apertures_struct *aper; - bool boot = false; - int ret; - - if (vga_switcheroo_client_probe_defer(pdev)) - return -EPROBE_DEFER; - - /* We need to check that the chipset is supported before booting - * fbdev off the hardware, as there's no way to put it back. - */ - ret = nvkm_device_pci_new(pdev, NULL, &quo...
2018 Dec 08
0
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...veau/nouveau_drm.c > @@ -458,75 +458,8 @@ nouveau_accel_init(struct nouveau_drm *drm) > nouveau_bo_move_init(drm); > } > > -static int nouveau_drm_probe(struct pci_dev *pdev, > - const struct pci_device_id *pent) > -{ > - struct nvkm_device *device; > - struct apertures_struct *aper; > - bool boot = false; > - int ret; > - > - if (vga_switcheroo_client_probe_defer(pdev)) > - return -EPROBE_DEFER; > - > - /* We need to check that the chipset is supported before booting > - * fbdev off the hardware, as there's no way to put it back. > - */...
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 t...
2015 Jun 16
0
[PATCH 1/3] Add virtio-vga bits.
...3916 100644 --- a/drivers/gpu/drm/virtio/virtgpu_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_conflicti...