diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-10-31 09:01:25 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-10-31 09:01:25 +0100 |
commit | 2dc15ff73b6a7b47db0e848498cb5b0479e781c6 (patch) | |
tree | d93457787d3349dadcbbf7691650ebdb1d0cd883 /drivers/gpu/drm/vmwgfx/vmwgfx_bo.h | |
parent | c468b5dd759ede754b23cbc9c50b048a781d4217 (diff) | |
parent | bdb7e1922052b1e7fcce63e2cfa195958ff97e05 (diff) |
Merge tag 'asoc-v6.7-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v6.7
More updates for v6,7 following the early merge request:
- Fixes for handling of component name prefixing when name prefixes
are used by the machine driver.
- Fixes for noise when stopping some Sounwire CODECs.
- Support for AMD ACP 6.3 and 7.0, Awinc AW88399, more Intel
platforms and more Qualcomm SC7180 platforms.
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_bo.h')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_bo.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.h b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.h index 1d433fceed3d..0d496dc9c6af 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.h @@ -195,12 +195,19 @@ static inline struct vmw_bo *vmw_bo_reference(struct vmw_bo *buf) return buf; } -static inline void vmw_user_bo_unref(struct vmw_bo *vbo) +static inline struct vmw_bo *vmw_user_bo_ref(struct vmw_bo *vbo) { - if (vbo) { - ttm_bo_put(&vbo->tbo); - drm_gem_object_put(&vbo->tbo.base); - } + drm_gem_object_get(&vbo->tbo.base); + return vbo; +} + +static inline void vmw_user_bo_unref(struct vmw_bo **buf) +{ + struct vmw_bo *tmp_buf = *buf; + + *buf = NULL; + if (tmp_buf) + drm_gem_object_put(&tmp_buf->tbo.base); } static inline struct vmw_bo *to_vmw_bo(struct drm_gem_object *gobj) |