diff options
| author | Dave Airlie <airlied@redhat.com> | 2025-03-07 09:55:33 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2025-03-07 09:55:50 +1000 |
| commit | d65a27f95f6ab236b1a788d9bc463d24a8b2aebe (patch) | |
| tree | 45da6a037ca99ebec667e3057f3d973526510bc3 /include/drm/drm_gem.h | |
| parent | e21cba704714c301d04c5fd37a693734b623872a (diff) | |
| parent | 4423e607ff50157aaf088854b145936cbab4d560 (diff) | |
| download | linux-d65a27f95f6ab236b1a788d9bc463d24a8b2aebe.tar.gz linux-d65a27f95f6ab236b1a788d9bc463d24a8b2aebe.tar.bz2 linux-d65a27f95f6ab236b1a788d9bc463d24a8b2aebe.zip | |
Merge tag 'drm-misc-next-2025-03-06' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
drm-misc-next for v6.15:
Cross-subsystem Changes:
base:
- component: Provide helper to query bound status
fbdev:
- fbtft: Remove access to page->index
Core Changes:
- Fix usage of logging macros in several places
gem:
- Add test function for imported dma-bufs and use it in core and helpers
- Avoid struct drm_gem_object.import_attach
tests:
- Fix lockdep warnings
ttm:
- Add helpers for TTM shrinker
Driver Changes:
adp:
- Add support for Apple Touch Bar displays on M1/M2
amdxdna:
- Fix interrupt handling
appletbdrm:
- Add support for Apple Touch Bar displays on x86
bridge:
- synopsys: Add HDMI audio support
- ti-sn65dsi83: Support negative DE polarity
ipu-v3:
- Remove unused code
nouveau:
- Avoid multiple -Wflex-array-member-not-at-end warnings
panthor:
- Fix CS_STATUS_ defines
- Improve locking
rockchip:
- analogix_dp: Add eDP support
- lvds: Improve logging
- vop2: Improve HDMI mode handling; Add support for RK3576
- Fix shutdown
- Support rk3562-mali
xe:
- Use TTM shrinker
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20250306130700.GA485504@linux.fritz.box
Diffstat (limited to 'include/drm/drm_gem.h')
| -rw-r--r-- | include/drm/drm_gem.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h index fdae947682cd..2bf893eabb4b 100644 --- a/include/drm/drm_gem.h +++ b/include/drm/drm_gem.h @@ -35,6 +35,7 @@ */ #include <linux/kref.h> +#include <linux/dma-buf.h> #include <linux/dma-resv.h> #include <linux/list.h> #include <linux/mutex.h> @@ -575,6 +576,19 @@ static inline bool drm_gem_object_is_shared_for_memory_stats(struct drm_gem_obje return (obj->handle_count > 1) || obj->dma_buf; } +/** + * drm_gem_is_imported() - Tests if GEM object's buffer has been imported + * @obj: the GEM object + * + * Returns: + * True if the GEM object's buffer has been imported, false otherwise + */ +static inline bool drm_gem_is_imported(const struct drm_gem_object *obj) +{ + /* The dma-buf's priv field points to the original GEM object. */ + return obj->dma_buf && (obj->dma_buf->priv != obj); +} + #ifdef CONFIG_LOCKDEP /** * drm_gem_gpuva_set_lock() - Set the lock protecting accesses to the gpuva list. |
