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

drm/radeon/evergreen: Move 'cayman_*()'s prototypes to shared header

Fixes the following W=1 kernel build warning(s):

drivers/gpu/drm/radeon/ni.c:1378:6: warning: no previous prototype for ‘cayman_cp_int_cntl_setup’ [-Wmissing-prototypes]
1378 | void cayman_cp_int_cntl_setup(struct radeon_device *rdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/ni.c:1732:5: warning: no previous prototype for ‘cayman_gpu_check_soft_reset’ [-Wmissing-prototypes]
1732 | u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lee Jones and committed by
Alex Deucher
ef072392 8595a0bf

+38 -4
+1 -4
drivers/gpu/drm/radeon/evergreen.c
··· 31 31 32 32 #include "atom.h" 33 33 #include "avivod.h" 34 + #include "ni.h" 34 35 #include "rv770.h" 35 36 #include "evergreen.h" 36 37 #include "evergreen_blit_shaders.h" ··· 216 215 void evergreen_fini(struct radeon_device *rdev); 217 216 void evergreen_pcie_gen2_enable(struct radeon_device *rdev); 218 217 void evergreen_program_aspm(struct radeon_device *rdev); 219 - extern void cayman_cp_int_cntl_setup(struct radeon_device *rdev, 220 - int ring, u32 cp_int_cntl); 221 - extern void cayman_vm_decode_fault(struct radeon_device *rdev, 222 - u32 status, u32 addr); 223 218 void cik_init_cp_pg_table(struct radeon_device *rdev); 224 219 225 220 extern u32 si_get_csb_size(struct radeon_device *rdev);
+1
drivers/gpu/drm/radeon/ni.c
··· 33 33 #include "cayman_blit_shaders.h" 34 34 #include "clearstate_cayman.h" 35 35 #include "evergreen.h" 36 + #include "ni.h" 36 37 #include "ni_reg.h" 37 38 #include "nid.h" 38 39 #include "radeon.h"
+36
drivers/gpu/drm/radeon/ni.h
··· 1 + /* ni.h -- Private header for radeon driver -*- linux-c -*- 2 + * 3 + * Copyright 2010 Advanced Micro Devices, Inc. 4 + * 5 + * Permission is hereby granted, free of charge, to any person obtaining a 6 + * copy of this software and associated documentation files (the "Software"), 7 + * to deal in the Software without restriction, including without limitation 8 + * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 + * and/or sell copies of the Software, and to permit persons to whom the 10 + * Software is furnished to do so, subject to the following conditions: 11 + * 12 + * The above copyright notice and this permission notice (including the next 13 + * paragraph) shall be included in all copies or substantial portions of the 14 + * Software. 15 + * 16 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22 + * DEALINGS IN THE SOFTWARE. 23 + * 24 + */ 25 + 26 + #ifndef __NI_H__ 27 + #define __NI_H__ 28 + 29 + struct radeon_device; 30 + 31 + void cayman_cp_int_cntl_setup(struct radeon_device *rdev, 32 + int ring, u32 cp_int_cntl); 33 + void cayman_vm_decode_fault(struct radeon_device *rdev, 34 + u32 status, u32 addr); 35 + 36 + #endif /* __NI_H__ */