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

drm/amd/display: dumb_abm_lcd: avoid missing-prototype warnings

The dmub_abm_set_ambient_level() function has no caller and can
just be removed, the other ones have a declaration in the
header file and just need to see the prototype:

drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:122:14: error: no previous prototype for function 'dmub_abm_get_current_backlight' [-Werror,-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:133:14: error: no previous prototype for function 'dmub_abm_get_target_backlight' [-Werror,-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:144:6: error: no previous prototype for function 'dmub_abm_set_level' [-Werror,-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:163:6: error: no previous prototype for function 'dmub_abm_set_ambient_level' [-Werror,-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:183:6: error: no previous prototype for function 'dmub_abm_init_config' [-Werror,-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:213:6: error: no previous prototype for function 'dmub_abm_set_pause' [-Werror,-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:231:6: error: no previous prototype for function 'dmub_abm_set_pipe' [-Werror,-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:251:6: error: no previous prototype for function 'dmub_abm_set_backlight_level' [-Werror,-Wmissing-prototypes]

Fixes: b8fe56375f78 ("drm/amd/display: Refactor ABM feature")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Arnd Bergmann and committed by
Alex Deucher
0026c273 4371fa77

+1 -21
+1 -21
drivers/gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c
··· 24 24 */ 25 25 26 26 #include "dmub_abm.h" 27 + #include "dmub_abm_lcd.h" 27 28 #include "dce_abm.h" 28 29 #include "dc.h" 29 30 #include "dc_dmub_srv.h" ··· 159 158 160 159 return true; 161 160 } 162 - 163 - #ifndef TRIM_AMBIENT_GAMMA 164 - void dmub_abm_set_ambient_level(struct abm *abm, unsigned int ambient_lux, uint8_t panel_mask) 165 - { 166 - union dmub_rb_cmd cmd; 167 - struct dc_context *dc = abm->ctx; 168 - 169 - if (ambient_lux > 0xFFFF) 170 - ambient_lux = 0xFFFF; 171 - 172 - memset(&cmd, 0, sizeof(cmd)); 173 - cmd.abm_set_ambient_level.header.type = DMUB_CMD__ABM; 174 - cmd.abm_set_ambient_level.header.sub_type = DMUB_CMD__ABM_SET_AMBIENT_LEVEL; 175 - cmd.abm_set_ambient_level.abm_set_ambient_level_data.ambient_lux = ambient_lux; 176 - cmd.abm_set_ambient_level.abm_set_ambient_level_data.version = DMUB_CMD_ABM_CONTROL_VERSION_1; 177 - cmd.abm_set_ambient_level.abm_set_ambient_level_data.panel_mask = panel_mask; 178 - cmd.abm_set_ambient_level.header.payload_bytes = sizeof(struct dmub_cmd_abm_set_ambient_level_data); 179 - 180 - dm_execute_dmub_cmd(dc, &cmd, DM_DMUB_WAIT_TYPE_WAIT); 181 - } 182 - #endif 183 161 184 162 void dmub_abm_init_config(struct abm *abm, 185 163 const char *src,