From: Jocelyn Falempe Date: Wed, 7 Aug 2024 13:36:12 +0000 (+0200) Subject: drm/panic: Move drm_panic_register prototype to drm_crtc_internal.h X-Git-Tag: v6.12-rc1~126^2~21^2~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d27a14060f8501e556a65b346b2644be0d0a2de8;p=thirdparty%2Flinux.git 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 Signed-off-by: Jocelyn Falempe Reviewed-by: Daniel Vetter Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240807134902.458669-4-jfalempe@redhat.com --- diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index 0614363619989..251ff7bba40d4 100644 --- a/drivers/gpu/drm/drm_crtc_internal.h +++ b/drivers/gpu/drm/drm_crtc_internal.h @@ -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__ */ diff --git a/include/drm/drm_panic.h b/include/drm/drm_panic.h index 73bb3f3d9ed91..a4bd3681920d4 100644 --- a/include/drm/drm_panic.h +++ b/include/drm/drm_panic.h @@ -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__ */