Displaying 20 results from an estimated 180 matches for "pci_resource_start".
2010 Apr 12
1
[PATCHv2 1/2] fbdev: allow passing more than one aperture for handoff
...-static bool
-nouveau_fbcon_has_vesafb_or_efifb(struct drm_device *dev)
-{
- struct pci_dev *pdev = dev->pdev;
- int ramin;
-
- if (screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB &&
- screen_info.orig_video_isVGA != VIDEO_TYPE_EFI)
- return false;
-
- if (screen_info.lfb_base < pci_resource_start(pdev, 1))
- goto not_fb;
-
- if (screen_info.lfb_base + screen_info.lfb_size >=
- pci_resource_start(pdev, 1) + pci_resource_len(pdev, 1))
- goto not_fb;
-
- return true;
-not_fb:
- ramin = 2;
- if (pci_resource_len(pdev, ramin) == 0) {
- ramin = 3;
- if (pci_resource_len(pdev, ramin) ==...
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>
---
2018 Dec 07
2
next/master boot bisection: Oops in nouveau driver on jetson-tk1
.../
- 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->ranges[aper->count].size = pci_resource_len(pdev, 2);
- aper->count++;
- }
-
- if (pc...
2010 May 16
0
[PATCH v3 1/3] fbdev: allow passing more than one aperture for handoff
...-static bool
-nouveau_fbcon_has_vesafb_or_efifb(struct drm_device *dev)
-{
- struct pci_dev *pdev = dev->pdev;
- int ramin;
-
- if (screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB &&
- screen_info.orig_video_isVGA != VIDEO_TYPE_EFI)
- return false;
-
- if (screen_info.lfb_base < pci_resource_start(pdev, 1))
- goto not_fb;
-
- if (screen_info.lfb_base + screen_info.lfb_size >=
- pci_resource_start(pdev, 1) + pci_resource_len(pdev, 1))
- goto not_fb;
-
- return true;
-not_fb:
- ramin = 2;
- if (pci_resource_len(pdev, ramin) == 0) {
- ramin = 3;
- if (pci_resource_len(pdev, ramin) ==...
2010 May 16
0
[PATCH v2 2/3] fbmem, drm/nouveau: kick firmware framebuffers as soon as possible
...nfo->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)) {
- aper->ranges[aper->count].base = pci_resource_start(pdev, 2);
- aper->ranges[aper->count].size = pci_resource_len(pdev, 2);
- aper->count++;
- }
-
- if (pc...
2020 Feb 19
0
[PATCH 31/52] drm/cirrus: Fully embrace devm_
...mp;cirrus_driver, &pdev->dev);
+ ret = devm_drm_dev_init(&pdev->dev, dev, &cirrus_driver);
if (ret) {
kfree(cirrus);
- goto err_pci_release;
+ return ret;
}
dev->dev_private = cirrus;
drmm_add_final_kfree(dev, cirrus);
- ret = -ENOMEM;
- cirrus->vram = ioremap(pci_resource_start(pdev, 0),
- pci_resource_len(pdev, 0));
+ cirrus->vram = devm_ioremap(&pdev->dev, pci_resource_start(pdev, 0),
+ pci_resource_len(pdev, 0));
if (cirrus->vram == NULL)
- goto err_dev_put;
+ return -ENOMEM;
- cirrus->mmio = ioremap(pci_resource_start(pdev, 1),
-...
2020 Mar 02
1
[PATCH 30/51] drm/cirrus: Fully embrace devm_
...mp;cirrus_driver, &pdev->dev);
+ ret = devm_drm_dev_init(&pdev->dev, dev, &cirrus_driver);
if (ret) {
kfree(cirrus);
- goto err_pci_release;
+ return ret;
}
dev->dev_private = cirrus;
drmm_add_final_kfree(dev, cirrus);
- ret = -ENOMEM;
- cirrus->vram = ioremap(pci_resource_start(pdev, 0),
- pci_resource_len(pdev, 0));
+ cirrus->vram = devm_ioremap(&pdev->dev, pci_resource_start(pdev, 0),
+ pci_resource_len(pdev, 0));
if (cirrus->vram == NULL)
- goto err_dev_put;
+ return -ENOMEM;
- cirrus->mmio = ioremap(pci_resource_start(pdev, 1),
-...
2018 Dec 08
0
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...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->ranges[aper->count].size = pci_resource_len(pdev, 2);
>...
2012 Aug 19
1
[PATCH 09/10] drm/nv50/evo: store iomem pointer in properly typed field
...new(struct drm_device *dev, int chid,
kzalloc(sizeof(*evo->object->oclass->ofuncs), GFP_KERNEL);
evo->object->oclass->ofuncs->rd32 = nv50_evo_rd32;
evo->object->oclass->ofuncs->wr32 = nv50_evo_wr32;
- evo->object->oclass->ofuncs->rd08 =
- ioremap(pci_resource_start(dev->pdev, 0) +
+ evo_object->iomem = ioremap(pci_resource_start(dev->pdev, 0) +
NV50_PDISPLAY_USER(evo->handle), PAGE_SIZE);
return 0;
}
--
1.7.8.6
2015 Apr 01
2
[PATCH v2 4/4] Add virtio-vga bits.
...7,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", primary);
+
+ kfree(ap);
+}
+
int drm_virtio_init(struct drm_driver *driv...
2015 Apr 01
2
[PATCH v2 4/4] Add virtio-vga bits.
...7,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", primary);
+
+ kfree(ap);
+}
+
int drm_virtio_init(struct drm_driver *driv...
2018 Dec 10
2
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...- 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->ranges[aper->count].size = pci_reso...
2009 Apr 03
0
[PATCH] PCI: sync up the SR-IOV changes between Dom0 and upstream kernels
...EM_TYPE_32)
- goto found;
-
- i = 2;
- flags = pci_resource_flags(dev, i);
- if ((flags & PCI_BASE_ADDRESS_SPACE) ==
- PCI_BASE_ADDRESS_SPACE_MEMORY &&
- (flags & PCI_BASE_ADDRESS_MEM_TYPE_MASK) ==
- PCI_BASE_ADDRESS_MEM_TYPE_64)
- goto found;
-
- return;
-found:
- start = pci_resource_start(dev, i);
- size = pci_resource_len(dev, i);
+ start = pci_resource_start(dev, 1);
+ size = pci_resource_len(dev, 1);
if (!start || size != 0x400000 || start & (size - 1))
return;
- pci_write_config_dword(dev, 0x10 + i * 4, 0);
- pci_resource_start(dev, i) = 0;
- pci_resource_end(dev, i)...
2018 Aug 23
3
[PATCH 0/3] drm/nouveau: Fixup module probe to add ->shutdown()
This series is intended to add support for shutting down the GPU on
kernel shutdown/reboot using the ->shutdown() hook, similar to what
amdgpu does. This is mainly intended to workaround a bios issue on the
P50 that was preventing nouveau from initializing the dedicated GM107
GPU on that system properly. You can find more details on this issue in
the patch labeled "Shut down GPU on kernel
2019 Apr 09
0
[PATCH 13/15] drm/vboxvideo: Convert vboxvideo driver to Simple TTM
...(!(man->flags & TTM_MEMTYPE_FLAG_MAPPABLE))
> - return -EINVAL;
> - switch (mem->mem_type) {
> - case TTM_PL_SYSTEM:
> - /* system memory */
> - return 0;
> - case TTM_PL_VRAM:
> - mem->bus.offset = mem->start << PAGE_SHIFT;
> - mem->bus.base = pci_resource_start(vbox->ddev.pdev, 0);
> - mem->bus.is_iomem = true;
> - break;
> - default:
> - return -EINVAL;
> - }
> - return 0;
> -}
> -
> -static void vbox_ttm_io_mem_free(struct ttm_bo_device *bdev,
> - struct ttm_mem_reg *mem)
> -{
> -}
> -
> -static voi...
2014 Jun 24
0
[PATCH 1/2] x86, ia64: Move EFI_FB vga_default_device() initialization to pci_vga_fixup()
...ga_default_device()) {
> + resource_size_t start, end;
> + int i;
> +
> + /* Does firmware framebuffer belong to us? */
> + for (i=0; i < DEVICE_COUNT_RESOURCE; i++) {
> + if (!(pci_resource_flags(pdev, i) & IORESOURCE_MEM))
> + continue;
> +
> + start = pci_resource_start(pdev, i);
> + end = pci_resource_end(pdev, i);
> +
> + if (!start || !end)
> + continue;
> +
> + if (screen_info.lfb_base >= start &&
> + (screen_info.lfb_base + screen_info.lfb_size) < end)
> + vga_set_default_device(pdev);
> + }
> + }
&...
2014 Feb 01
0
[RFC 02/16] drm/nouveau: basic support for platform devices
...rs/gpu/drm/nouveau/core/engine/device/base.c
index dd01c6c..a6abb51 100644
--- a/drivers/gpu/drm/nouveau/core/engine/device/base.c
+++ b/drivers/gpu/drm/nouveau/core/engine/device/base.c
@@ -131,8 +131,8 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
if (ret)
return ret;
- mmio_base = pci_resource_start(device->pdev, 0);
- mmio_size = pci_resource_len(device->pdev, 0);
+ mmio_base = nv_device_resource_start(device, 0);
+ mmio_size = nv_device_resource_len(device, 0);
/* translate api disable mask into internal mapping */
disable = args->debug0;
@@ -446,6 +446,60 @@ nouveau_device_dt...
2019 Apr 24
0
[PATCH v2 07/17] drm/ast: Convert AST driver to VRAM MM
...0;
- mem->bus.is_iomem = false;
- if (!(man->flags & TTM_MEMTYPE_FLAG_MAPPABLE))
- return -EINVAL;
- switch (mem->mem_type) {
- case TTM_PL_SYSTEM:
- /* system memory */
- return 0;
- case TTM_PL_VRAM:
- mem->bus.offset = mem->start << PAGE_SHIFT;
- mem->bus.base = pci_resource_start(ast->dev->pdev, 0);
- mem->bus.is_iomem = true;
- break;
- default:
- return -EINVAL;
- break;
- }
- return 0;
-}
-
-static void ast_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
-{
-}
-
-static void ast_ttm_backend_destroy(struct ttm_tt *tt)
-{
- ttm_tt_fini(tt)...
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