drm/panic: Move drm_panic_register prototype to drm_crtc_internal.h

drm_panic_[un]register() are only used by the core drm, and are not
intended to be called by other drm drivers, so move their prototypes
to drm_crtc_internal.h.

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240807134902.458669-4-jfalempe@redhat.com
This commit is contained in:
Jocelyn Falempe 2024-08-07 15:36:12 +02:00
parent 6d470f9b8c
commit d27a14060f
2 changed files with 4 additions and 12 deletions

View file

@ -318,8 +318,12 @@ drm_edid_load_firmware(struct drm_connector *connector)
/* drm_panic.c */
#ifdef CONFIG_DRM_PANIC
bool drm_panic_is_enabled(struct drm_device *dev);
void drm_panic_register(struct drm_device *dev);
void drm_panic_unregister(struct drm_device *dev);
#else
static inline bool drm_panic_is_enabled(struct drm_device *dev) { return false; }
static inline void drm_panic_register(struct drm_device *dev) {}
static inline void drm_panic_unregister(struct drm_device *dev) {}
#endif
#endif /* __DRM_CRTC_INTERNAL_H__ */

View file

@ -146,16 +146,4 @@ struct drm_scanout_buffer {
#define drm_panic_unlock(dev, flags) \
raw_spin_unlock_irqrestore(&(dev)->mode_config.panic_lock, flags)
#ifdef CONFIG_DRM_PANIC
void drm_panic_register(struct drm_device *dev);
void drm_panic_unregister(struct drm_device *dev);
#else
static inline void drm_panic_register(struct drm_device *dev) {}
static inline void drm_panic_unregister(struct drm_device *dev) {}
#endif
#endif /* __DRM_PANIC_H__ */