Displaying 20 results from an estimated 81 matches for "nouveau_bo_unmap".
2012 Nov 25
0
[PATCH] drm/nouveau: unpin various bo's before destroying
...ff --git a/drivers/gpu/drm/nouveau/nv04_crtc.c b/drivers/gpu/drm/nouveau/nv04_crtc.c
index 82a0d9c..6578cd2 100644
--- a/drivers/gpu/drm/nouveau/nv04_crtc.c
+++ b/drivers/gpu/drm/nouveau/nv04_crtc.c
@@ -730,6 +730,7 @@ static void nv_crtc_destroy(struct drm_crtc *crtc)
drm_crtc_cleanup(crtc);
nouveau_bo_unmap(nv_crtc->cursor.nvbo);
+ nouveau_bo_unpin(nv_crtc->cursor.nvbo);
nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo);
kfree(nv_crtc);
}
@@ -1056,8 +1057,11 @@ nv04_crtc_create(struct drm_device *dev, int crtc_num)
0, 0x0000, NULL, &nv_crtc->cursor.nvbo);
if (!ret) {
r...
2009 Dec 20
1
[PATCH] nv50: remove vtxbuf stateobject after a referenced vtxbuf is mapped
- This avoids problematic "reloc'ed while mapped" messages and
some associated corruption as well.
- Also add one nouveau_bo_unmap() in the vbo code that wasn't present.
Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
---
src/gallium/drivers/nouveau/nouveau_screen.c | 21 +++++++++++++++++++++
src/gallium/drivers/nouveau/nouveau_screen.h | 3 +++
src/gallium/drivers/nouveau/nouveau_stateobj.h |...
2015 Jan 05
2
drm/nouveau: dont switch vt on suspend
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at ubuntu.com>
---
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 3ed12a8cfc91..a4a586807903 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -370,6 +370,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
ret = -ENOMEM;
goto
2009 Dec 20
2
[PATCH 1/2] nv50: don't emit reloc markers after a referenced vtxbuf is mapped
...gt;pre_pipebuffer_map_callback) {
+ ret = nscreen->pre_pipebuffer_map_callback(pscreen, pb, usage);
+ if (ret) {
+ debug_printf("pre_pipebuffer_map_callback failed %d\n",
+ ret);
+ return NULL;
+ }
+ }
+
ret = nouveau_bo_map_range(bo, offset, length, flags);
if (ret) {
+ nouveau_bo_unmap(bo);
if (!(flags & NOUVEAU_BO_NOWAIT) || ret != -EBUSY)
debug_printf("map_range failed: %d\n", ret);
return NULL;
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h b/src/gallium/drivers/nouveau/nouveau_screen.h
index ebfc67a..a7927d8 100644
--- a/src/gallium/drivers/...
2012 Nov 25
1
[PATCH] drm/nouveau: unpin pushbuffer bo before destroying it
...--- a/drivers/gpu/drm/nouveau/nouveau_chan.c
+++ b/drivers/gpu/drm/nouveau/nouveau_chan.c
@@ -76,6 +76,8 @@ nouveau_channel_del(struct nouveau_channel **pchan)
nouveau_object_del(client, NVDRM_DEVICE, chan->push.handle);
nouveau_bo_vma_del(chan->push.buffer, &chan->push.vma);
nouveau_bo_unmap(chan->push.buffer);
+ if (chan->push.buffer && chan->push.buffer->pin_refcnt)
+ nouveau_bo_unpin(chan->push.buffer);
nouveau_bo_ref(NULL, &chan->push.buffer);
kfree(chan);
}
--
1.7.12
2013 Jul 02
0
[PATCH] drm/nouveau: handle framebuffer pinning correctly
.../drm/nouveau/nouveau_fbcon.c
index ecbfe69..839b7e7 100644
--- 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 (nouv...
2009 Sep 14
1
[Nouveau-cvs] xf86-video-nv: Branch 'master'
...copy(ScrnInfoPtr pScrn)
> exa->DoneCopy(pdpix);
> FIRE_RING (pNv->chan);
>
> + /* wait for completion before continuing, avoids seeing a momentary
> + * flash of "corruption" on occasion
> + */
> + nouveau_bo_map(pNv->scanout, NOUVEAU_BO_RDWR);
> + nouveau_bo_unmap(pNv->scanout);
> +
> pScreen->DestroyPixmap(pdpix);
> pScreen->DestroyPixmap(pspix);
> }
> diff --git a/src/nv_driver.c b/src/nv_driver.c
> index 9317b5e..645895d 100644
> --- a/src/nv_driver.c
> +++ b/src/nv_driver.c
> @@ -741,6 +741,8 @@ NVPreInitDRM(ScrnI...
2009 Aug 17
2
[PATCH] kms: Fix <nv11 hardware cursor.
...rmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ struct nouveau_bo *bo = drmmode_crtc->cursor;
+ nouveau_bo_map(bo, NOUVEAU_BO_WR);
+ nv_cursor_convert_cursor(pNv->curImage, bo->map, nv_cursor_width(pNv),
+ 64, 32, fg | (0xff << 24), bg | (0xff << 24));
+ nouveau_bo_unmap(bo);
}
static void
@@ -346,6 +353,24 @@ drmmode_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
}
static void
+drmmode_load_cursor_image (xf86CrtcPtr crtc, CARD8 *image)
+{
+ NVPtr pNv = NVPTR(crtc->scrn);
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
+ drmmode_c...
2014 Jul 10
2
[PATCH v4 4/6] drm/nouveau: synchronize BOs when required
...files changed, 70 insertions(+)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
> index 67e9e8e2e2ec..47e4e8886769 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> @@ -402,6 +402,60 @@ nouveau_bo_unmap(struct nouveau_bo *nvbo)
> ttm_bo_kunmap(&nvbo->kmap);
> }
>
> +void
> +nouveau_bo_sync_for_device(struct nouveau_bo *nvbo)
> +{
> + struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev);
> + struct nouveau_device *device = nouveau_dev(drm->dev);
> + st...
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
2020 Feb 06
0
[PATCH 3/4] drm/nouveau: Remove field nvbo from struct nouveau_framebuffer
...bo->bo.offset, nvbo);
+ fb->base.width, fb->base.height, nvbo->bo.offset, nvbo);
vga_switcheroo_client_fb_set(dev->pdev, info);
return 0;
@@ -401,11 +401,11 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
out_unlock:
if (chan)
nouveau_vma_del(&fbcon->vma);
- nouveau_bo_unmap(fb->nvbo);
+ nouveau_bo_unmap(nvbo);
out_unpin:
- nouveau_bo_unpin(fb->nvbo);
+ nouveau_bo_unpin(nvbo);
out_unref:
- nouveau_bo_ref(NULL, &fb->nvbo);
+ nouveau_bo_ref(NULL, &nvbo);
out:
return ret;
}
@@ -414,14 +414,16 @@ static int
nouveau_fbcon_destroy(struct drm_device *d...
2020 Feb 06
0
[PATCH 2/4] drm/nouveau: Move struct nouveau_framebuffer.vma to struct nouveau_fbdev
...&fbcon->vma);
if (ret) {
NV_ERROR(drm, "failed to map fb into chan: %d\n", ret);
chan = NULL;
@@ -400,7 +400,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
out_unlock:
if (chan)
- nouveau_vma_del(&fb->vma);
+ nouveau_vma_del(&fbcon->vma);
nouveau_bo_unmap(fb->nvbo);
out_unpin:
nouveau_bo_unpin(fb->nvbo);
@@ -419,7 +419,7 @@ nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
drm_fb_helper_fini(&fbcon->helper);
if (nouveau_fb && nouveau_fb->nvbo) {
- nouveau_vma_del(&nouveau_fb->vma);
+...
2009 Aug 04
5
[PATCH 1/6] drm/nouveau: bo read/write wrappers for nv04_crtc.c
...tc.c | 7 ++-----
3 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index d59ffc4..442bab7 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -172,6 +172,29 @@ nouveau_bo_unmap(struct nouveau_bo *nvbo)
ttm_bo_kunmap(&nvbo->kmap);
}
+u32
+nouveau_bo_rd32(struct nouveau_bo *nvbo, unsigned index)
+{
+ bool is_iomem;
+ u32 *mem = ttm_kmap_obj_virtual(&nvbo->kmap, &is_iomem);
+ mem = &mem[index];
+ if (is_iomem)
+ return ioread32_native((void __forc...
2014 Jul 11
1
[PATCH v4 4/6] drm/nouveau: synchronize BOs when required
...gt; >>diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
> >>index 67e9e8e2e2ec..47e4e8886769 100644
> >>--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> >>+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> >>@@ -402,6 +402,60 @@ nouveau_bo_unmap(struct nouveau_bo *nvbo)
> >> ttm_bo_kunmap(&nvbo->kmap);
> >> }
> >>
> >>+void
> >>+nouveau_bo_sync_for_device(struct nouveau_bo *nvbo)
> >>+{
> >>+ struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev);
> >>+ st...
2009 Aug 17
8
drm bo accessors etc. v2
Revised patch set v2.
[PATCH 1/8] drm/nouveau: bo read/write wrappers for nv04_crtc.c
[PATCH 2/8] drm/nouveau: use bo accessors for push buffers
[PATCH 3/8] drm/nouveau: OUT_RINGp - optimize OUT_RING loops
[PATCH 4/8] drm/nv50: proper notifier_bo access in nv50_display_vblank_crtc_handler()
[PATCH 5/8] drm/nouveau: access fbcon notifier via bo accessors
[PATCH 6/8] drm/nouveau: screen_base and
2017 Nov 06
0
[PATCH] fbcon: fix NULL pointer access in nouveau_fbcon_destroy
...au_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
drm_fb_helper_unregister_fbi(&fbcon->helper);
drm_fb_helper_fini(&fbcon->helper);
- if (nouveau_fb->nvbo) {
+ if (nouveau_fb && nouveau_fb->nvbo) {
nouveau_vma_del(&nouveau_fb->vma);
nouveau_bo_unmap(nouveau_fb->nvbo);
nouveau_bo_unpin(nouveau_fb->nvbo);
--
2.14.2
2018 Jun 18
0
[PATCH 2/4] drm/nouveau: Replace drm_framebuffer_{un/reference} with put, get functions
.../nouveau/nouveau_fbcon.c
index 85c1f10bc2b6..844498c4267c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -429,7 +429,7 @@ nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
nouveau_vma_del(&nouveau_fb->vma);
nouveau_bo_unmap(nouveau_fb->nvbo);
nouveau_bo_unpin(nouveau_fb->nvbo);
- drm_framebuffer_unreference(&nouveau_fb->base);
+ drm_framebuffer_put(&nouveau_fb->base);
}
return 0;
--
2.14.4
2024 Aug 08
0
[bug report] drm/nouveau: use GEM references instead of TTMs
...isp *disp = nv50_disp(dev);
2808
2809 nv50_audio_component_fini(nouveau_drm(dev));
2810
2811 nvif_object_unmap(&disp->caps);
2812 nvif_object_dtor(&disp->caps);
2813 nv50_core_del(&disp->core);
2814
2815 nouveau_bo_unmap(disp->sync);
2816 if (disp->sync)
^^^^^^^^^^
Check for NULL
2817 nouveau_bo_unpin(disp->sync);
--> 2818 nouveau_bo_fini(disp->sync);
^^^^^^^^^^
Unchecked dereference. The patch didn't...
2009 Dec 24
1
[PATCH] nouveau: when nouveau_bo_map fails you expect it to not be mapped
...goto out;
if (!(flags & NOUVEAU_BO_NOSYNC)) {
ret = nouveau_bo_wait(bo, (flags & NOUVEAU_BO_WR),
(flags & NOUVEAU_BO_NOWAIT), 0);
if (ret)
- return ret;
+ goto out;
}
bo->map = (char *)nvbo->map + delta;
}
- return 0;
+out:
+ if (ret)
+ nouveau_bo_unmap(bo);
+ return ret;
}
void
--
1.6.6.rc4
2010 Jan 17
0
[PATCH] libdrm/nouveau: Support nested bo mapping
...= nouveau_bo(bo);
int ret;
- if (!nvbo || bo->map)
+ if (!nvbo)
return -EINVAL;
+ if(nvbo->map_count++)
+ return 0;
+
if (!nouveau_bo_allocated(nvbo)) {
if (nvbo->flags & (NOUVEAU_BO_VRAM | NOUVEAU_BO_GART)) {
ret = nouveau_bo_kalloc(nvbo, NULL);
@@ -470,6 +473,9 @@ nouveau_bo_unmap(struct nouveau_bo *bo)
{
struct nouveau_bo_priv *nvbo = nouveau_bo(bo);
+ if(--nvbo->map_count)
+ return 0;
+
if (bo->map && !nvbo->sysmem) {
struct nouveau_device_priv *nvdev = nouveau_device(bo->device);
struct drm_nouveau_gem_cpu_fini req;
diff --git a/nouveau/n...