drm/amd/display: Deduplicate DCN DDC register assignment
Subsystems (3)
PATCH 1/1 drm/amd/display: Deduplicate DCN DDC register assignment
Several DCN generations implement identical define_ddc_registers() functions to assign DDC register, shift and mask pointers based on GPIO ID.
Introduce a shared inline helper, dcn_define_ddc_registers_common(), and convert all DCN implementations to use it.
This reduces duplication and improves maintainability without changing behavior.
No functional changes intended.
--- .../display/dc/gpio/dcn20/hw_factory_dcn20.c | 27 ++++--------- .../display/dc/gpio/dcn21/hw_factory_dcn21.c | 27 ++++--------- .../display/dc/gpio/dcn30/hw_factory_dcn30.c | 27 ++++--------- .../dc/gpio/dcn315/hw_factory_dcn315.c | 27 ++++--------- .../display/dc/gpio/dcn32/hw_factory_dcn32.c | 27 ++++--------- .../dc/gpio/dcn401/hw_factory_dcn401.c | 26 ++++--------- .../amd/display/dc/gpio/hw_factory_dcn_ddc.h | 39 +++++++++++++++++++ 7 files changed, 86 insertions(+), 114 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/hw_factory_dcn_ddc.h
drivers/gpu/drm/amd/display/dc/gpio/dcn20/hw_factory_dcn20.c +8 -19
@@ -32,6 +32,8 @@#include "../hw_hpd.h" #include "../hw_generic.h" +#include "../hw_factory_dcn_ddc.h" +#include "hw_factory_dcn20.h"
@@ -182,25 +184,12 @@ static void define_ddc_registers(struct hw_gpio_pin *pin, uint32_t en) { -struct hw_ddc *ddc =HW_DDC_FROM_BASE (pin); - -switch (pin->id) { -case GPIO_ID_DDC_DATA : - ddc->regs = &ddc_data_regs_dcn[en]; - ddc->base.regs = &ddc_data_regs_dcn[en].gpio; -break ; -case GPIO_ID_DDC_CLOCK : - ddc->regs = &ddc_clk_regs_dcn[en]; - ddc->base.regs = &ddc_clk_regs_dcn[en].gpio; -break ; -default : -ASSERT_CRITICAL (false); -return ; - } - - ddc->shifts = &ddc_shift[en]; - ddc->masks = &ddc_mask[en]; - +dcn_define_ddc_registers_common ( +pin ,en , +ddc_data_regs_dcn , +ddc_clk_regs_dcn , +ddc_shift , +ddc_mask ); }static void define_hpd_registers (struct hw_gpio_pin *pin,uint32_t en)
drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c +8 -19
@@ -32,6 +32,8 @@#include "../hw_hpd.h" #include "../hw_generic.h" +#include "../hw_factory_dcn_ddc.h" +#include "hw_factory_dcn21.h" #include "dcn/dcn_2_1_0_offset.h"
@@ -170,25 +172,12 @@ static void define_ddc_registers(struct hw_gpio_pin *pin, uint32_t en) { -struct hw_ddc *ddc =HW_DDC_FROM_BASE (pin); - -switch (pin->id) { -case GPIO_ID_DDC_DATA : - ddc->regs = &ddc_data_regs_dcn[en]; - ddc->base.regs = &ddc_data_regs_dcn[en].gpio; -break ; -case GPIO_ID_DDC_CLOCK : - ddc->regs = &ddc_clk_regs_dcn[en]; - ddc->base.regs = &ddc_clk_regs_dcn[en].gpio; -break ; -default : -ASSERT_CRITICAL (false); -return ; - } - - ddc->shifts = &ddc_shift[en]; - ddc->masks = &ddc_mask[en]; - +dcn_define_ddc_registers_common ( +pin ,en , +ddc_data_regs_dcn , +ddc_clk_regs_dcn , +ddc_shift , +ddc_mask ); }static void define_hpd_registers (struct hw_gpio_pin *pin,uint32_t en)
drivers/gpu/drm/amd/display/dc/gpio/dcn30/hw_factory_dcn30.c +8 -19
@@ -32,6 +32,8 @@#include "../hw_hpd.h" #include "../hw_generic.h" +#include "../hw_factory_dcn_ddc.h" +#include "hw_factory_dcn30.h"
@@ -199,25 +201,12 @@ static void define_ddc_registers(struct hw_gpio_pin *pin, uint32_t en) { -struct hw_ddc *ddc =HW_DDC_FROM_BASE (pin); - -switch (pin->id) { -case GPIO_ID_DDC_DATA : - ddc->regs = &ddc_data_regs_dcn[en]; - ddc->base.regs = &ddc_data_regs_dcn[en].gpio; -break ; -case GPIO_ID_DDC_CLOCK : - ddc->regs = &ddc_clk_regs_dcn[en]; - ddc->base.regs = &ddc_clk_regs_dcn[en].gpio; -break ; -default : -ASSERT_CRITICAL (false); -return ; - } - - ddc->shifts = &ddc_shift[en]; - ddc->masks = &ddc_mask[en]; - +dcn_define_ddc_registers_common ( +pin ,en , +ddc_data_regs_dcn , +ddc_clk_regs_dcn , +ddc_shift , +ddc_mask ); }static void define_hpd_registers (struct hw_gpio_pin *pin,uint32_t en)
drivers/gpu/drm/amd/display/dc/gpio/dcn315/hw_factory_dcn315.c +8 -19
@@ -32,6 +32,8 @@#include "../hw_hpd.h" #include "../hw_generic.h" +#include "../hw_factory_dcn_ddc.h" +#include "hw_factory_dcn315.h" #include "dcn/dcn_3_1_5_offset.h"
@@ -191,25 +193,12 @@ static void define_ddc_registers(struct hw_gpio_pin *pin, uint32_t en) { -struct hw_ddc *ddc =HW_DDC_FROM_BASE (pin); - -switch (pin->id) { -case GPIO_ID_DDC_DATA : - ddc->regs = &ddc_data_regs_dcn[en]; - ddc->base.regs = &ddc_data_regs_dcn[en].gpio; -break ; -case GPIO_ID_DDC_CLOCK : - ddc->regs = &ddc_clk_regs_dcn[en]; - ddc->base.regs = &ddc_clk_regs_dcn[en].gpio; -break ; -default : -ASSERT_CRITICAL (false); -return ; - } - - ddc->shifts = &ddc_shift[en]; - ddc->masks = &ddc_mask[en]; - +dcn_define_ddc_registers_common ( +pin ,en , +ddc_data_regs_dcn , +ddc_clk_regs_dcn , +ddc_shift , +ddc_mask ); }static void define_hpd_registers (struct hw_gpio_pin *pin,uint32_t en)
drivers/gpu/drm/amd/display/dc/gpio/dcn32/hw_factory_dcn32.c +8 -19
@@ -32,6 +32,8 @@#include "../hw_hpd.h" #include "../hw_generic.h" +#include "../hw_factory_dcn_ddc.h" +#include "hw_factory_dcn32.h" #include "dcn/dcn_3_2_0_offset.h"
@@ -203,25 +205,12 @@ static void define_ddc_registers(struct hw_gpio_pin *pin, uint32_t en) { -struct hw_ddc *ddc =HW_DDC_FROM_BASE (pin); - -switch (pin->id) { -case GPIO_ID_DDC_DATA : - ddc->regs = &ddc_data_regs_dcn[en]; - ddc->base.regs = &ddc_data_regs_dcn[en].gpio; -break ; -case GPIO_ID_DDC_CLOCK : - ddc->regs = &ddc_clk_regs_dcn[en]; - ddc->base.regs = &ddc_clk_regs_dcn[en].gpio; -break ; -default : -ASSERT_CRITICAL (false); -return ; - } - - ddc->shifts = &ddc_shift[en]; - ddc->masks = &ddc_mask[en]; - +dcn_define_ddc_registers_common ( +pin ,en , +ddc_data_regs_dcn , +ddc_clk_regs_dcn , +ddc_shift , +ddc_mask ); }static void define_hpd_registers (struct hw_gpio_pin *pin,uint32_t en)
drivers/gpu/drm/amd/display/dc/gpio/dcn401/hw_factory_dcn401.c +7 -19
@@ -12,6 +12,7 @@#include "../hw_hpd.h" #include "../hw_generic.h" +#include "../hw_factory_dcn_ddc.h" #include "dcn/dcn_4_1_0_offset.h" #include "dcn/dcn_4_1_0_sh_mask.h"
@@ -195,25 +196,12 @@ static void define_ddc_registers(struct hw_gpio_pin *pin, uint32_t en) { -struct hw_ddc *ddc =HW_DDC_FROM_BASE (pin); - -switch (pin->id) { -case GPIO_ID_DDC_DATA : - ddc->regs = &ddc_data_regs_dcn[en]; - ddc->base.regs = &ddc_data_regs_dcn[en].gpio; -break ; -case GPIO_ID_DDC_CLOCK : - ddc->regs = &ddc_clk_regs_dcn[en]; - ddc->base.regs = &ddc_clk_regs_dcn[en].gpio; -break ; -default : -ASSERT_CRITICAL (false); -return ; - } - - ddc->shifts = &ddc_shift[en]; - ddc->masks = &ddc_mask[en]; - +dcn_define_ddc_registers_common ( +pin ,en , +ddc_data_regs_dcn , +ddc_clk_regs_dcn , +ddc_shift , +ddc_mask ); }static void define_hpd_registers (struct hw_gpio_pin *pin,uint32_t en)
drivers/gpu/drm/amd/display/dc/gpio/hw_factory_dcn_ddc.h new file +39 -0
@@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright 2024 Advanced Micro Devices, Inc. +*/ + +#ifndef __DAL_HW_FACTORY_DCN_DDC_H__ +#define __DAL_HW_FACTORY_DCN_DDC_H__ + +static inline void dcn_define_ddc_registers_common ( +struct hw_gpio_pin *pin, +uint32_t en, +const struct ddc_registers *data_regs, +const struct ddc_registers *clk_regs, +const struct ddc_shift *shift, +const struct ddc_mask *mask) +{ +struct hw_ddc *ddc =HW_DDC_FROM_BASE (pin); + +switch (pin->id) { +case GPIO_ID_DDC_DATA : + ddc->regs = &data_regs[en]; + ddc->base.regs = &data_regs[en].gpio; +break ; + +case GPIO_ID_DDC_CLOCK : + ddc->regs = &clk_regs[en]; + ddc->base.regs = &clk_regs[en].gpio; +break ; + +default : +ASSERT_CRITICAL (false); +return ; + } + + ddc->shifts = &shift[en]; + ddc->masks = &mask[en]; +} + +#endif /* __DAL_HW_FACTORY_DCN_DDC_H__ */
Signature · 1 line
2.47.3
kernel test robot
build botkernel test robot noticed the following build errors:
Hi guilhermeivo,
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on linus/master v7.0-rc4 next-20260320] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/guilhermeivo/drm-amd-display-Deduplicate-DCN-DDC-register-assignment/20260322-024236 base: https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-next patch link: https://lore.kernel.org/r/20260321015654.105059-1-guilhermeivob%40gmail.com patch subject: [PATCH] drm/amd/display: Deduplicate DCN DDC register assignment config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20260322/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260322/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All error/warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c:35:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:15:30: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
15 | const struct ddc_mask *mask)
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:14:30: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
14 | const struct ddc_shift *shift,
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:35:29: error: invalid use of undefined type 'struct ddc_shift'
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:35:21: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_shift *' [-Wincompatible-pointer-types]
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:36:27: error: invalid use of undefined type 'struct ddc_mask'
36 | ddc->masks = &mask[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:36:20: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_mask *' [-Wincompatible-pointer-types]
36 | ddc->masks = &mask[en];
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c: In function 'define_ddc_registers':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c:191:17: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
191 | ddc_shift,
| ^~~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:14:41: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
14 | const struct ddc_shift *shift,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c:192:17: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
192 | ddc_mask);
| ^~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:15:40: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
15 | const struct ddc_mask *mask)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c:35:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:15:30: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
15 | const struct ddc_mask *mask)
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:14:30: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
14 | const struct ddc_shift *shift,
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:35:29: error: invalid use of undefined type 'struct ddc_shift'
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:35:21: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_shift *' [-Wincompatible-pointer-types]
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:36:27: error: invalid use of undefined type 'struct ddc_mask'
36 | ddc->masks = &mask[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:36:20: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_mask *' [-Wincompatible-pointer-types]
36 | ddc->masks = &mask[en];
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c: In function 'define_ddc_registers':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c:179:17: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
179 | ddc_shift,
| ^~~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:14:41: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
14 | const struct ddc_shift *shift,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c:180:17: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
180 | ddc_mask);
| ^~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:15:40: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
15 | const struct ddc_mask *mask)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c:35:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:15:30: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
15 | const struct ddc_mask *mask)
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:14:30: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
14 | const struct ddc_shift *shift,
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:35:29: error: invalid use of undefined type 'struct ddc_shift'
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:35:21: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_shift *' [-Wincompatible-pointer-types]
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:36:27: error: invalid use of undefined type 'struct ddc_mask'
36 | ddc->masks = &mask[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:36:20: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_mask *' [-Wincompatible-pointer-types]
36 | ddc->masks = &mask[en];
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c: In function 'define_ddc_registers':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c:208:17: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
208 | ddc_shift,
| ^~~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:14:41: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
14 | const struct ddc_shift *shift,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c:209:17: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
209 | ddc_mask);
| ^~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:15:40: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
15 | const struct ddc_mask *mask)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c:35:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:15:30: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
15 | const struct ddc_mask *mask)
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:14:30: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
14 | const struct ddc_shift *shift,
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:35:29: error: invalid use of undefined type 'struct ddc_shift'
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:35:21: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_shift *' [-Wincompatible-pointer-types]
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:36:27: error: invalid use of undefined type 'struct ddc_mask'
36 | ddc->masks = &mask[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:36:20: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_mask *' [-Wincompatible-pointer-types]
36 | ddc->masks = &mask[en];
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c: In function 'define_ddc_registers':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c:200:17: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
200 | ddc_shift,
| ^~~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:14:41: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
14 | const struct ddc_shift *shift,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c:201:17: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
201 | ddc_mask);
| ^~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:15:40: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
15 | const struct ddc_mask *mask)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c:35:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:15:30: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
15 | const struct ddc_mask *mask)
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:14:30: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
14 | const struct ddc_shift *shift,
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:35:29: error: invalid use of undefined type 'struct ddc_shift'
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:35:21: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_shift *' [-Wincompatible-pointer-types]
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:36:27: error: invalid use of undefined type 'struct ddc_mask'
36 | ddc->masks = &mask[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:36:20: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_mask *' [-Wincompatible-pointer-types]
36 | ddc->masks = &mask[en];
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c: In function 'define_ddc_registers':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c:212:17: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
212 | ddc_shift,
| ^~~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:14:41: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
14 | const struct ddc_shift *shift,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c:213:17: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
213 | ddc_mask);
| ^~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:15:40: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
15 | const struct ddc_mask *mask)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c:15:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:15:30: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
15 | const struct ddc_mask *mask)
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:14:30: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
14 | const struct ddc_shift *shift,
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:35:29: error: invalid use of undefined type 'struct ddc_shift'
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:35:21: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_shift *' [-Wincompatible-pointer-types]
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:36:27: error: invalid use of undefined type 'struct ddc_mask'
36 | ddc->masks = &mask[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:36:20: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_mask *' [-Wincompatible-pointer-types]
36 | ddc->masks = &mask[en];
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c: In function 'define_ddc_registers':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c:203:17: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
203 | ddc_shift,
| ^~~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:14:41: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
14 | const struct ddc_shift *shift,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c:204:17: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
204 | ddc_mask);
| ^~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:15:40: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
15 | const struct ddc_mask *mask)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~vim +35 drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h
8
9 static inline void dcn_define_ddc_registers_common(
10 struct hw_gpio_pin *pin,
11 uint32_t en,
12 const struct ddc_registers *data_regs,
13 const struct ddc_registers *clk_regs,
> 14 const struct ddc_shift *shift,
> 15 const struct ddc_mask *mask)
16 {
17 struct hw_ddc *ddc = HW_DDC_FROM_BASE(pin);
18
19 switch (pin->id) {
20 case GPIO_ID_DDC_DATA:
21 ddc->regs = &data_regs[en];
22 ddc->base.regs = &data_regs[en].gpio;
23 break;
24
25 case GPIO_ID_DDC_CLOCK:
26 ddc->regs = &clk_regs[en];
27 ddc->base.regs = &clk_regs[en].gpio;
28 break;
29
30 default:
31 ASSERT_CRITICAL(false);
32 return;
33 }
34
> 35 ddc->shifts = &shift[en];
> 36 ddc->masks = &mask[en];
37 }
38 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botkernel test robot noticed the following build errors:
Hi guilhermeivo,
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on linus/master v7.0-rc4 next-20260320] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/guilhermeivo/drm-amd-display-Deduplicate-DCN-DDC-register-assignment/20260322-024236 base: https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-next patch link: https://lore.kernel.org/r/20260321015654.105059-1-guilhermeivob%40gmail.com patch subject: [PATCH] drm/amd/display: Deduplicate DCN DDC register assignment config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20260322/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260322/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All error/warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c:35:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:15:30: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
15 | const struct ddc_mask *mask)
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:14:30: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
14 | const struct ddc_shift *shift,
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:35:29: error: invalid use of undefined type 'struct ddc_shift'
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:35:21: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_shift *' [-Wincompatible-pointer-types]
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:36:27: error: invalid use of undefined type 'struct ddc_mask'
36 | ddc->masks = &mask[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:36:20: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_mask *' [-Wincompatible-pointer-types]
36 | ddc->masks = &mask[en];
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c: In function 'define_ddc_registers':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c:191:17: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
191 | ddc_shift,
| ^~~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:14:41: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
14 | const struct ddc_shift *shift,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c:192:17: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
192 | ddc_mask);
| ^~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:15:40: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
15 | const struct ddc_mask *mask)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c:35:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:15:30: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
15 | const struct ddc_mask *mask)
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:14:30: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
14 | const struct ddc_shift *shift,
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:35:29: error: invalid use of undefined type 'struct ddc_shift'
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:35:21: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_shift *' [-Wincompatible-pointer-types]
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:36:27: error: invalid use of undefined type 'struct ddc_mask'
36 | ddc->masks = &mask[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:36:20: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_mask *' [-Wincompatible-pointer-types]
36 | ddc->masks = &mask[en];
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c: In function 'define_ddc_registers':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c:179:17: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
179 | ddc_shift,
| ^~~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:14:41: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
14 | const struct ddc_shift *shift,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c:180:17: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
180 | ddc_mask);
| ^~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:15:40: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
15 | const struct ddc_mask *mask)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c:35:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:15:30: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
15 | const struct ddc_mask *mask)
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:14:30: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
14 | const struct ddc_shift *shift,
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:35:29: error: invalid use of undefined type 'struct ddc_shift'
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:35:21: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_shift *' [-Wincompatible-pointer-types]
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:36:27: error: invalid use of undefined type 'struct ddc_mask'
36 | ddc->masks = &mask[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:36:20: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_mask *' [-Wincompatible-pointer-types]
36 | ddc->masks = &mask[en];
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c: In function 'define_ddc_registers':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c:208:17: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
208 | ddc_shift,
| ^~~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:14:41: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
14 | const struct ddc_shift *shift,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c:209:17: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
209 | ddc_mask);
| ^~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:15:40: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
15 | const struct ddc_mask *mask)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c:35:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:15:30: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
15 | const struct ddc_mask *mask)
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:14:30: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
14 | const struct ddc_shift *shift,
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:35:29: error: invalid use of undefined type 'struct ddc_shift'
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:35:21: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_shift *' [-Wincompatible-pointer-types]
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:36:27: error: invalid use of undefined type 'struct ddc_mask'
36 | ddc->masks = &mask[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:36:20: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_mask *' [-Wincompatible-pointer-types]
36 | ddc->masks = &mask[en];
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c: In function 'define_ddc_registers':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c:200:17: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
200 | ddc_shift,
| ^~~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:14:41: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
14 | const struct ddc_shift *shift,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c:201:17: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
201 | ddc_mask);
| ^~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:15:40: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
15 | const struct ddc_mask *mask)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c:35:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:15:30: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
15 | const struct ddc_mask *mask)
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:14:30: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
14 | const struct ddc_shift *shift,
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:35:29: error: invalid use of undefined type 'struct ddc_shift'
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:35:21: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_shift *' [-Wincompatible-pointer-types]
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:36:27: error: invalid use of undefined type 'struct ddc_mask'
36 | ddc->masks = &mask[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:36:20: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_mask *' [-Wincompatible-pointer-types]
36 | ddc->masks = &mask[en];
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c: In function 'define_ddc_registers':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c:212:17: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
212 | ddc_shift,
| ^~~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:14:41: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
14 | const struct ddc_shift *shift,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c:213:17: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
213 | ddc_mask);
| ^~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:15:40: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
15 | const struct ddc_mask *mask)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c:15:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:15:30: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
15 | const struct ddc_mask *mask)
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:14:30: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
14 | const struct ddc_shift *shift,
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:35:29: error: invalid use of undefined type 'struct ddc_shift'
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:35:21: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_shift *' [-Wincompatible-pointer-types]
35 | ddc->shifts = &shift[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:36:27: error: invalid use of undefined type 'struct ddc_mask'
36 | ddc->masks = &mask[en];
| ^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:36:20: error: assignment to 'const struct ddc_sh_mask *' from incompatible pointer type 'const struct ddc_mask *' [-Wincompatible-pointer-types]
36 | ddc->masks = &mask[en];
| ^
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c: In function 'define_ddc_registers':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c:203:17: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
203 | ddc_shift,
| ^~~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:14:41: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
14 | const struct ddc_shift *shift,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c:204:17: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Wincompatible-pointer-types]
204 | ddc_mask);
| ^~~~~~~~
| |
| const struct ddc_sh_mask *
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:15:40: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
15 | const struct ddc_mask *mask)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~vim +35 drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h
8
9 static inline void dcn_define_ddc_registers_common(
10 struct hw_gpio_pin *pin,
11 uint32_t en,
12 const struct ddc_registers *data_regs,
13 const struct ddc_registers *clk_regs,
> 14 const struct ddc_shift *shift,
> 15 const struct ddc_mask *mask)
16 {
17 struct hw_ddc *ddc = HW_DDC_FROM_BASE(pin);
18
19 switch (pin->id) {
20 case GPIO_ID_DDC_DATA:
21 ddc->regs = &data_regs[en];
22 ddc->base.regs = &data_regs[en].gpio;
23 break;
24
25 case GPIO_ID_DDC_CLOCK:
26 ddc->regs = &clk_regs[en];
27 ddc->base.regs = &clk_regs[en].gpio;
28 break;
29
30 default:
31 ASSERT_CRITICAL(false);
32 return;
33 }
34
> 35 ddc->shifts = &shift[en];
> 36 ddc->masks = &mask[en];
37 }
38 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botkernel test robot noticed the following build errors:
Hi guilhermeivo,
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on linus/master v7.0-rc4 next-20260320] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/guilhermeivo/drm-amd-display-Deduplicate-DCN-DDC-register-assignment/20260322-024236 base: https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-next patch link: https://lore.kernel.org/r/20260321015654.105059-1-guilhermeivob%40gmail.com patch subject: [PATCH] drm/amd/display: Deduplicate DCN DDC register assignment config: arc-randconfig-001-20260322 (https://download.01.org/0day-ci/archive/20260322/[email protected]/config) compiler: arc-linux-gcc (GCC) 8.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260322/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:15:16: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
const struct ddc_mask *mask)
^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:14:16: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
const struct ddc_shift *shift,
^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:35:22: error: invalid use of undefined type 'struct ddc_shift'
ddc->shifts = &shift[en];
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:35:22: error: dereferencing pointer to incomplete type 'const struct ddc_shift'
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:36:20: error: invalid use of undefined type 'struct ddc_mask'
ddc->masks = &mask[en];
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:36:20: error: dereferencing pointer to incomplete type 'const struct ddc_mask'
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c: In function 'define_ddc_registers':
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c:212:3: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Werror=incompatible-pointer-types]
ddc_shift,
^~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:14:27: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
const struct ddc_shift *shift,
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c:213:3: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Werror=incompatible-pointer-types]
ddc_mask);
^~~~~~~~ In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/hw_factory_dcn32.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h:15:26: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
const struct ddc_mask *mask)
~~~~~~~~~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:15:16: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
const struct ddc_mask *mask)
^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:14:16: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
const struct ddc_shift *shift,
^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:35:22: error: invalid use of undefined type 'struct ddc_shift'
ddc->shifts = &shift[en];
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:35:22: error: dereferencing pointer to incomplete type 'const struct ddc_shift'
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:36:20: error: invalid use of undefined type 'struct ddc_mask'
ddc->masks = &mask[en];
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:36:20: error: dereferencing pointer to incomplete type 'const struct ddc_mask'
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c: In function 'define_ddc_registers':
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c:208:3: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Werror=incompatible-pointer-types]
ddc_shift,
^~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:14:27: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
const struct ddc_shift *shift,
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c:209:3: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Werror=incompatible-pointer-types]
ddc_mask);
^~~~~~~~ In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/hw_factory_dcn30.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn30/../hw_factory_dcn_ddc.h:15:26: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
const struct ddc_mask *mask)
~~~~~~~~~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c:15:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:15:16: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
const struct ddc_mask *mask)
^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:14:16: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
const struct ddc_shift *shift,
^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:35:22: error: invalid use of undefined type 'struct ddc_shift'
ddc->shifts = &shift[en];
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:35:22: error: dereferencing pointer to incomplete type 'const struct ddc_shift'
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:36:20: error: invalid use of undefined type 'struct ddc_mask'
ddc->masks = &mask[en];
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:36:20: error: dereferencing pointer to incomplete type 'const struct ddc_mask'
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c: In function 'define_ddc_registers':
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c:203:3: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Werror=incompatible-pointer-types]
ddc_shift,
^~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c:15:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:14:27: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
const struct ddc_shift *shift,
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c:204:3: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Werror=incompatible-pointer-types]
ddc_mask);
^~~~~~~~ In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/hw_factory_dcn401.c:15:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn401/../hw_factory_dcn_ddc.h:15:26: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
const struct ddc_mask *mask)
~~~~~~~~~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:15:16: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
const struct ddc_mask *mask)
^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:14:16: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
const struct ddc_shift *shift,
^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:35:22: error: invalid use of undefined type 'struct ddc_shift'
ddc->shifts = &shift[en];
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:35:22: error: dereferencing pointer to incomplete type 'const struct ddc_shift'
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:36:20: error: invalid use of undefined type 'struct ddc_mask'
ddc->masks = &mask[en];
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:36:20: error: dereferencing pointer to incomplete type 'const struct ddc_mask'
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c: In function 'define_ddc_registers':
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c:179:3: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Werror=incompatible-pointer-types]
ddc_shift,
^~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:14:27: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
const struct ddc_shift *shift,
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c:180:3: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Werror=incompatible-pointer-types]
ddc_mask);
^~~~~~~~ In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/hw_factory_dcn21.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn21/../hw_factory_dcn_ddc.h:15:26: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
const struct ddc_mask *mask)
~~~~~~~~~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:15:16: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
const struct ddc_mask *mask)
^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:14:16: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
const struct ddc_shift *shift,
^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:35:22: error: invalid use of undefined type 'struct ddc_shift'
ddc->shifts = &shift[en];
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:35:22: error: dereferencing pointer to incomplete type 'const struct ddc_shift'
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:36:20: error: invalid use of undefined type 'struct ddc_mask'
ddc->masks = &mask[en];
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:36:20: error: dereferencing pointer to incomplete type 'const struct ddc_mask'
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c: In function 'define_ddc_registers':
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c:200:3: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Werror=incompatible-pointer-types]
ddc_shift,
^~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:14:27: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
const struct ddc_shift *shift,
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c:201:3: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Werror=incompatible-pointer-types]
ddc_mask);
^~~~~~~~ In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/hw_factory_dcn315.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn315/../hw_factory_dcn_ddc.h:15:26: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
const struct ddc_mask *mask)
~~~~~~~~~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:15:16: warning: 'struct ddc_mask' declared inside parameter list will not be visible outside of this definition or declaration
const struct ddc_mask *mask)
^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:14:16: warning: 'struct ddc_shift' declared inside parameter list will not be visible outside of this definition or declaration
const struct ddc_shift *shift,
^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h: In function 'dcn_define_ddc_registers_common':
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:35:22: error: invalid use of undefined type 'struct ddc_shift'
ddc->shifts = &shift[en];
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:35:22: error: dereferencing pointer to incomplete type 'const struct ddc_shift'
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:36:20: error: invalid use of undefined type 'struct ddc_mask'
ddc->masks = &mask[en];
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:36:20: error: dereferencing pointer to incomplete type 'const struct ddc_mask'
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c: In function 'define_ddc_registers':
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c:191:3: error: passing argument 5 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Werror=incompatible-pointer-types]
ddc_shift,
^~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:14:27: note: expected 'const struct ddc_shift *' but argument is of type 'const struct ddc_sh_mask *'
const struct ddc_shift *shift,
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c:192:3: error: passing argument 6 of 'dcn_define_ddc_registers_common' from incompatible pointer type [-Werror=incompatible-pointer-types]
ddc_mask);
^~~~~~~~ In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/hw_factory_dcn20.c:35:
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn20/../hw_factory_dcn_ddc.h:15:26: note: expected 'const struct ddc_mask *' but argument is of type 'const struct ddc_sh_mask *'
const struct ddc_mask *mask)
~~~~~~~~~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
vim +35 drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/dcn32/../hw_factory_dcn_ddc.h
8
9 static inline void dcn_define_ddc_registers_common(
10 struct hw_gpio_pin *pin,
11 uint32_t en,
12 const struct ddc_registers *data_regs,
13 const struct ddc_registers *clk_regs,
14 const struct ddc_shift *shift,
15 const struct ddc_mask *mask)
16 {
17 struct hw_ddc *ddc = HW_DDC_FROM_BASE(pin);
18
19 switch (pin->id) {
20 case GPIO_ID_DDC_DATA:
21 ddc->regs = &data_regs[en];
22 ddc->base.regs = &data_regs[en].gpio;
23 break;
24
25 case GPIO_ID_DDC_CLOCK:
26 ddc->regs = &clk_regs[en];
27 ddc->base.regs = &clk_regs[en].gpio;
28 break;
29
30 default:
31 ASSERT_CRITICAL(false);
32 return;
33 }
34
> 35 ddc->shifts = &shift[en];
> 36 ddc->masks = &mask[en];
37 }
38 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki