drm/amd/display: add stub for crtc_debugfs_init()
Subsystems (3)
PATCH 1/1 drm/amd/display: add stub for crtc_debugfs_init()
Fix build error when CONFIG_DEBUG_FS is not enabled by adding a stub function for crtc_debugfs_init().
Eliminates this build error:
../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_crtc_late_register’:../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: error: implicit declaration of function ‘crtc_debugfs_init’; did you mean ‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration]
crtc_debugfs_init(crtc);
^~~~~~~~~~~~~~~~~
amdgpu_debugfs_init
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -2
@@ -57,9 +57,7 @@#include "amdgpu_dm_irq.h" #include "dm_helpers.h" #include "amdgpu_dm_mst_types.h" -#if defined(CONFIG_DEBUG_FS )#include "amdgpu_dm_debugfs.h" -#endif #include "amdgpu_dm_psr.h" #include "ivsrcid/ivsrcid_vislands30.h"
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h +6 -0
@@ -31,6 +31,12 @@void connector_debugfs_init (struct amdgpu_dm_connector *connector);void dtn_debugfs_init (struct amdgpu_device *adev); + +#ifdef CONFIG_DEBUG_FS void crtc_debugfs_init (struct drm_crtc *crtc); +#else +static inline void crtc_debugfs_init (struct drm_crtc *crtc) +{} +#endif #endif
Harry Wentland
maintainerQuoted 5 lines · Randy Dunlap
Fix build error when
CONFIG_DEBUG_FSis not enabled by adding a stub function forcrtc_debugfs_init().Eliminates this build error:
Quoted 7 lines
../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_crtc_late_register’:../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: error: implicit declaration of function ‘crtc_debugfs_init’; did you mean ‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration]
crtc_debugfs_init(crtc);
^~~~~~~~~~~~~~~~~
amdgpu_debugfs_initFixes 86bc22191892 ("drm/amd/display: Support crc on specific region")
That whole patch and the whole secure display feature depend on debugfs. It should never try building without CONFIG_DEBUG_FS.
See drivers/gpu/drm/amd/display/Kconfig:
Quoted 9 lines
config
DRM_AMD_SECURE_DISPLAY
bool "Enable secure display support"
default n
depends onDEBUG_FS
depends onDRM_AMD_DC_DCN
help
Choose this option if you want to
support secure display
Quoted 3 lines
This option enables the calculation of crc of specific region via debugfs. Cooperate with specific DMCU FW.
amdgpu_dm_crtc_late_register is guarded by CONIG_DRM_AMD_SECURE_DISPLAY.
Harry
Quoted 39 lines
Signed-off-by Randy Dunlap <[email protected]>Cc Wayne Lin <[email protected]>Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>Cc "Pan, Xinhui" <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-2@@ -57,9 +57,7 @@#include "amdgpu_dm_irq.h" #include "dm_helpers.h" #include "amdgpu_dm_mst_types.h" -#if defined(CONFIG_DEBUG_FS )#include "amdgpu_dm_debugfs.h" -#endif #include "amdgpu_dm_psr.h" #include "ivsrcid/ivsrcid_vislands30.h" drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h +6
-0@@ -31,6 +31,12 @@void connector_debugfs_init (struct amdgpu_dm_connector *connector);void dtn_debugfs_init (struct amdgpu_device *adev); + +#ifdef CONFIG_DEBUG_FS void crtc_debugfs_init (struct drm_crtc *crtc); +#else +static inline void crtc_debugfs_init (struct drm_crtc *crtc) +{} +#endif #endif
Quoted 12 lines · Harry Wentland
Quoted 11 lines · Randy Dunlap
Fix build error when
CONFIG_DEBUG_FSis not enabled by adding a stub function forcrtc_debugfs_init().Eliminates this build error:
../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_crtc_late_register’:../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: error: implicit declaration of function ‘crtc_debugfs_init’; did you mean ‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration]
crtc_debugfs_init(crtc);
^~~~~~~~~~~~~~~~~
amdgpu_debugfs_init
Quoted 4 lines
Quoted 1 line
Fixes 86bc22191892 ("drm/amd/display: Support crc on specific region")That whole patch and the whole secure display feature depend on debugfs. It should never try building without
CONFIG_DEBUG_FS.
Hi Harry,
Well, it's clearly possible to have this build error, so something needs to be fixed somewhere.
Quoted 57 lines
See
drivers/gpu/drm/amd/display/Kconfig:Quoted 9 lines
config
DRM_AMD_SECURE_DISPLAY
bool "Enable secure display support"
default n
depends onDEBUG_FS
depends onDRM_AMD_DC_DCN
help
Choose this option if you want to
support secure displayQuoted 3 lines
This option enables the calculation of crc of specific region via debugfs. Cooperate with specific DMCU FW.
amdgpu_dm_crtc_late_registeris guarded byCONIG_DRM_AMD_SECURE_DISPLAY.Harry
Quoted 38 lines
Signed-off-by Randy Dunlap <[email protected]>Cc Wayne Lin <[email protected]>Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>Cc "Pan, Xinhui" <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-2@@ -57,9 +57,7 @@#include "amdgpu_dm_irq.h" #include "dm_helpers.h" #include "amdgpu_dm_mst_types.h" -#if defined(CONFIG_DEBUG_FS )#include "amdgpu_dm_debugfs.h" -#endif #include "amdgpu_dm_psr.h" #include "ivsrcid/ivsrcid_vislands30.h" drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h +6
-0@@ -31,6 +31,12 @@void connector_debugfs_init (struct amdgpu_dm_connector *connector);void dtn_debugfs_init (struct amdgpu_device *adev); + +#ifdef CONFIG_DEBUG_FS void crtc_debugfs_init (struct drm_crtc *crtc); +#else +static inline void crtc_debugfs_init (struct drm_crtc *crtc) +{} +#endif
Quoted 2 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h line 42
Quoted 1 line
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h +0
-0#endif
thanks.
Signature · 1 line
~Randy