search for: nouveau_gem_object_close

Displaying 18 results from an estimated 18 matches for "nouveau_gem_object_close".

2012 Nov 21
2
[PATCH] drm/nouveau: fix takedown in move_notify
...fy is called by ttm after the the object is idle and about to be destroyed. Clean up the vm list properly in that case. This is not a problem right now, since the list should already be empty, but if it wasn't empty, vm_put was not called which leads to random corruption later. With this fix, nouveau_gem_object_close can be safely changed to a noop, forcing the vm bindings to be removed when the original object is. This is not done in this patch since it may lead to the object staying mapped in the vm space until the gem object refcount drops to 0. This shouldn't be a big issue however. If we choose to do...
2020 Aug 13
0
[PATCH 09/20] drm/nouveau: Introduce GEM object functions
...ime_get_sg_table, .gem_prime_import_sg_table = nouveau_gem_prime_import_sg_table, - .gem_prime_vmap = nouveau_gem_prime_vmap, - .gem_prime_vunmap = nouveau_gem_prime_vunmap, - - .gem_free_object_unlocked = nouveau_gem_object_del, - .gem_open_object = nouveau_gem_object_open, - .gem_close_object = nouveau_gem_object_close, .dumb_create = nouveau_display_dumb_create, .dumb_map_offset = nouveau_display_dumb_map_offset, diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 81f111ad3f4f..b04b8f6bb9d5 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm...
2020 Sep 15
0
[PATCH v2 09/21] drm/nouveau: Introduce GEM object functions
...ime_get_sg_table, .gem_prime_import_sg_table = nouveau_gem_prime_import_sg_table, - .gem_prime_vmap = nouveau_gem_prime_vmap, - .gem_prime_vunmap = nouveau_gem_prime_vunmap, - - .gem_free_object_unlocked = nouveau_gem_object_del, - .gem_open_object = nouveau_gem_object_open, - .gem_close_object = nouveau_gem_object_close, .dumb_create = nouveau_display_dumb_create, .dumb_map_offset = nouveau_display_dumb_map_offset, diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 89adadf4706b..28e0cbb00876 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm...
2015 Jun 15
4
[PATCH v2 0/2] drm/nouveau: option for staging ioctls and new GEM_SET_TILING ioctl
Second version of this patchset addressing Ben's comments and fixing a few extra things. This patchset proposes to introduce a "staging" module option to dynamically enable features (mostly ioctls) that are merged but may be refined before they are declared "stable". The second patch illustrates the use of this staging option with the SET_TILING ioctl, which can be used to
2015 Jun 15
2
[PATCH v2 2/2] drm/nouveau: add GEM_SET_TILING staging ioctl
...ng_tiling); > } > > static const struct dev_pm_ops nouveau_pm_ops = { > diff --git a/drm/nouveau/nouveau_gem.c b/drm/nouveau/nouveau_gem.c > index 0e690bf19fc9..0e69449798aa 100644 > --- a/drm/nouveau/nouveau_gem.c > +++ b/drm/nouveau/nouveau_gem.c > @@ -172,6 +172,64 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv) > ttm_bo_unreserve(&nvbo->bo); > } > > +extern int nouveau_staging_tiling; > +int > +nouveau_gem_ioctl_set_tiling(struct drm_device *dev, void *data, > + struct drm_file *file_priv) > +{ > + struct...
2014 Sep 26
0
[RFC PATCH 6/7] drm/nouveau: Support marking buffers for explicit sync
...DRM_AUTH|DRM_RENDER_ALLOW), + DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_SET_INFO, nouveau_gem_ioctl_set_info, DRM_UNLOCKED|DRM_AUTH|DRM_RENDER_ALLOW), }; long diff --git a/drm/nouveau_gem.c b/drm/nouveau_gem.c index ee5782c..bb19507 100644 --- a/drm/nouveau_gem.c +++ b/drm/nouveau_gem.c @@ -149,7 +149,7 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv) int nouveau_gem_new(struct drm_device *dev, int size, int align, uint32_t domain, - uint32_t tile_mode, uint32_t tile_flags, + uint32_t tile_mode, uint32_t bo_flags, struct nouveau_bo **pnvbo) { struct nouveau_drm *drm = nouveau_dr...
2015 May 20
3
[PATCH 0/2] drm/nouveau: option for staging ioctls and new SET_TILING ioctl
This patchset proposes to introduce a "staging" module option to dynamically enable features (mostly ioctls) that are merged but may be refined before they are declared "stable". The second patch illustrates the use of this staging option with the SET_TILING ioctl, which can be used to specify the tiling options of a PRIME-imported buffer. The staging parameter will allow us
2020 May 20
0
[PATCH] drm/nouveau: fix runtime pm imbalance on error
...gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index f5ece1f94973..125cefbb6210 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c @@ -157,8 +157,8 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv) if (!WARN_ON(ret < 0 && ret != -EACCES)) { nouveau_gem_object_unmap(nvbo, vma); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); } + pm_runtime_put_autosuspend(dev); } } ttm_bo_unreser...
2012 Oct 12
0
[PATCH 2/3] drm/nouveau: add reservation to nouveau_bo_vma_del
...uivalent to TTM generic API upstream? */ static inline void __iomem * diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 18342b0..5972ecd 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c @@ -121,7 +121,7 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv) vma = nouveau_bo_vma_find(nvbo, cli->base.vm); if (vma) { if (--vma->refcount == 0) { - nouveau_bo_vma_del(nvbo, vma); + nouveau_bo_vma_del_reserved(nvbo, vma); kfree(vma); } }
2013 Jul 29
0
[PATCH] drm/nouveau: protect vm refcount with mutex
...[<ffffffffa02f57c9>] nouveau_vm_put+0x9a/0xb0 [nouveau] [<ffffffffa033462d>] ? nouveau_gem_info+0x9d/0x9d [nouveau] [<ffffffffa0334646>] nouveau_gem_object_delete+0x19/0x28 [nouveau] [<ffffffffa032fc90>] nouveau_fence_work+0xc9/0x102 [nouveau] [<ffffffffa0334d59>] nouveau_gem_object_close+0x103/0x182 [nouveau] [<ffffffffa01d8bcd>] drm_gem_handle_delete+0xcc/0x153 [drm] [<ffffffffa01d8fc5>] drm_gem_close_ioctl+0x23/0x25 [drm] [<ffffffffa01d6f75>] drm_ioctl+0x4cc/0x612 [drm] [<ffffffff816341c0>] ? __slab_free.isra.66+0x24d/0x2aa [<ffffffffa01d8fa2>]...
2015 Jun 15
2
[PATCH v2 2/2] drm/nouveau: add GEM_SET_TILING staging ioctl
...ng_tiling); > } > > static const struct dev_pm_ops nouveau_pm_ops = { > diff --git a/drm/nouveau/nouveau_gem.c b/drm/nouveau/nouveau_gem.c > index 0e690bf19fc9..0e69449798aa 100644 > --- a/drm/nouveau/nouveau_gem.c > +++ b/drm/nouveau/nouveau_gem.c > @@ -172,6 +172,64 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv) > ttm_bo_unreserve(&nvbo->bo); > } > > +extern int nouveau_staging_tiling; > +int > +nouveau_gem_ioctl_set_tiling(struct drm_device *dev, void *data, > + struct drm_file *file_priv) > +{ > + struct...
2020 Sep 15
40
[PATCH v2 00/21] Convert all remaining drivers to GEM object functions
The GEM and PRIME related callbacks in struct drm_driver are deprecated in favor of GEM object functions in struct drm_gem_object_funcs. This patchset converts the remaining drivers to object functions and removes most of the obsolete interfaces. Patches #1 to #16 and #18 to #19 convert DRM drivers to GEM object functions, one by one. Each patch moves existing callbacks from struct drm_driver to
2020 Sep 23
25
[PATCH v3 00/22] Convert all remaining drivers to GEM object functions
The GEM and PRIME related callbacks in struct drm_driver are deprecated in favor of GEM object functions in struct drm_gem_object_funcs. This patchset converts the remaining drivers to object functions and removes most of the obsolete interfaces. Version 3 of this patchset mostly fixes drm_gem_prime_handle_to_fd and updates i.MX's dcss driver. The driver was missing from earlier versions and
2020 Aug 13
28
[PATCH 00/20] Convert all remaining drivers to GEM object functions
The GEM and PRIME related callbacks in struct drm_driver are deprecated in favor of GEM object functions in struct drm_gem_object_funcs. This patchset converts the remaining drivers to object functions and removes most of the obsolete interfaces. Patches #1 to #18 convert DRM drivers to GEM object functions, one by one. Each patch moves existing callbacks from struct drm_driver to an instance of
2014 Sep 26
14
[RFC] Explicit synchronization for Nouveau
Hi guys, I'd like to start a new thread about explicit fence synchronization. This time with a Nouveau twist. :-) First, let me define what I understand by implicit/explicit sync: Implicit synchronization * Fences are attached to buffers * Kernel manages fences automatically based on buffer read/write access Explicit synchronization * Fences are passed around independently * Kernel takes
2020 Nov 06
4
[PATCH 0/3] drm/nouveau: extend the lifetime of nouveau_drm
Hi folks, Currently, when the device is removed (or the driver is unbound) the nouveau_drm structure de-allocated. However, it's still accessible from and used by some DRM layer callbacks. For example, file handles can be closed after the device has been removed (physically or otherwise). This series converts the Nouveau device structure to be allocated and de-allocated with the
2024 Oct 04
2
[PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
Hello everyone, This set will switch the users of pm_runtime_put_autosuspend() to __pm_runtime_put_autosuspend() while the former will soon be re-purposed to include a call to pm_runtime_mark_last_busy(). The two are almost always used together, apart from bugs which are likely common. Going forward, most new users should be using pm_runtime_put_autosuspend(). Once this conversion is done and
2015 Aug 31
8
[RFC PATCH v2 0/5] More explicit pushbuf error handling
Hi there, Resending these now that they've had some more polish and testing, and I heard that Ben's vacation is over :-) These patches work as a starting point for more explicit error mechanisms and better robustness. At the moment, when a job hangs or faults, it seems that nouveau doesn't quite know how to handle the situation and often results in a hang. Some of these situations