search for: pci_resource_len

Displaying 20 results from an estimated 192 matches for "pci_resource_len".

2010 Apr 12
1
[PATCHv2 1/2] fbdev: allow passing more than one aperture for handoff
...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->pdev, 2); else - info->aperture_size = pci_resource_len(dev->pdev, 0); + info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0); info->fix.smem_start = dev->mode_config.fb_ba...
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> ---
2010 May 16
0
[PATCH v2 2/3] fbmem, drm/nouveau: kick firmware framebuffers as soon as possible
..._fb_cmd mode_cmd; struct pci_dev *pdev = dev->pdev; struct device *device = &pdev->dev; - struct 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-&gt...
2018 Dec 07
2
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...t;, 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 (pci_resource_len(pdev, 3)) { - aper->ranges[aper->...
2010 May 16
0
[PATCH v3 1/3] fbdev: allow passing more than one aperture for handoff
...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->pdev, 2); else - info->aperture_size = pci_resource_len(dev->pdev, 0); + info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0); info->fix.smem_start = dev->mode_config.fb_ba...
2018 Dec 08
0
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...turn 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 (pci_resource...
2018 Dec 10
2
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...ice_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++; >> - } &g...
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
2014 Feb 10
2
[PATCH] drm/nouveau: support for platform devices
....b9f4873dcb23 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,72 @@ nouveau_device_dtor(struct nouveau_object *object) nouveau_engine_d...
2020 Feb 19
0
[PATCH 31/52] drm/cirrus: Fully embrace devm_
...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), - pci_resource_len(pdev, 1)); +...
2014 Feb 12
0
[PATCH v2] drm/nouveau: support for platform devices
....8a8f5f2d0eb5 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,72 @@ nouveau_device_dtor(struct nouveau_object *object) nouveau_engine_d...
2020 Mar 02
1
[PATCH 30/51] drm/cirrus: Fully embrace devm_
...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), - pci_resource_len(pdev, 1)); +...
2015 Jun 18
1
[PATCH v2] virtio-pci: alloc only resources actually used.
Hi, > > + if (offset + length < offset || > > + offset + length > pci_resource_len(dev, bar)) { > > + dev_err(&dev->dev, > > + "virtio_pci: virtio capability %u@%u " > > + "out of range on bar %i length %lu\n", > > + length, offset, bar, > > + (unsigned long)pci_resource_len(dev, bar)); > > + return NULL; &g...
2015 Jun 18
1
[PATCH v2] virtio-pci: alloc only resources actually used.
Hi, > > + if (offset + length < offset || > > + offset + length > pci_resource_len(dev, bar)) { > > + dev_err(&dev->dev, > > + "virtio_pci: virtio capability %u@%u " > > + "out of range on bar %i length %lu\n", > > + length, offset, bar, > > + (unsigned long)pci_resource_len(dev, bar)); > > + return NULL; &g...
2014 Feb 11
2
[PATCH] drm/nouveau: support for platform devices
...return 0; >> + return res->start; >> + } >> +} >> + >> +resource_size_t >> +nv_device_resource_len(struct nouveau_device *device, unsigned int bar) >> +{ >> + if (nv_device_is_pci(device)) { >> + return pci_resource_len(device->pdev, bar); >> + } else { >> + struct resource *res; >> + res = platform_get_resource(device->platformdev, >> + IORESOURCE_MEM, bar); >> + if (!res) >> +...
2014 Feb 12
2
[PATCH v2] drm/nouveau: support for platform devices
On 12/02/14 05:38, Alexandre Courbot wrote: > Upcoming mobile Kepler GPUs (such as GK20A) use the platform bus instead > of PCI to which Nouveau is tightly dependent. This patch allows Nouveau > to handle platform devices by: > > - abstracting PCI-dependent functions that were typically used for > resource querying and page mapping, > - introducing a nv_device_is_pci()
2020 Apr 15
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...->ddev.dev_private = qdev; - drmm_add_final_kfree(&qdev->ddev, qdev); mutex_init(&qdev->gem.mutex); mutex_init(&qdev->update_area_mutex); @@ -138,8 +130,7 @@ int qxl_device_init(struct qxl_device *qdev, qdev->vram_mapping = io_mapping_create_wc(qdev->vram_base, pci_resource_len(pdev, 0)); if (!qdev->vram_mapping) { pr_err("Unable to create vram_mapping"); - r = -ENOMEM; - goto error; + return -ENOMEM; } if (pci_resource_len(pdev, 4) > 0) { @@ -293,7 +284,6 @@ int qxl_device_init(struct qxl_device *qdev, io_mapping_free(qdev->surface_mapp...
2020 Apr 15
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...->ddev.dev_private = qdev; - drmm_add_final_kfree(&qdev->ddev, qdev); mutex_init(&qdev->gem.mutex); mutex_init(&qdev->update_area_mutex); @@ -138,8 +130,7 @@ int qxl_device_init(struct qxl_device *qdev, qdev->vram_mapping = io_mapping_create_wc(qdev->vram_base, pci_resource_len(pdev, 0)); if (!qdev->vram_mapping) { pr_err("Unable to create vram_mapping"); - r = -ENOMEM; - goto error; + return -ENOMEM; } if (pci_resource_len(pdev, 4) > 0) { @@ -293,7 +284,6 @@ int qxl_device_init(struct qxl_device *qdev, io_mapping_free(qdev->surface_mapp...
2020 Apr 03
3
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
...->ddev.dev_private = qdev; - drmm_add_final_kfree(&qdev->ddev, qdev); mutex_init(&qdev->gem.mutex); mutex_init(&qdev->update_area_mutex); @@ -138,8 +130,7 @@ int qxl_device_init(struct qxl_device *qdev, qdev->vram_mapping = io_mapping_create_wc(qdev->vram_base, pci_resource_len(pdev, 0)); if (!qdev->vram_mapping) { pr_err("Unable to create vram_mapping"); - r = -ENOMEM; - goto error; + return -ENOMEM; } if (pci_resource_len(pdev, 4) > 0) { @@ -293,7 +284,6 @@ int qxl_device_init(struct qxl_device *qdev, io_mapping_free(qdev->surface_mapp...
2020 Apr 03
3
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
...->ddev.dev_private = qdev; - drmm_add_final_kfree(&qdev->ddev, qdev); mutex_init(&qdev->gem.mutex); mutex_init(&qdev->update_area_mutex); @@ -138,8 +130,7 @@ int qxl_device_init(struct qxl_device *qdev, qdev->vram_mapping = io_mapping_create_wc(qdev->vram_base, pci_resource_len(pdev, 0)); if (!qdev->vram_mapping) { pr_err("Unable to create vram_mapping"); - r = -ENOMEM; - goto error; + return -ENOMEM; } if (pci_resource_len(pdev, 4) > 0) { @@ -293,7 +284,6 @@ int qxl_device_init(struct qxl_device *qdev, io_mapping_free(qdev->surface_mapp...