mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 01:24:33 +00:00
1f828b4dd4
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
28 lines
897 B
C
28 lines
897 B
C
/* SPDX-License-Identifier: GPL-2.0 or MIT */
|
|
|
|
#ifndef _DRM_CLIENT_EVENT_H_
|
|
#define _DRM_CLIENT_EVENT_H_
|
|
|
|
struct drm_device;
|
|
|
|
#if defined(CONFIG_DRM_CLIENT)
|
|
void drm_client_dev_unregister(struct drm_device *dev);
|
|
void drm_client_dev_hotplug(struct drm_device *dev);
|
|
void drm_client_dev_restore(struct drm_device *dev);
|
|
void drm_client_dev_suspend(struct drm_device *dev, bool holds_console_lock);
|
|
void drm_client_dev_resume(struct drm_device *dev, bool holds_console_lock);
|
|
#else
|
|
static inline void drm_client_dev_unregister(struct drm_device *dev)
|
|
{ }
|
|
static inline void drm_client_dev_hotplug(struct drm_device *dev)
|
|
{ }
|
|
static inline void drm_client_dev_restore(struct drm_device *dev)
|
|
{ }
|
|
static inline void drm_client_dev_suspend(struct drm_device *dev, bool holds_console_lock)
|
|
{ }
|
|
static inline void drm_client_dev_resume(struct drm_device *dev, bool holds_console_lock)
|
|
{ }
|
|
#endif
|
|
|
|
#endif
|