summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_internal.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2024-10-14 10:55:25 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2024-10-18 09:23:03 +0200
commit1f828b4dd40264028d9b481c0412e63837d968f6 (patch)
tree68fbf9443e46d033455ef91047094fe6c1070bd8 /drivers/gpu/drm/drm_internal.h
parent88c79de8575c0061a5cdf23c65f8b1ae6202f0d5 (diff)
downloadlwn-1f828b4dd40264028d9b481c0412e63837d968f6.tar.gz
lwn-1f828b4dd40264028d9b481c0412e63837d968f6.zip
drm/client: Make client support optional
Only build client code if DRM_CLIENT has been selected. Automatially do so if one of the default clients has been enabled. If client support has been disabled, the helpers for client-related events are empty and the regular client functions are not present. Amdgpu has an internal DRM client, so it has to select DRM_CLIENT by itself unconditionally. v3: - provide empty drm_client_debugfs_init() if DRM_CLIENT=n (kernel test robot) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: Xinhui Pan <Xinhui.Pan@amd.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241014085740.582287-12-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/drm_internal.h')
-rw-r--r--drivers/gpu/drm/drm_internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h
index 1705bfc90b1e..b2b6a8e49dda 100644
--- a/drivers/gpu/drm/drm_internal.h
+++ b/drivers/gpu/drm/drm_internal.h
@@ -48,6 +48,14 @@ struct drm_prime_file_private;
struct drm_printer;
struct drm_vblank_crtc;
+/* drm_client_event.c */
+#if defined(CONFIG_DRM_CLIENT)
+void drm_client_debugfs_init(struct drm_device *dev);
+#else
+static inline void drm_client_debugfs_init(struct drm_device *dev)
+{ }
+#endif
+
/* drm_file.c */
extern struct mutex drm_global_mutex;
bool drm_dev_needs_global_mutex(struct drm_device *dev);