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

drm/amdgpu: change function declarations and add missing header dependencies

We get a few warnings when building kernel with W=1:
drivers/gpu/drm/amd/amdgpu/atombios_crtc.c:38:6: warning: no previous prototype for 'amdgpu_atombios_crtc_overscan_setup' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c:661:6: warning: no previous prototype for 'dce_v8_0_disable_dce' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:40:5: warning: no previous prototype for 'amdgpu_gfx_scratch_get' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:62:6: warning: no previous prototype for 'amdgpu_gfx_scratch_free' [-Wmissing-prototypes]
....

In fact, these functions are declared in
drivers/gpu/drm/amd/amdgpu/atombios_crtc.h
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
drivers/gpu/drm/amd/amdgpu/dce_v8_0.h
drivers/gpu/drm/amd/amdgpu/dce_v10_0.h
drivers/gpu/drm/amd/amdgpu/dce_v11_0.h
drivers/gpu/drm/amd/powerplay/inc/pp_acpi.h.
So this patch adds missing header dependencies.

By the way, this patch changes declaration of amdgpu_gfx_parse_disable_cu()
to subject to its implement, and clean three function declarations
in pp_acpi.h up.

Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Baoyou Xie and committed by
Alex Deucher
356aee30 f93932bc

+11 -7
+1
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
··· 24 24 */ 25 25 #include <drm/drmP.h> 26 26 #include "amdgpu.h" 27 + #include "amdgpu_gfx.h" 27 28 28 29 /* 29 30 * GPU scratch registers helpers function.
+2 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
··· 27 27 int amdgpu_gfx_scratch_get(struct amdgpu_device *adev, uint32_t *reg); 28 28 void amdgpu_gfx_scratch_free(struct amdgpu_device *adev, uint32_t reg); 29 29 30 - unsigned amdgpu_gfx_parse_disable_cu(unsigned *mask, unsigned max_se, unsigned max_sh); 30 + void amdgpu_gfx_parse_disable_cu(unsigned *mask, unsigned max_se, 31 + unsigned max_sh); 31 32 32 33 #endif
+1
drivers/gpu/drm/amd/amdgpu/atombios_crtc.c
··· 31 31 #include "atom.h" 32 32 #include "atom-bits.h" 33 33 #include "atombios_encoders.h" 34 + #include "atombios_crtc.h" 34 35 #include "amdgpu_atombios.h" 35 36 #include "amdgpu_pll.h" 36 37 #include "amdgpu_connectors.h"
+1
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
··· 31 31 #include "atombios_encoders.h" 32 32 #include "amdgpu_pll.h" 33 33 #include "amdgpu_connectors.h" 34 + #include "dce_v10_0.h" 34 35 35 36 #include "dce/dce_10_0_d.h" 36 37 #include "dce/dce_10_0_sh_mask.h"
+1
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
··· 31 31 #include "atombios_encoders.h" 32 32 #include "amdgpu_pll.h" 33 33 #include "amdgpu_connectors.h" 34 + #include "dce_v11_0.h" 34 35 35 36 #include "dce/dce_11_0_d.h" 36 37 #include "dce/dce_11_0_sh_mask.h"
+1
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
··· 31 31 #include "atombios_encoders.h" 32 32 #include "amdgpu_pll.h" 33 33 #include "amdgpu_connectors.h" 34 + #include "dce_v8_0.h" 34 35 35 36 #include "dce/dce_8_0_d.h" 36 37 #include "dce/dce_8_0_sh_mask.h"
+1
drivers/gpu/drm/amd/powerplay/hwmgr/pp_acpi.c
··· 25 25 #include "linux/delay.h" 26 26 #include "hwmgr.h" 27 27 #include "amd_acpi.h" 28 + #include "pp_acpi.h" 28 29 29 30 bool acpi_atcs_functions_supported(void *device, uint32_t index) 30 31 {
+3 -6
drivers/gpu/drm/amd/powerplay/inc/pp_acpi.h
··· 21 21 * 22 22 */ 23 23 24 - extern bool acpi_atcs_functions_supported(void *device, 25 - uint32_t index); 26 - extern int acpi_pcie_perf_request(void *device, 27 - uint8_t perf_req, 28 - bool advertise); 29 - extern bool acpi_atcs_notify_pcie_device_ready(void *device); 24 + bool acpi_atcs_functions_supported(void *device, uint32_t index); 25 + int acpi_pcie_perf_request(void *device, uint8_t perf_req, bool advertise); 26 + bool acpi_atcs_notify_pcie_device_ready(void *device);