Move DisplayPort functions into a separate module to reduce the size of the KMS helpers. Select DRM_DP_HELPER for all users of the code. To avoid naming conflicts, rename drm_dp_helper.c to drm_dp.c This change can help to reduce the size of the kernel binary. Some numbers from a x86-64 test build: Before: drm_kms_helper.ko: 447480 bytes After: drm_dp_helper.ko: 216632 bytes drm_kms_helper.ko: 239424 bytes For early-boot graphics, generic DRM drivers, such as simpledrm, require DRM KMS helpers to be built into the kernel. Generic helper functions for DisplayPort take up a significant portion of DRM KMS helper library. These functions are not used by generic drivers and can be loaded as a module. v3: * fix include statement in DRM selftests v2: * move DP helper code into dp/ (Jani) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Lyude Paul <lyude@redhat.com> Acked-by: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20220114114535.29157-4-tzimmermann@suse.de
34 lines
630 B
C
34 lines
630 B
C
/* SPDX-License-Identifier: MIT */
|
|
|
|
#ifndef DRM_DP_HELPER_INTERNAL_H
|
|
#define DRM_DP_HELPER_INTERNAL_H
|
|
|
|
struct drm_dp_aux;
|
|
|
|
#ifdef CONFIG_DRM_DP_AUX_CHARDEV
|
|
int drm_dp_aux_dev_init(void);
|
|
void drm_dp_aux_dev_exit(void);
|
|
int drm_dp_aux_register_devnode(struct drm_dp_aux *aux);
|
|
void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux);
|
|
#else
|
|
static inline int drm_dp_aux_dev_init(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void drm_dp_aux_dev_exit(void)
|
|
{
|
|
}
|
|
|
|
static inline int drm_dp_aux_register_devnode(struct drm_dp_aux *aux)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif
|