Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [superm1:superm1/brightness-changes-6.15 3/7] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4694:6: error: use of undeclared identifier 'caps'
@ 2025-03-09  0:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-03-09  0:34 UTC (permalink / raw)
  To: Mario Limonciello; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git superm1/brightness-changes-6.15
head:   e1a5d02a5851574c4f09e3d483c473555e69a453
commit: 88e76b926b193764694367e3411d004d5db78ccb [3/7] drm/amd/display: Avoid operating on copies of backlight caps
config: x86_64-buildonly-randconfig-002-20250308 (https://download.01.org/0day-ci/archive/20250309/202503090846.qpfiW2ZL-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250309/202503090846.qpfiW2ZL-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503090846.qpfiW2ZL-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:29:
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29:
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:31:
   In file included from include/linux/kgdb.h:19:
   In file included from include/linux/kprobes.h:28:
   In file included from include/linux/ftrace.h:13:
   In file included from include/linux/kallsyms.h:13:
   In file included from include/linux/mm.h:2224:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:446:63: warning: arithmetic between different enumeration types ('enum dc_irq_source' and 'enum irq_type') [-Wenum-enum-conversion]
     446 |         amdgpu_crtc = get_crtc_by_otg_inst(adev, irq_params->irq_src - IRQ_TYPE_PFLIP);
         |                                                  ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:543:57: warning: arithmetic between different enumeration types ('enum dc_irq_source' and 'enum irq_type') [-Wenum-enum-conversion]
     543 |         acrtc = get_crtc_by_otg_inst(adev, irq_params->irq_src - IRQ_TYPE_VUPDATE);
         |                                            ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:607:57: warning: arithmetic between different enumeration types ('enum dc_irq_source' and 'enum irq_type') [-Wenum-enum-conversion]
     607 |         acrtc = get_crtc_by_otg_inst(adev, irq_params->irq_src - IRQ_TYPE_VBLANK);
         |                                            ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4694:6: error: use of undeclared identifier 'caps'
    4694 |         if (caps->aux_support)
         |             ^
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4697:2: error: use of undeclared identifier 'caps'
    4697 |         caps->min_input_signal = AMDGPU_DM_DEFAULT_MIN_BACKLIGHT;
         |         ^
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4698:2: error: use of undeclared identifier 'caps'
    4698 |         caps->max_input_signal = AMDGPU_DM_DEFAULT_MAX_BACKLIGHT;
         |         ^
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4699:2: error: use of undeclared identifier 'caps'
    4699 |         caps->caps_valid = true;
         |         ^
   5 warnings and 4 errors generated.


vim +/caps +4694 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c

  4662	
  4663	static void amdgpu_dm_update_backlight_caps(struct amdgpu_display_manager *dm,
  4664						    int bl_idx)
  4665	{
  4666	#if defined(CONFIG_ACPI)
  4667		struct amdgpu_dm_backlight_caps *caps = &dm->backlight_caps[bl_idx];
  4668	
  4669		if (caps->caps_valid)
  4670			return;
  4671	
  4672		amdgpu_acpi_get_backlight_caps(caps);
  4673	
  4674		/* validate the firmware value is sane */
  4675		if (caps->caps_valid) {
  4676			int spread = caps->max_input_signal - caps->min_input_signal;
  4677	
  4678			if (caps->max_input_signal > AMDGPU_DM_DEFAULT_MAX_BACKLIGHT ||
  4679			    caps->min_input_signal < 0 ||
  4680			    spread > AMDGPU_DM_DEFAULT_MAX_BACKLIGHT ||
  4681			    spread < AMDGPU_DM_MIN_SPREAD) {
  4682				DRM_DEBUG_KMS("DM: Invalid backlight caps: min=%d, max=%d\n",
  4683					      caps->min_input_signal, caps->max_input_signal);
  4684				caps->caps_valid = false;
  4685			}
  4686		}
  4687	
  4688		if (!caps->caps_valid) {
  4689			caps->min_input_signal = AMDGPU_DM_DEFAULT_MIN_BACKLIGHT;
  4690			caps->max_input_signal = AMDGPU_DM_DEFAULT_MAX_BACKLIGHT;
  4691			caps->caps_valid = true;
  4692		}
  4693	#else
> 4694		if (caps->aux_support)
  4695			return;
  4696	
  4697		caps->min_input_signal = AMDGPU_DM_DEFAULT_MIN_BACKLIGHT;
  4698		caps->max_input_signal = AMDGPU_DM_DEFAULT_MAX_BACKLIGHT;
  4699		caps->caps_valid = true;
  4700	#endif
  4701	}
  4702	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-03-09  0:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-09  0:34 [superm1:superm1/brightness-changes-6.15 3/7] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4694:6: error: use of undeclared identifier 'caps' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox