summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
diff options
context:
space:
mode:
authorMagali Lemes <magalilemes00@gmail.com>2022-02-24 16:15:49 -0300
committerAlex Deucher <alexander.deucher@amd.com>2022-02-24 17:26:16 -0500
commitb3e8239882d9f5870bcd78baa342b0cc42c1fbb3 (patch)
treed70750f44dd893a26984566e2d71746568f97078 /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
parent8054e2f01c2cd287a3872baa02e30ea836ec8070 (diff)
drm/amd/display: Add conditional around function
When CONFIG_DRM_AMD_DC_DCN is not set, the function 'dm_helpers_enable_periodic_detection' doesn't have its prototype defined, causing the following warning: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:805:6: warning: no previous prototype for function 'dm_helpers_enable_periodic_detection' [-Wmissing-prototypes] void dm_helpers_enable_periodic_detection(struct dc_context *ctx, bool enable) ^ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:805:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void dm_helpers_enable_periodic_detection(struct dc_context *ctx, bool enable) ^ static 1 warning generated. This commit silences this warning by adding a conditional directive around the mentioned function, and also corrects a small spelling error. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Magali Lemes <magalilemes00@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c')
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 010498ff5911..f5f39984702f 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -977,7 +977,9 @@ void dm_set_phyd32clk(struct dc_context *ctx, int freq_khz)
// TODO
}
+#if defined(CONFIG_DRM_AMD_DC_DCN)
void dm_helpers_enable_periodic_detection(struct dc_context *ctx, bool enable)
{
- /* TODO: add peridic detection implementation */
+ /* TODO: add periodic detection implementation */
}
+#endif