search for: nouveau_bo_move_ntfy

Displaying 20 results from an estimated 34 matches for "nouveau_bo_move_ntfy".

2012 Nov 21
2
[PATCH] drm/nouveau: fix takedown in move_notify
...-by: Maarten Lankhorst <maarten.lankhorst at canonical.com> --- diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 35ac57f..e8a47f0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1139,12 +1139,22 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) if (bo->destroy != nouveau_bo_del_ttm) return; + if (!new_mem) { + while (!list_empty(&nvbo->vma_list)) { + vma = list_first_entry(&nvbo->vma_list, struct nouveau_vma, head); + + nouveau_vm_unmap(vma); + nouve...
2013 Sep 02
0
[PATCH] drm/nv50-: fix tiled memory layout checks
...4, 0x90b5, nvc0_bo_move_copy, nvc0_bo_copy_init }, { "COPY", 0, 0x85b5, nva3_bo_move_copy, nv50_bo_move_init }, { "CRYPT", 0, 0x74c1, nv84_bo_move_exec, nv50_bo_move_init }, { "M2MF", 0, 0x9039, nvc0_bo_move_m2mf, nvc0_bo_m2mf_init }, @@ -1166,13 +1164,23 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) { struct nouveau_bo *nvbo = nouveau_bo(bo); struct nouveau_vma *vma; + struct ttm_mem_reg *old_mem = &bo->mem; /* ttm can now (stupidly) pass the driver bos it didn't create... */ if (bo->destroy != nouveau_bo_del_t...
2017 Nov 11
11
[Bug 103689] New: there is an exploitable page fault that can be reliably triggered from the chromium sandbox can possibly lead to remote attackers causing a denial of service condition or possibly running system code.
...0:01:00.0: fifo: gr engine fault on channel 8, recovering... Nov 10 11:24:57 nitro kernel: [ 216.884429] ------------[ cut here ]------------ Nov 10 11:24:57 nitro kernel: [ 216.884467] WARNING: CPU: 2 PID: 1032 at /build/linux-hwe-lyR8gz/linux-hwe-4.10.0/drivers/gpu/drm/nouveau/nouveau_bo.c:1212 nouveau_bo_move_ntfy+0xa3/0xb0 [nouveau] Nov 10 11:24:57 nitro kernel: [ 216.884467] Modules linked in: nls_utf8 udf crc_itu_t nls_iso8859_1 hid_multitouch intel_rapl x86_pkg_temp_thermal intel_powerclamp joydev coretemp kvm uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core irqbypass videodev m...
2020 Feb 18
5
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...s. I could probably mirror the removed logic to nouveau as diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index f8015e0318d7..5a6a2af91318 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1317,6 +1317,10 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict, ??????????????? list_for_each_entry(vma, &nvbo->vma_list, head) { ??????????????????????? nouveau_vma_map(vma, mem); ??????????????? } +?????????????? if (bo->mem.mm_node) +?????????????????????? nvbo->offset = (new_reg->start << P...
2020 Feb 18
2
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...t; > >> diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c >> b/drivers/gpu/drm/nouveau/nouveau_bo.c >> index f8015e0318d7..5a6a2af91318 100644 >> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c >> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c >> @@ -1317,6 +1317,10 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object >> *bo, bool evict, >> ??????????????? list_for_each_entry(vma, &nvbo->vma_list, head) { >> ??????????????????????? nouveau_vma_map(vma, mem); >> ??????????????? } >> +?????????????? if (bo->mem.mm_node) >> +?????????????????...
2019 Oct 09
3
[Bug 111940] New: frequent timeout warnings during normal operation
...130 [nouveau] [410260.351678] ? dma_fence_free+0x20/0x20 [410260.351678] nvif_vmm_map+0x115/0x130 [nouveau] [410260.351678] ? reservation_object_wait_timeout_rcu+0x159/0x2d0 [410260.351678] nouveau_mem_map+0x8d/0xf0 [nouveau] [410260.351678] nouveau_vma_map+0x44/0x70 [nouveau] [410260.351678] nouveau_bo_move_ntfy+0xc1/0xe0 [nouveau] [410260.351678] ttm_bo_handle_move_mem+0x3a1/0x4f0 [ttm] [410260.351678] ttm_bo_evict+0x150/0x1d0 [ttm] [410260.351678] ? find_busiest_group+0x40/0x540 [410260.351678] ? drm_mm_scan_color_evict+0x66/0xd0 [drm] [410260.351678] ttm_mem_evict_first+0x262/0x340 [ttm] [410260.35...
2020 Feb 18
2
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...u/drm/nouveau/nouveau_bo.c >>>> b/drivers/gpu/drm/nouveau/nouveau_bo.c >>>> index f8015e0318d7..5a6a2af91318 100644 >>>> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c >>>> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c >>>> @@ -1317,6 +1317,10 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object >>>> *bo, bool evict, >>>> ???????????????? list_for_each_entry(vma, &nvbo->vma_list, head) { >>>> ???????????????????????? nouveau_vma_map(vma, mem); >>>> ???????????????? } >>>> +?????????????? if (bo-&...
2013 Aug 22
0
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...* have pages, we will end up doing a null deref in > + * nouveau_vm_map_sg. */ > + if (WARN_ON(mem->mem_type != TTM_PL_VRAM && !node->pages)) > + return -EINVAL; My guess here is that this is a mapping that requires the use of map_sg_table() (see nouveau_bo_move_ntfy() for the condition). I'm not entirely sure this should even be happening to be honest. I guess TTM is trying to move a shared buffer from GART to VRAM for some reason (userspace probably asked for it?).. And well, this really shouldn't be allowed.. The other device won't be able to t...
2020 Feb 18
0
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...moved logic to nouveau as > > diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c > b/drivers/gpu/drm/nouveau/nouveau_bo.c > index f8015e0318d7..5a6a2af91318 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_bo.c > +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c > @@ -1317,6 +1317,10 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object > *bo, bool evict, > ??????????????? list_for_each_entry(vma, &nvbo->vma_list, head) { > ??????????????????????? nouveau_vma_map(vma, mem); > ??????????????? } > +?????????????? if (bo->mem.mm_node) > +?????????????????????? nvbo->offset = (n...
2020 Feb 18
0
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...s. Best regards Thomas > > diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c > b/drivers/gpu/drm/nouveau/nouveau_bo.c > index f8015e0318d7..5a6a2af91318 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_bo.c > +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c > @@ -1317,6 +1317,10 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object > *bo, bool evict, > ??????????????? list_for_each_entry(vma, &nvbo->vma_list, head) { > ??????????????????????? nouveau_vma_map(vma, mem); > ??????????????? } > +?????????????? if (bo->mem.mm_node) > +?????????????????????? nvbo->offset = (ne...
2020 Jan 24
1
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver v2
...o_device *bdev, uint32_t type, > } > > man->func = &nouveau_vram_manager; > - man->io_reserve_fastpath = false; > - man->use_io_reserve_lru = true; > } else { > man->func = &ttm_bo_manager_func; > } > @@ -1305,6 +1325,8 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict, > if (bo->destroy != nouveau_bo_del_ttm) > return; > > + nouveau_bo_del_io_reserve_lru(bo); > + > if (mem && new_reg->mem_type != TTM_PL_SYSTEM && > mem->mem.page == nvbo->page) { >...
2019 Feb 23
0
[Bug 101220] [NV137/GP107] xorg-server-1.19.3 crashes when trying to enable HDMI output
...dell-2017 kernel: ? dma_fence_wait_timeout+0x30/0x30 feb 23 17:21:08 dell-2017 kernel: nvif_vmm_map+0xef/0x110 [nouveau] feb 23 17:21:08 dell-2017 kernel: nouveau_mem_map+0x73/0xd0 [nouveau] feb 23 17:21:08 dell-2017 kernel: nouveau_vma_map+0x2f/0x40 [nouveau] feb 23 17:21:08 dell-2017 kernel: nouveau_bo_move_ntfy+0x6b/0xd0 [nouveau] feb 23 17:21:08 dell-2017 kernel: ttm_bo_handle_move_mem+0x3b1/0x590 [ttm] feb 23 17:21:08 dell-2017 kernel: ? drm_vma_offset_add+0x3c/0x60 feb 23 17:21:08 dell-2017 kernel: ttm_bo_evict+0x145/0x320 [ttm] feb 23 17:21:08 dell-2017 kernel: ? gf119_disp_chan_uevent_fini+0x3d/0...
2020 Feb 18
0
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...f --git a/drivers/gpu/drm/nouveau/nouveau_bo.c >>> b/drivers/gpu/drm/nouveau/nouveau_bo.c >>> index f8015e0318d7..5a6a2af91318 100644 >>> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c >>> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c >>> @@ -1317,6 +1317,10 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object >>> *bo, bool evict, >>> ???????????????? list_for_each_entry(vma, &nvbo->vma_list, head) { >>> ???????????????????????? nouveau_vma_map(vma, mem); >>> ???????????????? } >>> +?????????????? if (bo->mem.mm_node) >&gt...
2013 Aug 22
6
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
The code expects non-VRAM mem nodes to have a pages list. If that's not set, it will do a null deref down the line. Warn on that condition and return an error. See https://bugs.freedesktop.org/show_bug.cgi?id=64774 Reported-by: Pasi K?rkk?inen <pasik at iki.fi> Tested-by: Pasi K?rkk?inen <pasik at iki.fi> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> Cc: <stable
2020 Jan 28
1
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver v2
...uveau_vram_manager; > - man->io_reserve_fastpath = false; > - man->use_io_reserve_lru = true; > } else { > man->func = &ttm_bo_manager_func; > } > @@ -1305,6 +1325,8 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict, > if (bo->destroy != nouveau_bo_del_ttm) > return; > > + nouveau_bo_del_io_reserve_lru(bo); > + > if (mem && new_reg->mem_type != TTM_PL_SYSTEM && > mem->mem.pag...
2020 Feb 18
0
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...; > > b/drivers/gpu/drm/nouveau/nouveau_bo.c > > > > > index f8015e0318d7..5a6a2af91318 100644 > > > > > --- a/drivers/gpu/drm/nouveau/nouveau_bo.c > > > > > +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c > > > > > @@ -1317,6 +1317,10 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object > > > > > *bo, bool evict, > > > > > ???????????????? list_for_each_entry(vma, &nvbo->vma_list, head) { > > > > > ???????????????????????? nouveau_vma_map(vma, mem); > > > > > ???????????????? } > >...
2020 Jan 24
4
TTM/Nouveau cleanups
Hi guys, I've already send this out in September last year, but only got a response from Daniel. Could you guys please test this and tell me what you think about it? Basically I'm trying to remove all driver specific features from TTM which don't need to be inside the framework. Thanks, Christian.
2020 Jan 24
0
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver v2
...5,8 +697,6 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, } man->func = &nouveau_vram_manager; - man->io_reserve_fastpath = false; - man->use_io_reserve_lru = true; } else { man->func = &ttm_bo_manager_func; } @@ -1305,6 +1325,8 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict, if (bo->destroy != nouveau_bo_del_ttm) return; + nouveau_bo_del_io_reserve_lru(bo); + if (mem && new_reg->mem_type != TTM_PL_SYSTEM && mem->mem.page == nvbo->page) { list_for_each_entry(vma, &nvbo->vma_li...
2020 Aug 21
0
[PATCH 2/3] drm/nouveau: move io_reserve_lru handling into the driver v4
...au_bo *nvbo = nouveau_bo(bo); + + mutex_lock(&drm->ttm.io_reserve_mutex); + list_del_init(&nvbo->io_reserve_lru); + mutex_unlock(&drm->ttm.io_reserve_mutex); +} + int nouveau_bo_validate(struct nouveau_bo *nvbo, bool interruptible, bool no_wait_gpu) @@ -888,6 +910,8 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict, if (bo->destroy != nouveau_bo_del_ttm) return; + nouveau_bo_del_io_reserve_lru(bo); + if (mem && new_reg->mem_type != TTM_PL_SYSTEM && mem->mem.page == nvbo->page) { list_for_each_entry(vma, &nvbo->vma_li...
2019 Oct 09
0
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver
...ttm_bo_device *bdev, uint32_t type, > } > > man->func = &nouveau_vram_manager; > - man->io_reserve_fastpath = false; > - man->use_io_reserve_lru = true; > } else { > man->func = &ttm_bo_manager_func; > } > @@ -1304,6 +1324,8 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict, > if (bo->destroy != nouveau_bo_del_ttm) > return; > > + nouveau_bo_del_io_reserve_lru(bo); > + > if (mem && new_reg->mem_type != TTM_PL_SYSTEM && > mem->mem.page == nvbo->page) { > list_...