summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2026-03-04 15:58:38 +0300
committerAlex Deucher <alexander.deucher@amd.com>2026-03-07 00:31:35 +0300
commit1837c76b780a4201e3d9f718e17c09b536df700f (patch)
treeaaf39de57492508346e5c9b9bf4b63d211611527 /include
parent1b5cf07d80bb16d1593579ccdb23f08ea4262c14 (diff)
downloadlinux-1837c76b780a4201e3d9f718e17c09b536df700f.tar.xz
drm/amdgpu: Move test for fbdev GEM object into generic helper
Provide a generic helper that tests if fbdev emulation is backed by a specific GEM object. Not all drivers use client buffers (yet), hence also test against the first GEM object in the fbdev framebuffer. Convert amdgpu. The helper will also be useful for radeon. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_fb_helper.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 05cca77b7249..ca214b5c0283 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -271,7 +271,15 @@ int drm_fb_helper_ioctl(struct fb_info *info, unsigned int cmd,
int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
int drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper);
+bool drm_fb_helper_gem_is_fb(const struct drm_fb_helper *fb_helper,
+ const struct drm_gem_object *obj);
#else
+static inline bool drm_fb_helper_gem_is_fb(const struct drm_fb_helper *fb_helper,
+ const struct drm_gem_object *obj)
+{
+ return false;
+}
+
static inline void drm_fb_helper_prepare(struct drm_device *dev,
struct drm_fb_helper *helper,
unsigned int preferred_bpp,