drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: 80381d40c9bf5218db06a7d7246c5478c95987ee drm/amd/powerplay: fix pre-check condition for setting clock range
date: 3 months ago
config: x86_64-randconfig-s022-20200617 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-6-g78f577f8-dirty
git checkout 80381d40c9bf5218db06a7d7246c5478c95987ee
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/firmware.h:6,
from drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:23:
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c: In function 'smu_set_soft_freq_range':
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
225 | if (min < 0 && max < 0)
| ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
225 | if (min < 0 && max < 0)
| ^~
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:21: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
225 | if (min < 0 && max < 0)
| ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
225 | if (min < 0 && max < 0)
| ^~
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
225 | if (min < 0 && max < 0)
| ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
225 | if (min < 0 && max < 0)
| ^~
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:21: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
225 | if (min < 0 && max < 0)
| ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
225 | if (min < 0 && max < 0)
| ^~
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
225 | if (min < 0 && max < 0)
| ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) ? | ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
225 | if (min < 0 && max < 0)
| ^~
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:21: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
225 | if (min < 0 && max < 0)
| ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) ? | ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
225 | if (min < 0 && max < 0)
| ^~
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c: At top level:
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:1703:5: warning: no previous prototype for 'smu_adjust_power_state_dynamic' [-Wmissing-prototypes]
1703 | int smu_adjust_power_state_dynamic(struct smu_context *smu,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:31:
drivers/gpu/drm/amd/amdgpu/../powerplay/inc/smu_v11_0.h:68:43: warning: 'smu11_thermal_policy' defined but not used [-Wunused-const-variable=]
68 | static const struct smu_temperature_range smu11_thermal_policy[] =
| ^~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:27:
drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:177:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=]
177 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
| ^~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:53,
from drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:27:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
| ^~~~~~~~~~~~~
vim +/if +225 drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c
219
220 int smu_set_soft_freq_range(struct smu_context *smu, enum smu_clk_type clk_type,
221 uint32_t min, uint32_t max)
222 {
223 int ret = 0;
224
> 225 if (min < 0 && max < 0)
226 return -EINVAL;
227
228 if (!smu_clk_dpm_is_enabled(smu, clk_type))
229 return 0;
230
231 ret = smu_set_soft_freq_limited_range(smu, clk_type, min, max);
232 return ret;
233 }
234
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c:48:6: warning: no previous prototype for 'dce_panel_cntl_hw_init'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: d4caa72e275c1920d38a9541b2e4dcc167733734 drm/amd/display: change from panel to panel cntl
date: 8 weeks ago
config: ia64-randconfig-r012-20200617 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout d4caa72e275c1920d38a9541b2e4dcc167733734
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c:48:6: warning: no previous prototype for 'dce_panel_cntl_hw_init' [-Wmissing-prototypes]
48 | void dce_panel_cntl_hw_init(struct panel_cntl *panel_cntl)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c:53:6: warning: no previous prototype for 'dce_is_panel_backlight_on' [-Wmissing-prototypes]
53 | bool dce_is_panel_backlight_on(struct panel_cntl *panel_cntl)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c:63:6: warning: no previous prototype for 'dce_is_panel_powered_on' [-Wmissing-prototypes]
63 | bool dce_is_panel_powered_on(struct panel_cntl *panel_cntl)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:86,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c:27:
drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/dpp.h:50:42: warning: 'dpp_input_csc_matrix' defined but not used [-Wunused-const-variable=]
50 | static const struct dpp_input_csc_matrix dpp_input_csc_matrix[] = {
| ^~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:32,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c:27:
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:124:22: warning: 'DP_DVI_CONVERTER_ID_4' defined but not used [-Wunused-const-variable=]
124 | static const uint8_t DP_DVI_CONVERTER_ID_4[] = "m2DVIa";
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:122:22: warning: 'DP_VGA_LVDS_CONVERTER_ID_3' defined but not used [-Wunused-const-variable=]
122 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3[] = "dnomlA";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:120:22: warning: 'DP_VGA_LVDS_CONVERTER_ID_2' defined but not used [-Wunused-const-variable=]
120 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2[] = "sivarT";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:37,
from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/reg_helper.h:28,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c:26:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
| ^~~~~~~~~~~~~
vim +/dce_panel_cntl_hw_init +48 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c
31
32 #define TO_DCE_PANEL_CNTL(panel_cntl)\
33 container_of(panel_cntl, struct dce_panel_cntl, base)
34
35 #define CTX \
36 dce_panel_cntl->base.ctx
37
38 #define DC_LOGGER \
39 dce_panel_cntl->base.ctx->logger
40
41 #define REG(reg)\
42 dce_panel_cntl->regs->reg
43
44 #undef FN
45 #define FN(reg_name, field_name) \
46 dce_panel_cntl->shift->field_name, dce_panel_cntl->mask->field_name
47
> 48 void dce_panel_cntl_hw_init(struct panel_cntl *panel_cntl)
49 {
50
51 }
52
> 53 bool dce_is_panel_backlight_on(struct panel_cntl *panel_cntl)
54 {
55 struct dce_panel_cntl *dce_panel_cntl = TO_DCE_PANEL_CNTL(panel_cntl);
56 uint32_t value;
57
58 REG_GET(PWRSEQ_CNTL, BLON, &value);
59
60 return value;
61 }
62
> 63 bool dce_is_panel_powered_on(struct panel_cntl *panel_cntl)
64 {
65 struct dce_panel_cntl *dce_panel_cntl = TO_DCE_PANEL_CNTL(panel_cntl);
66 uint32_t pwr_seq_state, dig_on, dig_on_ovrd;
67
68 REG_GET(PWRSEQ_STATE, PWRSEQ_TARGET_STATE_R, &pwr_seq_state);
69
70 REG_GET_2(PWRSEQ_CNTL, DIGON, &dig_on, DIGON_OVRD, &dig_on_ovrd);
71
72 return (pwr_seq_state == 1) || (dig_on == 1 && dig_on_ovrd == 1);
73 }
74
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:451:5: warning: no previous prototype for function 'jpeg_v1_0_early_init'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: bb0db70f3f75e0d994a627f22c3ff2d8ec6191c4 drm/amdgpu: separate JPEG1.0 code out from VCN1.0
date: 7 months ago
config: s390-randconfig-r004-20200617 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390-linux-gnu
git checkout bb0db70f3f75e0d994a627f22c3ff2d8ec6191c4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:17:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:118:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | ^
In file included from drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:24:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:57:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:17:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:118:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | ^
In file included from drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:24:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:57:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:17:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:118:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:24:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:57:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:17:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:24:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:57:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:17:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:503:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:513:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew(cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:523:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel(cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:585:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:593:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:601:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:610:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:619:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:628:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:451:5: warning: no previous prototype for function 'jpeg_v1_0_early_init' [-Wmissing-prototypes]
int jpeg_v1_0_early_init(void *handle)
^
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:451:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int jpeg_v1_0_early_init(void *handle)
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:469:5: warning: no previous prototype for function 'jpeg_v1_0_sw_init' [-Wmissing-prototypes]
int jpeg_v1_0_sw_init(void *handle)
^
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:469:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int jpeg_v1_0_sw_init(void *handle)
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:499:6: warning: no previous prototype for function 'jpeg_v1_0_sw_fini' [-Wmissing-prototypes]
void jpeg_v1_0_sw_fini(void *handle)
^
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:499:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void jpeg_v1_0_sw_fini(void *handle)
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:513:6: warning: no previous prototype for function 'jpeg_v1_0_start' [-Wmissing-prototypes]
void jpeg_v1_0_start(struct amdgpu_device *adev, int mode)
^
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:513:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void jpeg_v1_0_start(struct amdgpu_device *adev, int mode)
^
static
24 warnings generated.
vim +/jpeg_v1_0_early_init +451 drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c
443
444 /**
445 * jpeg_v1_0_early_init - set function pointers
446 *
447 * @handle: amdgpu_device pointer
448 *
449 * Set ring and irq function pointers
450 */
> 451 int jpeg_v1_0_early_init(void *handle)
452 {
453 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
454
455 adev->jpeg.num_jpeg_inst = 1;
456
457 jpeg_v1_0_set_dec_ring_funcs(adev);
458 jpeg_v1_0_set_irq_funcs(adev);
459
460 return 0;
461 }
462
463 /**
464 * jpeg_v1_0_sw_init - sw init for JPEG block
465 *
466 * @handle: amdgpu_device pointer
467 *
468 */
> 469 int jpeg_v1_0_sw_init(void *handle)
470 {
471 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
472 struct amdgpu_ring *ring;
473 int r;
474
475 /* JPEG TRAP */
476 r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_VCN, 126, &adev->jpeg.inst->irq);
477 if (r)
478 return r;
479
480 ring = &adev->jpeg.inst->ring_dec;
481 sprintf(ring->name, "jpeg_dec");
482 r = amdgpu_ring_init(adev, ring, 512, &adev->jpeg.inst->irq, 0);
483 if (r)
484 return r;
485
486 adev->jpeg.internal.jpeg_pitch = adev->jpeg.inst->external.jpeg_pitch =
487 SOC15_REG_OFFSET(JPEG, 0, mmUVD_JPEG_PITCH);
488
489 return 0;
490 }
491
492 /**
493 * jpeg_v1_0_sw_fini - sw fini for JPEG block
494 *
495 * @handle: amdgpu_device pointer
496 *
497 * JPEG free up sw allocation
498 */
> 499 void jpeg_v1_0_sw_fini(void *handle)
500 {
501 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
502
503 amdgpu_ring_fini(&adev->jpeg.inst[0].ring_dec);
504 }
505
506 /**
507 * jpeg_v1_0_start - start JPEG block
508 *
509 * @adev: amdgpu_device pointer
510 *
511 * Setup and start the JPEG block
512 */
> 513 void jpeg_v1_0_start(struct amdgpu_device *adev, int mode)
514 {
515 struct amdgpu_ring *ring = &adev->jpeg.inst->ring_dec;
516
517 if (mode == 0) {
518 WREG32_SOC15(JPEG, 0, mmUVD_LMI_JRBC_RB_VMID, 0);
519 WREG32_SOC15(JPEG, 0, mmUVD_JRBC_RB_CNTL, UVD_JRBC_RB_CNTL__RB_NO_FETCH_MASK |
520 UVD_JRBC_RB_CNTL__RB_RPTR_WR_EN_MASK);
521 WREG32_SOC15(JPEG, 0, mmUVD_LMI_JRBC_RB_64BIT_BAR_LOW, lower_32_bits(ring->gpu_addr));
522 WREG32_SOC15(JPEG, 0, mmUVD_LMI_JRBC_RB_64BIT_BAR_HIGH, upper_32_bits(ring->gpu_addr));
523 WREG32_SOC15(JPEG, 0, mmUVD_JRBC_RB_RPTR, 0);
524 WREG32_SOC15(JPEG, 0, mmUVD_JRBC_RB_WPTR, 0);
525 } WREG32_SOC15(JPEG, 0, mmUVD_JRBC_RB_CNTL, UVD_JRBC_RB_CNTL__RB_RPTR_WR_EN_MASK);
526
527 /* initialize wptr */
528 ring->wptr = RREG32_SOC15(JPEG, 0, mmUVD_JRBC_RB_WPTR);
529
530 /* copy patch commands to the jpeg ring */
531 jpeg_v1_0_decode_ring_set_patch_ring(ring,
532 (ring->wptr + ring->max_dw * amdgpu_sched_hw_submission));
533 }
534
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[chrome-os:chromeos-4.19 55/62] kernel/sched/rt.c:1587:2: warning: Variable 'rt_rq' is reassigned a value before the old one has been used.
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: d2eeef58809494b0ea811ce578163de7a2478a22
commit: cfff5c5f9c0a9b899e38ed65fb7d925d6b5a5bfa [55/62] FROMLIST: sched/core: Update core scheduler queue when taking cpu online/offline
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
kernel/sched/rt.c:743:10: warning: Same expression on both sides of '-='. [duplicateExpression]
want -= want;
^
kernel/sched/rt.c:727:18: warning: Local variable iter shadows outer variable [shadowVar]
struct rt_rq *iter = sched_rt_period_rt_rq(rt_b, i);
^
kernel/sched/rt.c:693:15: note: Shadowed declaration
rt_rq_iter_t iter;
^
kernel/sched/rt.c:727:18: note: Shadow variable
struct rt_rq *iter = sched_rt_period_rt_rq(rt_b, i);
^
kernel/sched/rt.c:699:2: warning: Uninitialized variable: iter [uninitvar]
for_each_rt_rq(rt_rq, iter, rq) {
^
kernel/sched/rt.c:783:2: warning: Uninitialized variable: iter [uninitvar]
for_each_rt_rq(rt_rq, iter, rq) {
^
>> kernel/sched/rt.c:1587:2: warning: Variable 'rt_rq' is reassigned a value before the old one has been used. [redundantAssignment]
for_each_rt_rq(rt_rq, iter, rq) {
^
kernel/sched/rt.c:1583:0: note: Variable 'rt_rq' is reassigned a value before the old one has been used.
struct rt_rq *rt_rq = &rq->rt;
^
kernel/sched/rt.c:1587:2: note: Variable 'rt_rq' is reassigned a value before the old one has been used.
for_each_rt_rq(rt_rq, iter, rq) {
^
kernel/sched/rt.c:1587:2: warning: Uninitialized variable: iter [uninitvar]
for_each_rt_rq(rt_rq, iter, rq) {
^
vim +/rt_rq +1587 kernel/sched/rt.c
1575
1576 static void for_each_rt_task(struct rq *rq,
1577 void (*fn)(struct rq *rq, struct task_struct *p))
1578 {
1579 rt_rq_iter_t iter;
1580 struct rt_prio_array *array;
1581 struct list_head *queue;
1582 int i;
1583 struct rt_rq *rt_rq = &rq->rt;
1584 struct sched_rt_entity *rt_se = NULL;
1585 struct task_struct *task;
1586
> 1587 for_each_rt_rq(rt_rq, iter, rq) {
1588 array = &rt_rq->active;
1589 for (i = 0; i < MAX_RT_PRIO; i++) {
1590 queue = array->queue + i;
1591 list_for_each_entry(rt_se, queue, run_list) {
1592 if (rt_entity_is_task(rt_se)) {
1593 task = rt_task_of(rt_se);
1594 fn(rq, task);
1595 }
1596 }
1597 }
1598 }
1599 }
1600
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
kernel/bpf/cgroup.c:1111:13: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: 0d01da6afc5402f60325c5da31b22f7d56689b49 bpf: implement getsockopt and setsockopt hooks
date: 12 months ago
config: openrisc-randconfig-s032-20200617 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-6-g78f577f8-dirty
git checkout 0d01da6afc5402f60325c5da31b22f7d56689b49
# save the attached .config to linux build tree
make W=1 C=1 ARCH=openrisc CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
kernel/bpf/cgroup.c:1073:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] <asn:1> *optlen @@
kernel/bpf/cgroup.c:1073:21: sparse: expected int const *__gu_addr
kernel/bpf/cgroup.c:1073:21: sparse: got int [noderef] <asn:1> *optlen
>> kernel/bpf/cgroup.c:1111:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int *__pu_addr @@ got int [noderef] <asn:1> *optlen @@
>> kernel/bpf/cgroup.c:1111:13: sparse: expected int *__pu_addr
kernel/bpf/cgroup.c:1111:13: sparse: got int [noderef] <asn:1> *optlen
include/linux/uaccess.h:131:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *to @@ got void [noderef] <asn:1> *to @@
include/linux/uaccess.h:131:38: sparse: expected void *to
include/linux/uaccess.h:131:38: sparse: got void [noderef] <asn:1> *to
include/linux/uaccess.h:131:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got void const *from @@
include/linux/uaccess.h:131:42: sparse: expected void const [noderef] <asn:1> *from
include/linux/uaccess.h:131:42: sparse: got void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void const [noderef] <asn:1> *from @@
arch/openrisc/include/asm/uaccess.h:246:55: sparse: expected void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: got void const [noderef] <asn:1> *from
include/linux/uaccess.h:131:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *to @@ got void [noderef] <asn:1> *to @@
include/linux/uaccess.h:131:38: sparse: expected void *to
include/linux/uaccess.h:131:38: sparse: got void [noderef] <asn:1> *to
include/linux/uaccess.h:131:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got void const *from @@
include/linux/uaccess.h:131:42: sparse: expected void const [noderef] <asn:1> *from
include/linux/uaccess.h:131:42: sparse: got void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void const [noderef] <asn:1> *from @@
arch/openrisc/include/asm/uaccess.h:246:55: sparse: expected void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: got void const [noderef] <asn:1> *from
include/linux/uaccess.h:131:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *to @@ got void [noderef] <asn:1> *to @@
include/linux/uaccess.h:131:38: sparse: expected void *to
include/linux/uaccess.h:131:38: sparse: got void [noderef] <asn:1> *to
include/linux/uaccess.h:131:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got void const *from @@
include/linux/uaccess.h:131:42: sparse: expected void const [noderef] <asn:1> *from
include/linux/uaccess.h:131:42: sparse: got void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void const [noderef] <asn:1> *from @@
arch/openrisc/include/asm/uaccess.h:246:55: sparse: expected void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: got void const [noderef] <asn:1> *from
include/linux/uaccess.h:131:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *to @@ got void [noderef] <asn:1> *to @@
include/linux/uaccess.h:131:38: sparse: expected void *to
include/linux/uaccess.h:131:38: sparse: got void [noderef] <asn:1> *to
include/linux/uaccess.h:131:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got void const *from @@
include/linux/uaccess.h:131:42: sparse: expected void const [noderef] <asn:1> *from
include/linux/uaccess.h:131:42: sparse: got void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void const [noderef] <asn:1> *from @@
arch/openrisc/include/asm/uaccess.h:246:55: sparse: expected void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: got void const [noderef] <asn:1> *from
vim +1111 kernel/bpf/cgroup.c
1038
1039 int __cgroup_bpf_run_filter_getsockopt(struct sock *sk, int level,
1040 int optname, char __user *optval,
1041 int __user *optlen, int max_optlen,
1042 int retval)
1043 {
1044 struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data);
1045 struct bpf_sockopt_kern ctx = {
1046 .sk = sk,
1047 .level = level,
1048 .optname = optname,
1049 .retval = retval,
1050 };
1051 int ret;
1052
1053 /* Opportunistic check to see whether we have any BPF program
1054 * attached to the hook so we don't waste time allocating
1055 * memory and locking the socket.
1056 */
1057 if (!cgroup_bpf_enabled ||
1058 __cgroup_bpf_prog_array_is_empty(cgrp, BPF_CGROUP_GETSOCKOPT))
1059 return retval;
1060
1061 ret = sockopt_alloc_buf(&ctx, max_optlen);
1062 if (ret)
1063 return ret;
1064
1065 if (!retval) {
1066 /* If kernel getsockopt finished successfully,
1067 * copy whatever was returned to the user back
1068 * into our temporary buffer. Set optlen to the
1069 * one that kernel returned as well to let
1070 * BPF programs inspect the value.
1071 */
1072
> 1073 if (get_user(ctx.optlen, optlen)) {
1074 ret = -EFAULT;
1075 goto out;
1076 }
1077
1078 if (ctx.optlen > max_optlen)
1079 ctx.optlen = max_optlen;
1080
1081 if (copy_from_user(ctx.optval, optval, ctx.optlen) != 0) {
1082 ret = -EFAULT;
1083 goto out;
1084 }
1085 }
1086
1087 lock_sock(sk);
1088 ret = BPF_PROG_RUN_ARRAY(cgrp->bpf.effective[BPF_CGROUP_GETSOCKOPT],
1089 &ctx, BPF_PROG_RUN);
1090 release_sock(sk);
1091
1092 if (!ret) {
1093 ret = -EPERM;
1094 goto out;
1095 }
1096
1097 if (ctx.optlen > max_optlen) {
1098 ret = -EFAULT;
1099 goto out;
1100 }
1101
1102 /* BPF programs only allowed to set retval to 0, not some
1103 * arbitrary value.
1104 */
1105 if (ctx.retval != 0 && ctx.retval != retval) {
1106 ret = -EFAULT;
1107 goto out;
1108 }
1109
1110 if (copy_to_user(optval, ctx.optval, ctx.optlen) ||
> 1111 put_user(ctx.optlen, optlen)) {
1112 ret = -EFAULT;
1113 goto out;
1114 }
1115
1116 ret = ctx.retval;
1117
1118 out:
1119 sockopt_free_buf(&ctx);
1120 return ret;
1121 }
1122 EXPORT_SYMBOL(__cgroup_bpf_run_filter_getsockopt);
1123
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[radeon-alex:drm-next 333/414] arch/arc/include/asm/bug.h:22:2: error: implicit declaration of function 'pr_warn'; did you mean
by kernel test robot
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next
head: f59073f6df9b07d94917221486cf5929efa6b315
commit: 5872ef0b03247fe659226973998ff28e835afbe4 [333/414] drm/amd/powerplay: forbid to use pr_err/warn/info/debug
config: arc-allyesconfig (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 5872ef0b03247fe659226973998ff28e835afbe4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:23:
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c: In function 'smu_v11_0_init_microcode':
>> arch/arc/include/asm/bug.h:22:2: error: implicit declaration of function 'pr_warn'; did you mean 'pci_warn'? [-Werror=implicit-function-declaration]
22 | pr_warn("BUG: failure at %s:%d/%s()!n", __FILE__, __LINE__, __func__); | ^~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:176:3: note: in expansion of macro 'BUG'
176 | BUG();
| ^~~
In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:30:
At top level:
drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:190:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=]
190 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
| ^~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:65,
from drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:30:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c: In function 'arcturus_is_dpm_running':
drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c:2112:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
2112 | int ret = 0;
| ^~~
In file included from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c:24:
drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c: In function 'arcturus_fill_eeprom_i2c_req':
arch/arc/include/asm/bug.h:22:2: error: implicit declaration of function 'pr_warn'; did you mean 'fb_warn'? [-Werror=implicit-function-declaration]
22 | pr_warn("BUG: failure at %s:%d/%s()!n", __FILE__, __LINE__, __func__); | ^~~~~~~
>> include/asm-generic/bug.h:62:57: note: in expansion of macro 'BUG'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c:2157:2: note: in expansion of macro 'BUG_ON'
2157 | BUG_ON(numbytes > MAX_SW_I2C_COMMANDS);
| ^~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c:30:
At top level:
drivers/gpu/drm/amd/amdgpu/../powerplay/inc/smu_v11_0.h:68:43: warning: 'smu11_thermal_policy' defined but not used [-Wunused-const-variable=]
68 | static const struct smu_temperature_range smu11_thermal_policy[] =
| ^~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c:25:
drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:190:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=]
190 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
| ^~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:65,
from drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c:25:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +22 arch/arc/include/asm/bug.h
3be80aaef861a6 Vineet Gupta 2013-01-18 20
3be80aaef861a6 Vineet Gupta 2013-01-18 21 #define BUG() do { \
3872d05299b5ab Vineet Gupta 2014-09-24 @22 pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
173a3efd3edb2e Arnd Bergmann 2018-02-21 23 barrier_before_unreachable(); \
173a3efd3edb2e Arnd Bergmann 2018-02-21 24 __builtin_trap(); \
3be80aaef861a6 Vineet Gupta 2013-01-18 25 } while (0)
3be80aaef861a6 Vineet Gupta 2013-01-18 26
:::::: The code at line 22 was first introduced by commit
:::::: 3872d05299b5ab58446f484df18f71cab4628c50 ARC: BUG() dumps stack after @msg (@msg now same as in generic BUG))
:::::: TO: Vineet Gupta <vgupta(a)synopsys.com>
:::::: CC: Vineet Gupta <vgupta(a)synopsys.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[linux-next:master 889/2089] drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:387:6: warning: variable 'ret' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5fcb9628fd1227a5f11d87171cb1b8b5c414d9d9
commit: d804515467cc80c34de8d523ad4dfaed1700526e [889/2089] drm/amdgpu: add Sienna_Cichlid VCN PG and CG support (v2)
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout d804515467cc80c34de8d523ad4dfaed1700526e
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c: In function 'vcn_v3_0_disable_static_power_gating':
>> drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:387:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
387 | int ret;
| ^~~
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c: In function 'vcn_v3_0_enable_static_power_gating':
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:439:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
439 | int ret;
| ^~~
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c: In function 'vcn_v3_0_disable_clock_gating':
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:493:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
493 | int ret = 0;
| ^~~
In file included from drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:25:
At top level:
drivers/gpu/drm/amd/amdgpu/amdgpu.h:190:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=]
190 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
| ^~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:65,
from drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:25:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
| ^~~~~~~~~~~~~
vim +/ret +387 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
383
384 static void vcn_v3_0_disable_static_power_gating(struct amdgpu_device *adev, int inst)
385 {
386 uint32_t data = 0;
> 387 int ret;
388
389 if (adev->pg_flags & AMD_PG_SUPPORT_VCN) {
390 data = (1 << UVD_PGFSM_CONFIG__UVDM_PWR_CONFIG__SHIFT
391 | 1 << UVD_PGFSM_CONFIG__UVDU_PWR_CONFIG__SHIFT
392 | 2 << UVD_PGFSM_CONFIG__UVDF_PWR_CONFIG__SHIFT
393 | 2 << UVD_PGFSM_CONFIG__UVDC_PWR_CONFIG__SHIFT
394 | 2 << UVD_PGFSM_CONFIG__UVDB_PWR_CONFIG__SHIFT
395 | 2 << UVD_PGFSM_CONFIG__UVDIRL_PWR_CONFIG__SHIFT
396 | 1 << UVD_PGFSM_CONFIG__UVDLM_PWR_CONFIG__SHIFT
397 | 2 << UVD_PGFSM_CONFIG__UVDTD_PWR_CONFIG__SHIFT
398 | 2 << UVD_PGFSM_CONFIG__UVDTE_PWR_CONFIG__SHIFT
399 | 2 << UVD_PGFSM_CONFIG__UVDE_PWR_CONFIG__SHIFT
400 | 2 << UVD_PGFSM_CONFIG__UVDAB_PWR_CONFIG__SHIFT
401 | 2 << UVD_PGFSM_CONFIG__UVDATD_PWR_CONFIG__SHIFT
402 | 2 << UVD_PGFSM_CONFIG__UVDNA_PWR_CONFIG__SHIFT
403 | 2 << UVD_PGFSM_CONFIG__UVDNB_PWR_CONFIG__SHIFT);
404
405 WREG32_SOC15(VCN, inst, mmUVD_PGFSM_CONFIG, data);
406 SOC15_WAIT_ON_RREG(VCN, inst, mmUVD_PGFSM_STATUS,
407 UVD_PGFSM_STATUS__UVDM_UVDU_UVDLM_PWR_ON_3_0, 0x3F3FFFFF, ret);
408 } else {
409 data = (1 << UVD_PGFSM_CONFIG__UVDM_PWR_CONFIG__SHIFT
410 | 1 << UVD_PGFSM_CONFIG__UVDU_PWR_CONFIG__SHIFT
411 | 1 << UVD_PGFSM_CONFIG__UVDF_PWR_CONFIG__SHIFT
412 | 1 << UVD_PGFSM_CONFIG__UVDC_PWR_CONFIG__SHIFT
413 | 1 << UVD_PGFSM_CONFIG__UVDB_PWR_CONFIG__SHIFT
414 | 1 << UVD_PGFSM_CONFIG__UVDIRL_PWR_CONFIG__SHIFT
415 | 1 << UVD_PGFSM_CONFIG__UVDLM_PWR_CONFIG__SHIFT
416 | 1 << UVD_PGFSM_CONFIG__UVDTD_PWR_CONFIG__SHIFT
417 | 1 << UVD_PGFSM_CONFIG__UVDTE_PWR_CONFIG__SHIFT
418 | 1 << UVD_PGFSM_CONFIG__UVDE_PWR_CONFIG__SHIFT
419 | 1 << UVD_PGFSM_CONFIG__UVDAB_PWR_CONFIG__SHIFT
420 | 1 << UVD_PGFSM_CONFIG__UVDATD_PWR_CONFIG__SHIFT
421 | 1 << UVD_PGFSM_CONFIG__UVDNA_PWR_CONFIG__SHIFT
422 | 1 << UVD_PGFSM_CONFIG__UVDNB_PWR_CONFIG__SHIFT);
423 WREG32_SOC15(VCN, inst, mmUVD_PGFSM_CONFIG, data);
424 SOC15_WAIT_ON_RREG(VCN, inst, mmUVD_PGFSM_STATUS, 0, 0x3F3FFFFF, ret);
425 }
426
427 data = RREG32_SOC15(VCN, inst, mmUVD_POWER_STATUS);
428 data &= ~0x103;
429 if (adev->pg_flags & AMD_PG_SUPPORT_VCN)
430 data |= UVD_PGFSM_CONFIG__UVDM_UVDU_PWR_ON |
431 UVD_POWER_STATUS__UVD_PG_EN_MASK;
432
433 WREG32_SOC15(VCN, inst, mmUVD_POWER_STATUS, data);
434 }
435
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[lkundrak-linux-mmp:lr/ariel 34/41] drivers/gpu/drm/armada/armada_drv.c:133:11: error: implicit declaration of function 'of_drm_find_bridge'
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp.git lr/ariel
head: 551dcc39c19e9fe56fe48a92ae52f31367ed8dd0
commit: b1253e8c01a0f0af5548c2b27fd64905ee46cfa2 [34/41] drm/armada: Use non-componentized bridges
config: arm-randconfig-r005-20200617 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b1253e8c01a0f0af5548c2b27fd64905ee46cfa2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/gpu/drm/armada/armada_drv.c: In function 'armada_drm_attach_bridge':
>> drivers/gpu/drm/armada/armada_drv.c:133:11: error: implicit declaration of function 'of_drm_find_bridge' [-Werror=implicit-function-declaration]
133 | bridge = of_drm_find_bridge(np);
| ^~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/armada/armada_drv.c:133:9: warning: assignment to 'struct drm_bridge *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
133 | bridge = of_drm_find_bridge(np);
| ^
>> drivers/gpu/drm/armada/armada_drv.c:134:22: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'struct drm_bridge *' [-Wformat=]
134 | printk ("XXX XX %08x %pOFfcFn", bridge, np);
| ~~~^ ~~~~~~
| | |
| unsigned int struct drm_bridge *
>> drivers/gpu/drm/armada/armada_drv.c:144:8: error: implicit declaration of function 'drm_bridge_attach' [-Werror=implicit-function-declaration]
144 | ret = drm_bridge_attach(encoder, bridge, NULL, 0);
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/of_drm_find_bridge +133 drivers/gpu/drm/armada/armada_drv.c
122
123 static int armada_drm_attach_bridge(struct drm_device *drm, struct device_node *np)
124 {
125 struct drm_encoder *encoder;
126 struct drm_bridge *bridge;
127 int ret;
128
129 encoder = devm_kzalloc(drm->dev, sizeof(*encoder), GFP_KERNEL);
130 if (encoder == NULL)
131 return -ENOMEM;
132
> 133 bridge = of_drm_find_bridge(np);
> 134 printk ("XXX XX %08x %pOFfcF\n", bridge, np);
135 if (!bridge)
136 return -EINVAL;
137
138 encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, np);
139 ret = drm_encoder_init(drm, encoder, &armada_drm_encoder_funcs,
140 DRM_MODE_ENCODER_TMDS, NULL);
141 if (ret)
142 return ret;
143
> 144 ret = drm_bridge_attach(encoder, bridge, NULL, 0);
145 if (ret)
146 drm_encoder_cleanup(encoder);
147
148 return ret;
149 }
150
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[linux-next:master 953/2089] drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:446:6: sparse: sparse: symbol 'vcn_v2_5_mc_resume_dpg_mode' was not declared. Should it be
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5fcb9628fd1227a5f11d87171cb1b8b5c414d9d9
commit: c422a628925d9733b0807d803133fb78a0a0f707 [953/2089] drm/amdgpu: rename macro for VCN2.0 2.5 and 3.0
config: i386-randconfig-s001-20200617 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-6-g78f577f8-dirty
git checkout c422a628925d9733b0807d803133fb78a0a0f707
# save the attached .config to linux build tree
make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:152:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:152:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:152:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:158:33: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:158:33: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:158:33: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:217:43: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int volatile [usertype] present_flag_0 @@ got restricted __le32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:217:43: sparse: expected unsigned int volatile [usertype] present_flag_0
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:217:43: sparse: got restricted __le32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:446:6: sparse: sparse: symbol 'vcn_v2_5_mc_resume_dpg_mode' was not declared. Should it be static?
>> drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:660:6: sparse: sparse: symbol 'vcn_v2_5_clock_gating_dpg_mode' was not declared. Should it be static?
>> drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:1303:5: sparse: sparse: symbol 'vcn_v2_5_stop_dpg_mode' was not declared. Should it be static?
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1389:63: warning: comparison of unsigned expression >= 0 is always true
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: 6eb3f7da3c332f23d4591063711b2a895ec2ab0f drm/amd/display: fix rn soc bb update
date: 7 weeks ago
config: i386-randconfig-s001-20200617 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-6-g78f577f8-dirty
git checkout 6eb3f7da3c332f23d4591063711b2a895ec2ab0f
# save the attached .config to linux build tree
make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h:13989:111: warning: initialized field overwritten [-Woverride-init]
13989 | #define CM0_CM_SHAPER_CONTROL__CM_SHAPER_LUT_MODE_MASK 0x00000003L
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_dpp.h:38:16: note: in expansion of macro 'CM0_CM_SHAPER_CONTROL__CM_SHAPER_LUT_MODE_MASK'
38 | .field_name = reg_name ## __ ## field_name ## post_fix
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:206:2: note: in expansion of macro 'TF_SF'
206 | TF_SF(CM0_CM_SHAPER_CONTROL, CM_SHAPER_LUT_MODE, mask_sh)
| ^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:548:2: note: in expansion of macro 'TF_REG_LIST_SH_MASK_DCN20_UPDATED'
548 | TF_REG_LIST_SH_MASK_DCN20_UPDATED(mask_sh), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:666:3: note: in expansion of macro 'TF_REG_LIST_SH_MASK_DCN20'
666 | TF_REG_LIST_SH_MASK_DCN20(_MASK),
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h:13989:111: note: (near initialization for 'tf_mask.CM_SHAPER_LUT_MODE')
13989 | #define CM0_CM_SHAPER_CONTROL__CM_SHAPER_LUT_MODE_MASK 0x00000003L
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_dpp.h:38:16: note: in expansion of macro 'CM0_CM_SHAPER_CONTROL__CM_SHAPER_LUT_MODE_MASK'
38 | .field_name = reg_name ## __ ## field_name ## post_fix
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:206:2: note: in expansion of macro 'TF_SF'
206 | TF_SF(CM0_CM_SHAPER_CONTROL, CM_SHAPER_LUT_MODE, mask_sh)
| ^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:548:2: note: in expansion of macro 'TF_REG_LIST_SH_MASK_DCN20_UPDATED'
548 | TF_REG_LIST_SH_MASK_DCN20_UPDATED(mask_sh), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:666:3: note: in expansion of macro 'TF_REG_LIST_SH_MASK_DCN20'
666 | TF_REG_LIST_SH_MASK_DCN20(_MASK),
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h:33815:111: warning: initialized field overwritten [-Woverride-init]
33815 | #define DP_AUX0_AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE__SHIFT 0x1f
| ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:214:16: note: in expansion of macro 'DP_AUX0_AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE__SHIFT'
214 | .field_name = reg_name ## __ ## field_name ## post_fix
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:204:2: note: in expansion of macro 'AUX_SF'
204 | AUX_SF(DP_AUX0_AUX_SW_DATA, AUX_SW_AUTOINCREMENT_DISABLE, mask_sh), | ^~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:684:2: note: in expansion of macro 'DCN_AUX_MASK_SH_LIST'
684 | DCN_AUX_MASK_SH_LIST(__SHIFT)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h:33815:111: note: (near initialization for 'aux_shift.AUX_SW_AUTOINCREMENT_DISABLE')
33815 | #define DP_AUX0_AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE__SHIFT 0x1f
| ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:214:16: note: in expansion of macro 'DP_AUX0_AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE__SHIFT'
214 | .field_name = reg_name ## __ ## field_name ## post_fix
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:204:2: note: in expansion of macro 'AUX_SF'
204 | AUX_SF(DP_AUX0_AUX_SW_DATA, AUX_SW_AUTOINCREMENT_DISABLE, mask_sh), | ^~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:684:2: note: in expansion of macro 'DCN_AUX_MASK_SH_LIST'
684 | DCN_AUX_MASK_SH_LIST(__SHIFT)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h:33819:111: warning: initialized field overwritten [-Woverride-init]
33819 | #define DP_AUX0_AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE_MASK 0x80000000L
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:214:16: note: in expansion of macro 'DP_AUX0_AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE_MASK'
214 | .field_name = reg_name ## __ ## field_name ## post_fix
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:204:2: note: in expansion of macro 'AUX_SF'
204 | AUX_SF(DP_AUX0_AUX_SW_DATA, AUX_SW_AUTOINCREMENT_DISABLE, mask_sh), | ^~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:688:2: note: in expansion of macro 'DCN_AUX_MASK_SH_LIST'
688 | DCN_AUX_MASK_SH_LIST(_MASK)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h:33819:111: note: (near initialization for 'aux_mask.AUX_SW_AUTOINCREMENT_DISABLE')
33819 | #define DP_AUX0_AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE_MASK 0x80000000L
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:214:16: note: in expansion of macro 'DP_AUX0_AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE_MASK'
214 | .field_name = reg_name ## __ ## field_name ## post_fix
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:204:2: note: in expansion of macro 'AUX_SF'
204 | AUX_SF(DP_AUX0_AUX_SW_DATA, AUX_SW_AUTOINCREMENT_DISABLE, mask_sh), | ^~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:688:2: note: in expansion of macro 'DCN_AUX_MASK_SH_LIST'
688 | DCN_AUX_MASK_SH_LIST(_MASK)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:777:20: warning: no previous prototype for 'dcn21_i2c_hw_create' [-Wmissing-prototypes]
777 | struct dce_i2c_hw *dcn21_i2c_hw_create(
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1078:6: warning: no previous prototype for 'dcn21_calculate_wm' [-Wmissing-prototypes]
1078 | void dcn21_calculate_wm(
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1163:6: warning: no previous prototype for 'dcn21_validate_bandwidth' [-Wmissing-prototypes]
1163 | bool dcn21_validate_bandwidth(struct dc *dc, struct dc_state *context,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1293:32: warning: no previous prototype for 'dcn21_opp_create' [-Wmissing-prototypes]
1293 | struct output_pixel_processor *dcn21_opp_create(
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1309:26: warning: no previous prototype for 'dcn21_timing_generator_create' [-Wmissing-prototypes]
1309 | struct timing_generator *dcn21_timing_generator_create(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1331:13: warning: no previous prototype for 'dcn21_mpc_create' [-Wmissing-prototypes]
1331 | struct mpc *dcn21_mpc_create(struct dc_context *ctx)
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1358:35: warning: no previous prototype for 'dcn21_dsc_create' [-Wmissing-prototypes]
1358 | struct display_stream_compressor *dcn21_dsc_create(
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function 'update_bw_bounding_box':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1389:63: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
1389 | for (closest_clk_lvl = 0, j = dcn2_1_soc.num_states - 1; j >= 0; j--) {
| ^~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: At top level:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1502:24: warning: no previous prototype for 'dcn21_stream_encoder_create' [-Wmissing-prototypes]
1502 | struct stream_encoder *dcn21_stream_encoder_create(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:70:
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:489:52: warning: initialized field overwritten [-Woverride-init]
489 | #define DMU_BASE__INST0_SEG2 0x000034C0
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:319:25: note: in expansion of macro 'DMU_BASE__INST0_SEG2'
319 | #define BASE_INNER(seg) DMU_BASE__INST0_SEG ## seg
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:321:19: note: in expansion of macro 'BASE_INNER'
321 | #define BASE(seg) BASE_INNER(seg)
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:324:15: note: in expansion of macro 'BASE'
324 | .reg_name = BASE(mm ## reg_name ## _BASE_IDX) + | ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:157:2: note: in expansion of macro 'SR'
157 | SR(DCFCLK_CNTL), | ^~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:280:2: note: in expansion of macro 'HWSEQ_DCN_REG_LIST'
280 | HWSEQ_DCN_REG_LIST(), | ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1520:3: note: in expansion of macro 'HWSEQ_DCN21_REG_LIST'
1520 | HWSEQ_DCN21_REG_LIST()
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/renoir_ip_offset.h:489:52: note: (near initialization for 'hwseq_reg.DCFCLK_CNTL')
489 | #define DMU_BASE__INST0_SEG2 0x000034C0
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:319:25: note: in expansion of macro 'DMU_BASE__INST0_SEG2'
319 | #define BASE_INNER(seg) DMU_BASE__INST0_SEG ## seg
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:321:19: note: in expansion of macro 'BASE_INNER'
321 | #define BASE(seg) BASE_INNER(seg)
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:324:15: note: in expansion of macro 'BASE'
324 | .reg_name = BASE(mm ## reg_name ## _BASE_IDX) + | ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:157:2: note: in expansion of macro 'SR'
157 | SR(DCFCLK_CNTL), | ^~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:280:2: note: in expansion of macro 'HWSEQ_DCN_REG_LIST'
280 | HWSEQ_DCN_REG_LIST(), | ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1520:3: note: in expansion of macro 'HWSEQ_DCN21_REG_LIST'
1520 | HWSEQ_DCN21_REG_LIST()
| ^~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:72:
drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h:43237:111: warning: initialized field overwritten [-Woverride-init]
43237 | #define LVTMA_PWRSEQ_CNTL__LVTMA_BLON__SHIFT 0x18
| ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:439:28: note: in expansion of macro 'LVTMA_PWRSEQ_CNTL__LVTMA_BLON__SHIFT'
439 | .field_name = blk_name ## reg_name ## __ ## field_name ## post_fix
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:676:2: note: in expansion of macro 'HWS_SF'
676 | HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh), | ^~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1524:3: note: in expansion of macro 'HWSEQ_DCN21_MASK_SH_LIST'
1524 | HWSEQ_DCN21_MASK_SH_LIST(__SHIFT)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h:43237:111: note: (near initialization for 'hwseq_shift.LVTMA_BLON')
43237 | #define LVTMA_PWRSEQ_CNTL__LVTMA_BLON__SHIFT 0x18
| ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:439:28: note: in expansion of macro 'LVTMA_PWRSEQ_CNTL__LVTMA_BLON__SHIFT'
439 | .field_name = blk_name ## reg_name ## __ ## field_name ## post_fix
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:676:2: note: in expansion of macro 'HWS_SF'
676 | HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh), | ^~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1524:3: note: in expansion of macro 'HWSEQ_DCN21_MASK_SH_LIST'
1524 | HWSEQ_DCN21_MASK_SH_LIST(__SHIFT)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h:43253:111: warning: initialized field overwritten [-Woverride-init]
43253 | #define LVTMA_PWRSEQ_STATE__LVTMA_PWRSEQ_TARGET_STATE_R__SHIFT 0x0
| ^~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:439:28: note: in expansion of macro 'LVTMA_PWRSEQ_STATE__LVTMA_PWRSEQ_TARGET_STATE_R__SHIFT'
439 | .field_name = blk_name ## reg_name ## __ ## field_name ## post_fix
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:677:2: note: in expansion of macro 'HWS_SF'
677 | HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, mask_sh)
| ^~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1524:3: note: in expansion of macro 'HWSEQ_DCN21_MASK_SH_LIST'
1524 | HWSEQ_DCN21_MASK_SH_LIST(__SHIFT)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h:43253:111: note: (near initialization for 'hwseq_shift.LVTMA_PWRSEQ_TARGET_STATE_R')
43253 | #define LVTMA_PWRSEQ_STATE__LVTMA_PWRSEQ_TARGET_STATE_R__SHIFT 0x0
| ^~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:439:28: note: in expansion of macro 'LVTMA_PWRSEQ_STATE__LVTMA_PWRSEQ_TARGET_STATE_R__SHIFT'
439 | .field_name = blk_name ## reg_name ## __ ## field_name ## post_fix
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_hwseq.h:677:2: note: in expansion of macro 'HWS_SF'
677 | HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, mask_sh)
| ^~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1524:3: note: in expansion of macro 'HWSEQ_DCN21_MASK_SH_LIST'
1524 | HWSEQ_DCN21_MASK_SH_LIST(__SHIFT)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h:43249:111: warning: initialized field overwritten [-Woverride-init]
43249 | #define LVTMA_PWRSEQ_CNTL__LVTMA_BLON_MASK 0x01000000L
vim +1389 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c
1330
> 1331 struct mpc *dcn21_mpc_create(struct dc_context *ctx)
1332 {
1333 struct dcn20_mpc *mpc20 = kzalloc(sizeof(struct dcn20_mpc),
1334 GFP_KERNEL);
1335
1336 if (!mpc20)
1337 return NULL;
1338
1339 dcn20_mpc_construct(mpc20, ctx,
1340 &mpc_regs,
1341 &mpc_shift,
1342 &mpc_mask,
1343 6);
1344
1345 return &mpc20->base;
1346 }
1347
1348 static void read_dce_straps(
1349 struct dc_context *ctx,
1350 struct resource_straps *straps)
1351 {
1352 generic_reg_get(ctx, mmDC_PINSTRAPS + BASE(mmDC_PINSTRAPS_BASE_IDX),
1353 FN(DC_PINSTRAPS, DC_PINSTRAPS_AUDIO), &straps->dc_pinstraps_audio);
1354
1355 }
1356
1357
1358 struct display_stream_compressor *dcn21_dsc_create(
1359 struct dc_context *ctx, uint32_t inst)
1360 {
1361 struct dcn20_dsc *dsc =
1362 kzalloc(sizeof(struct dcn20_dsc), GFP_KERNEL);
1363
1364 if (!dsc) {
1365 BREAK_TO_DEBUGGER();
1366 return NULL;
1367 }
1368
1369 dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
1370 return &dsc->base;
1371 }
1372
1373 static void update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params)
1374 {
1375 struct dcn21_resource_pool *pool = TO_DCN21_RES_POOL(dc->res_pool);
1376 struct clk_limit_table *clk_table = &bw_params->clk_table;
1377 struct _vcs_dpi_voltage_scaling_st clock_limits[DC__VOLTAGE_STATES];
1378 unsigned int i, j, closest_clk_lvl;
1379
1380 // Default clock levels are used for diags, which may lead to overclocking.
1381 if (!IS_DIAG_DC(dc->ctx->dce_environment)) {
1382 dcn2_1_ip.max_num_otg = pool->base.res_cap->num_timing_generator;
1383 dcn2_1_ip.max_num_dpp = pool->base.pipe_count;
1384 dcn2_1_soc.num_chans = bw_params->num_channels;
1385
1386 ASSERT(clk_table->num_entries);
1387 for (i = 0; i < clk_table->num_entries; i++) {
1388 /* loop backwards*/
> 1389 for (closest_clk_lvl = 0, j = dcn2_1_soc.num_states - 1; j >= 0; j--) {
1390 if ((unsigned int) dcn2_1_soc.clock_limits[j].dcfclk_mhz <= clk_table->entries[i].dcfclk_mhz) {
1391 closest_clk_lvl = j;
1392 break;
1393 }
1394 }
1395
1396 clock_limits[i].state = i;
1397 clock_limits[i].dcfclk_mhz = clk_table->entries[i].dcfclk_mhz;
1398 clock_limits[i].fabricclk_mhz = clk_table->entries[i].fclk_mhz;
1399 clock_limits[i].socclk_mhz = clk_table->entries[i].socclk_mhz;
1400 clock_limits[i].dram_speed_mts = clk_table->entries[i].memclk_mhz * 2;
1401
1402 clock_limits[i].dispclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].dispclk_mhz;
1403 clock_limits[i].dppclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].dppclk_mhz;
1404 clock_limits[i].dram_bw_per_chan_gbps = dcn2_1_soc.clock_limits[closest_clk_lvl].dram_bw_per_chan_gbps;
1405 clock_limits[i].dscclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].dscclk_mhz;
1406 clock_limits[i].dtbclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].dtbclk_mhz;
1407 clock_limits[i].phyclk_d18_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].phyclk_d18_mhz;
1408 clock_limits[i].phyclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].phyclk_mhz;
1409 }
1410 for (i = 0; i < clk_table->num_entries; i++)
1411 dcn2_1_soc.clock_limits[i] = clock_limits[i];
1412 if (clk_table->num_entries) {
1413 dcn2_1_soc.num_states = clk_table->num_entries;
1414 /* duplicate last level */
1415 dcn2_1_soc.clock_limits[dcn2_1_soc.num_states] = dcn2_1_soc.clock_limits[dcn2_1_soc.num_states - 1];
1416 dcn2_1_soc.clock_limits[dcn2_1_soc.num_states].state = dcn2_1_soc.num_states;
1417 }
1418 }
1419
1420 dml_init_instance(&dc->dml, &dcn2_1_soc, &dcn2_1_ip, DML_PROJECT_DCN21);
1421 }
1422
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months