Displaying 20 results from an estimated 30 matches for "out_unref".
2009 Sep 07
1
[PATCH] drm/nouveau: fix ref leak in nouveau_gem_pushbuf_validate()
...;
@@ -296,28 +330,15 @@ retry:
}
for (i = 0, b = pbbo; i < nr_buffers; i++, b++) {
- struct drm_gem_object *gem;
-
- gem = drm_gem_object_lookup(dev, file_priv, b->handle);
- if (!gem) {
- NV_ERROR(dev, "Unknown handle 0x%08x\n", b->handle);
- ret = -EINVAL;
- goto out_unref;
- }
- nvbo = gem->driver_private;
-
- ret = ttm_bo_reserve(&nvbo->bo, false, false, true,
- chan->fence.sequence);
- if (ret) {
+ ret = nouveau_gem_pushbuf_lookup_and_reserve(chan, file_priv,
+ b, &nvbo);
+ if (ret == -EAGAIN) {
nouveau_gem_pushbuf_backoff...
2018 Dec 12
0
[PATCH v2 18/18] drm/qxl: remove dead qxl fbdev emulation code
...ed_size);
- return -ENOMEM;
- }
- qbo = gem_to_qxl_bo(gobj);
-
- qbo->surf.width = mode_cmd->width;
- qbo->surf.height = mode_cmd->height;
- qbo->surf.stride = mode_cmd->pitches[0];
- qbo->surf.format = SPICE_SURFACE_FMT_32_xRGB;
-
- ret = qxl_bo_pin(qbo);
- if (ret) {
- goto out_unref;
- }
- ret = qxl_bo_kmap(qbo, NULL);
-
- if (ret)
- goto out_unref;
-
- *gobj_p = gobj;
- return 0;
-out_unref:
- qxlfb_destroy_pinned_object(gobj);
- *gobj_p = NULL;
- return ret;
-}
-
-/*
- * FIXME
- * It should not be necessary to have a special dirty() callback for fbdev.
- */
-static int qxlf...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...itches[0] *
- mode_cmd.height, 0, NOUVEAU_GEM_DOMAIN_VRAM,
- 0, 0x0000, &nvbo);
- if (ret) {
- NV_ERROR(drm, "failed to allocate framebuffer\n");
- goto out;
- }
-
- ret = nouveau_framebuffer_new(dev, &mode_cmd, &nvbo->bo.base, &fb);
- if (ret)
- goto out_unref;
-
- ret = nouveau_bo_pin(nvbo, NOUVEAU_GEM_DOMAIN_VRAM, false);
- if (ret) {
- NV_ERROR(drm, "failed to pin fb: %d\n", ret);
- goto out_unref;
- }
-
- ret = nouveau_bo_map(nvbo);
- if (ret) {
- NV_ERROR(drm, "failed to map fb: %d\n", ret);
- goto out_unpin;
- }
-
- chan = n...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...; - if (ret) {
> - NV_ERROR(drm, "failed to allocate framebuffer\n");
> - goto out;
> - }
> -
> - ret = nouveau_framebuffer_new(dev, &mode_cmd, &nvbo->bo.base, &fb);
> - if (ret)
> - goto out_unref;
> -
> - ret = nouveau_bo_pin(nvbo, NOUVEAU_GEM_DOMAIN_VRAM, false);
> - if (ret) {
> - NV_ERROR(drm, "failed to pin fb: %d\n", ret);
> - goto out_unref;
> - }
> -
> - ret = nouveau_bo_map(nvbo);
> - if (...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...; - NV_ERROR(drm, "failed to allocate framebuffer\n");
>> - goto out;
>> - }
>> -
>> - ret = nouveau_framebuffer_new(dev, &mode_cmd, &nvbo->bo.base, &fb);
>> - if (ret)
>> - goto out_unref;
>> -
>> - ret = nouveau_bo_pin(nvbo, NOUVEAU_GEM_DOMAIN_VRAM, false);
>> - if (ret) {
>> - NV_ERROR(drm, "failed to pin fb: %d\n", ret);
>> - goto out_unref;
>> - }
>> -
>> - ret = nouveau...
2023 Jan 10
1
[PATCH v2] drm/nouveau: Remove file nouveau_fbcon.c
...itches[0] *
- mode_cmd.height, 0, NOUVEAU_GEM_DOMAIN_VRAM,
- 0, 0x0000, &nvbo);
- if (ret) {
- NV_ERROR(drm, "failed to allocate framebuffer\n");
- goto out;
- }
-
- ret = nouveau_framebuffer_new(dev, &mode_cmd, &nvbo->bo.base, &fb);
- if (ret)
- goto out_unref;
-
- ret = nouveau_bo_pin(nvbo, NOUVEAU_GEM_DOMAIN_VRAM, false);
- if (ret) {
- NV_ERROR(drm, "failed to pin fb: %d\n", ret);
- goto out_unref;
- }
-
- ret = nouveau_bo_map(nvbo);
- if (ret) {
- NV_ERROR(drm, "failed to map fb: %d\n", ret);
- goto out_unpin;
- }
-
- chan = n...
2010 Apr 12
1
[PATCHv2 1/2] fbdev: allow passing more than one aperture for handoff
..._video_isVGA == VIDEO_TYPE_VLFB)
- info->aperture_size *= 65536;
- } else
-#endif
- {
- info->aperture_base = info->fix.mmio_start;
- info->aperture_size = info->fix.mmio_len;
+ aper = info->apertures = alloc_apertures(3);
+ 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_reso...
2013 Jul 02
0
[PATCH] drm/nouveau: handle framebuffer pinning correctly
...a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -385,6 +385,7 @@ out_unlock:
mutex_unlock(&dev->struct_mutex);
if (chan)
nouveau_bo_vma_del(nvbo, &fbcon->nouveau_fb.vma);
+ nouveau_bo_unmap(nvbo);
out_unpin:
nouveau_bo_unpin(nvbo);
out_unref:
@@ -415,6 +416,12 @@ nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
}
if (nouveau_fb->nvbo) {
+ struct drm_crtc *crtc;
+
+ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
+ if (nouveau_framebuffer(crtc->fb) == nouveau_fb)
+ nouveau...
2010 May 16
0
[PATCH v3 1/3] fbdev: allow passing more than one aperture for handoff
..._video_isVGA == VIDEO_TYPE_VLFB)
- info->aperture_size *= 65536;
- } else
-#endif
- {
- info->aperture_base = info->fix.mmio_start;
- info->aperture_size = info->fix.mmio_len;
+ aper = info->apertures = alloc_apertures(3);
+ 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_reso...
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>
---
2020 Feb 06
0
[PATCH 3/4] drm/nouveau: Remove field nvbo from struct nouveau_framebuffer
...ivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -335,7 +335,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
goto out;
}
- ret = nouveau_framebuffer_new(dev, &mode_cmd, nvbo, &fb);
+ ret = nouveau_framebuffer_new(dev, &mode_cmd, &nvbo->bo.base, &fb);
if (ret)
goto out_unref;
@@ -376,12 +376,12 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
FBINFO_HWACCEL_FILLRECT |
FBINFO_HWACCEL_IMAGEBLIT;
info->fbops = &nouveau_fbcon_sw_ops;
- info->fix.smem_start = fb->nvbo->bo.mem.bus.base +
- fb->nvbo->bo.mem.bus.offse...
2010 Mar 10
34
[Patch RFC] nouveau accelerated on Xen pv-ops kernel
...P | VM_DONTEXPAND;
+ vma->vm_flags |= VM_RESERVED | VM_MIXEDMAP | VM_DONTEXPAND;
+ if (!((bo->mem.placement & TTM_PL_MASK_MEM) & TTM_PL_FLAG_TT))
+ vma->vm_flags |= VM_IO;
+ vma->vm_page_prot = vma_get_vm_prot(vma->vm_flags);
return 0;
out_unref:
ttm_bo_unref(&bo);
This patch is necessary because, in Xen, PFN of a page is virtualised.
So physical addresses
for DMA programming needs to use the MFN. Xen transparently does the
correct translation
using the _PAGE_IOMEM prot-bit in the PTE. If the bit is set, then Xen
assumes that...
2010 Mar 10
34
[Patch RFC] nouveau accelerated on Xen pv-ops kernel
...P | VM_DONTEXPAND;
+ vma->vm_flags |= VM_RESERVED | VM_MIXEDMAP | VM_DONTEXPAND;
+ if (!((bo->mem.placement & TTM_PL_MASK_MEM) & TTM_PL_FLAG_TT))
+ vma->vm_flags |= VM_IO;
+ vma->vm_page_prot = vma_get_vm_prot(vma->vm_flags);
return 0;
out_unref:
ttm_bo_unref(&bo);
This patch is necessary because, in Xen, PFN of a page is virtualised.
So physical addresses
for DMA programming needs to use the MFN. Xen transparently does the
correct translation
using the _PAGE_IOMEM prot-bit in the PTE. If the bit is set, then Xen
assumes that...
2010 May 16
0
[PATCH v2 2/3] fbmem, drm/nouveau: kick firmware framebuffers as soon as possible
...truct 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)) {
- aper->ranges[aper->count].base = pci_resource_start(pdev, 2);
- aper->ranges[aper->count].size = pci_reso...
2020 Feb 06
5
[PATCH 0/4] drm/nouveau: Remove struct nouveau_framebuffer
All fields in struct nouveau_framebuffer appear to be obsolete. The
data structure can be replaced by struct drm_framebuffer entirely.
Patch 1 removes several unused fields from struct nouveau_framebuffer.
Patch 2 moves the field vma to struct nouveau_fbdev. The information
in vma is only relevant for fbdev emulation, and as such he field is
only used there.
Patch 3 removes nvbo from struct
2018 Apr 26
0
[Intel-gfx] [PATCH] drm/core: Remove drm_dev_unref() and it's uses
...drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> index ab50090d066c..716187a07227 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> @@ -613,7 +613,7 @@ static int etnaviv_bind(struct device *dev)
> out_bind:
> kfree(priv);
> out_unref:
> - drm_dev_unref(drm);
> + drm_dev_put(drm);
>
> return ret;
> }
> @@ -630,7 +630,7 @@ static void etnaviv_unbind(struct device *dev)
> drm->dev_private = NULL;
> kfree(priv);
>
> - drm_dev_unref(drm);
> + drm_dev_put(drm);
> }
>
> stati...
2018 Apr 26
5
[PATCH] drm/core: Remove drm_dev_unref() and it's uses
...a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
index ab50090d066c..716187a07227 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
@@ -613,7 +613,7 @@ static int etnaviv_bind(struct device *dev)
out_bind:
kfree(priv);
out_unref:
- drm_dev_unref(drm);
+ drm_dev_put(drm);
return ret;
}
@@ -630,7 +630,7 @@ static void etnaviv_unbind(struct device *dev)
drm->dev_private = NULL;
kfree(priv);
- drm_dev_unref(drm);
+ drm_dev_put(drm);
}
static const struct component_master_ops etnaviv_master_ops = {
diff --git...
2018 Apr 26
5
[PATCH] drm/core: Remove drm_dev_unref() and it's uses
...a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
index ab50090d066c..716187a07227 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
@@ -613,7 +613,7 @@ static int etnaviv_bind(struct device *dev)
out_bind:
kfree(priv);
out_unref:
- drm_dev_unref(drm);
+ drm_dev_put(drm);
return ret;
}
@@ -630,7 +630,7 @@ static void etnaviv_unbind(struct device *dev)
drm->dev_private = NULL;
kfree(priv);
- drm_dev_unref(drm);
+ drm_dev_put(drm);
}
static const struct component_master_ops etnaviv_master_ops = {
diff --git...
2018 Apr 26
5
[PATCH] drm/core: Remove drm_dev_unref() and it's uses
...a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
index ab50090d066c..716187a07227 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
@@ -613,7 +613,7 @@ static int etnaviv_bind(struct device *dev)
out_bind:
kfree(priv);
out_unref:
- drm_dev_unref(drm);
+ drm_dev_put(drm);
return ret;
}
@@ -630,7 +630,7 @@ static void etnaviv_unbind(struct device *dev)
drm->dev_private = NULL;
kfree(priv);
- drm_dev_unref(drm);
+ drm_dev_put(drm);
}
static const struct component_master_ops etnaviv_master_ops = {
diff --git...
2019 Apr 24
21
[PATCH v2 00/17] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each
other. The implementation is always the same; except for the name of
some data structures.
As recently discussed, this patch set provides generic memory-management
code for simple framebuffers with dedicated video memory. It further
converts the respective drivers to the generic code. The shared code
is basically the same