drivers/gpu/drm/amd/amdgpu/../display/dc/dc_fused_io.c:103:56: error: invalid use of undefined type 'struct gpio'

From: kernel test robot

Date: Fri Mar 06 2026 - 01:06:09 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5ee8dbf54602dc340d6235b1d6aa17c0f283f48c
commit: ce801e5d6c1bac228bf10f75e8bede4285c58282 drm/amd/display: HDCP Locality check using DMUB Fused IO
date: 11 months ago
config: mips-randconfig-r072-20260306 (https://download.01.org/0day-ci/archive/20260306/202603061343.CyA71vlH-lkp@xxxxxxxxx/config)
compiler: mips-linux-gcc (GCC) 10.5.0
smatch: v0.5.0-9004-gb810ac53
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260306/202603061343.CyA71vlH-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603061343.CyA71vlH-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

drivers/gpu/drm/amd/amdgpu/../display/dc/dc_fused_io.c: In function 'dm_atomic_write_poll_read_i2c':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dc_fused_io.c:103:56: error: invalid use of undefined type 'struct gpio'
103 | const uint32_t ddc_line = link->ddc->ddc_pin->pin_data->en;
| ^~
drivers/gpu/drm/amd/amdgpu/../display/dc/dc_fused_io.c: In function 'dm_atomic_write_poll_read_aux':
drivers/gpu/drm/amd/amdgpu/../display/dc/dc_fused_io.c:130:56: error: invalid use of undefined type 'struct gpio'
130 | const uint32_t ddc_line = link->ddc->ddc_pin->pin_data->en;
| ^~


vim +103 drivers/gpu/drm/amd/amdgpu/../display/dc/dc_fused_io.c

90
91 bool dm_atomic_write_poll_read_i2c(
92 struct dc_link *link,
93 const struct mod_hdcp_atomic_op_i2c *write,
94 const struct mod_hdcp_atomic_op_i2c *poll,
95 struct mod_hdcp_atomic_op_i2c *read,
96 uint32_t poll_timeout_us,
97 uint8_t poll_mask_msb
98 )
99 {
100 if (!link)
101 return false;
102
> 103 const uint32_t ddc_line = link->ddc->ddc_pin->pin_data->en;
104 union dmub_rb_cmd commands[3] = { 0 };
105 const bool converted = op_i2c_convert(&commands[0], write, FUSED_REQUEST_WRITE, ddc_line)
106 && op_i2c_convert(&commands[1], poll, FUSED_REQUEST_POLL, ddc_line)
107 && op_i2c_convert(&commands[2], read, FUSED_REQUEST_READ, ddc_line);
108
109 if (!converted)
110 return false;
111
112 const bool result = atomic_write_poll_read(link, commands, poll_timeout_us, poll_mask_msb);
113
114 memcpy(read->data, commands[0].fused_io.request.buffer, read->size);
115 return result;
116 }
117

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki