Message ID | 20220615210019.28943-1-alexander.deucher@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/amdgpu/display: fix build when CONFIG_DEBUG_FS is not set | expand |
On 2022-06-15 17:00, Alex Deucher wrote: > amdgpu_dm_crtc_late_register is only used when CONFIG_DEBUG_FS > so make it dependent on that. > > Fixes: 4cd79f614b50 ("drm/amd/display: Move connector debugfs to drm") > Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> > Cc: Harry Wentland <harry.wentland@amd.com> > Cc: Arun R Murthy <arun.r.murthy@intel.com> > Cc: Jani Nikula <jani.nikula@intel.com> > Reported-by: Randy Dunlap <rdunlap@infradead.org> > Reported-by: Nathan Chancellor <nathan@kernel.org> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com> > Tested-by: Nathan Chancellor <nathan@kernel.org> # build > Link: https://lists.freedesktop.org/archives/dri-devel/2022-June/359496.html Reviewed-by: Harry Wentland <harry.wentland@amd.com> Harry > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > index c9004f7e700d..33cd7a3d4ecb 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -6594,12 +6594,14 @@ dm_crtc_duplicate_state(struct drm_crtc *crtc) > return &state->base; > } > > +#ifdef CONFIG_DEBUG_FS > static int amdgpu_dm_crtc_late_register(struct drm_crtc *crtc) > { > crtc_debugfs_init(crtc); > > return 0; > } > +#endif > > static inline int dm_set_vupdate_irq(struct drm_crtc *crtc, bool enable) > { > @@ -6693,7 +6695,9 @@ static const struct drm_crtc_funcs amdgpu_dm_crtc_funcs = { > .enable_vblank = dm_enable_vblank, > .disable_vblank = dm_disable_vblank, > .get_vblank_timestamp = drm_crtc_vblank_helper_get_vblank_timestamp, > +#if defined(CONFIG_DEBUG_FS) > .late_register = amdgpu_dm_crtc_late_register, > +#endif > }; > > static enum drm_connector_status
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index c9004f7e700d..33cd7a3d4ecb 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6594,12 +6594,14 @@ dm_crtc_duplicate_state(struct drm_crtc *crtc) return &state->base; } +#ifdef CONFIG_DEBUG_FS static int amdgpu_dm_crtc_late_register(struct drm_crtc *crtc) { crtc_debugfs_init(crtc); return 0; } +#endif static inline int dm_set_vupdate_irq(struct drm_crtc *crtc, bool enable) { @@ -6693,7 +6695,9 @@ static const struct drm_crtc_funcs amdgpu_dm_crtc_funcs = { .enable_vblank = dm_enable_vblank, .disable_vblank = dm_disable_vblank, .get_vblank_timestamp = drm_crtc_vblank_helper_get_vblank_timestamp, +#if defined(CONFIG_DEBUG_FS) .late_register = amdgpu_dm_crtc_late_register, +#endif }; static enum drm_connector_status