Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/dp: Move DP declarations into separate header file

Split the DP declarations from other helpers before moving the
DP functions into a separate module.

v2:
* forward-declare struct drm_dp_aux (Jani)
* add include guards in drm_dp_helper_internal.h

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220114114535.29157-3-tzimmermann@suse.de

+37 -30
-27
drivers/gpu/drm/drm_crtc_helper_internal.h
··· 28 28 29 29 #include <drm/drm_connector.h> 30 30 #include <drm/drm_crtc.h> 31 - #include <drm/drm_dp_helper.h> 32 31 #include <drm/drm_encoder.h> 33 32 #include <drm/drm_modes.h> 34 - 35 - /* drm_dp_aux_dev.c */ 36 - #ifdef CONFIG_DRM_DP_AUX_CHARDEV 37 - int drm_dp_aux_dev_init(void); 38 - void drm_dp_aux_dev_exit(void); 39 - int drm_dp_aux_register_devnode(struct drm_dp_aux *aux); 40 - void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux); 41 - #else 42 - static inline int drm_dp_aux_dev_init(void) 43 - { 44 - return 0; 45 - } 46 - 47 - static inline void drm_dp_aux_dev_exit(void) 48 - { 49 - } 50 - 51 - static inline int drm_dp_aux_register_devnode(struct drm_dp_aux *aux) 52 - { 53 - return 0; 54 - } 55 - 56 - static inline void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux) 57 - { 58 - } 59 - #endif 60 33 61 34 /* drm_probe_helper.c */ 62 35 enum drm_mode_status drm_crtc_mode_valid(struct drm_crtc *crtc,
+1 -1
drivers/gpu/drm/drm_dp_aux_dev.c
··· 40 40 #include <drm/drm_dp_mst_helper.h> 41 41 #include <drm/drm_print.h> 42 42 43 - #include "drm_crtc_helper_internal.h" 43 + #include "drm_dp_helper_internal.h" 44 44 45 45 struct drm_dp_aux_dev { 46 46 unsigned index;
+1 -1
drivers/gpu/drm/drm_dp_helper.c
··· 35 35 #include <drm/drm_dp_mst_helper.h> 36 36 #include <drm/drm_panel.h> 37 37 38 - #include "drm_crtc_helper_internal.h" 38 + #include "drm_dp_helper_internal.h" 39 39 40 40 struct dp_aux_backlight { 41 41 struct backlight_device *base;
+33
drivers/gpu/drm/drm_dp_helper_internal.h
··· 1 + /* SPDX-License-Identifier: MIT */ 2 + 3 + #ifndef DRM_DP_HELPER_INTERNAL_H 4 + #define DRM_DP_HELPER_INTERNAL_H 5 + 6 + struct drm_dp_aux; 7 + 8 + #ifdef CONFIG_DRM_DP_AUX_CHARDEV 9 + int drm_dp_aux_dev_init(void); 10 + void drm_dp_aux_dev_exit(void); 11 + int drm_dp_aux_register_devnode(struct drm_dp_aux *aux); 12 + void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux); 13 + #else 14 + static inline int drm_dp_aux_dev_init(void) 15 + { 16 + return 0; 17 + } 18 + 19 + static inline void drm_dp_aux_dev_exit(void) 20 + { 21 + } 22 + 23 + static inline int drm_dp_aux_register_devnode(struct drm_dp_aux *aux) 24 + { 25 + return 0; 26 + } 27 + 28 + static inline void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux) 29 + { 30 + } 31 + #endif 32 + 33 + #endif
+1 -1
drivers/gpu/drm/drm_dp_mst_topology.c
··· 45 45 #include <drm/drm_print.h> 46 46 #include <drm/drm_probe_helper.h> 47 47 48 - #include "drm_crtc_helper_internal.h" 48 + #include "drm_dp_helper_internal.h" 49 49 #include "drm_dp_mst_topology_internal.h" 50 50 51 51 /**
+1
drivers/gpu/drm/drm_kms_helper_common.c
··· 29 29 30 30 #include <drm/drm_print.h> 31 31 32 + #include "drm_dp_helper_internal.h" 32 33 #include "drm_crtc_helper_internal.h" 33 34 34 35 MODULE_AUTHOR("David Airlie, Jesse Barnes");