* [vsyrjala:bclm_bcm_backlight_remap_2 5/5] drivers/gpu/drm/i915/display/intel_opregion.c:956:63: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2026-11-28 3:38 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-28 3:38 UTC (permalink / raw)
To: Ville Syrjälä ; +Cc: oe-kbuild-all
tree: https://github.com/vsyrjala/linux.git bclm_bcm_backlight_remap_2
head: 7794d41e18611b7a934d3ac2677c47432bf18ef9
commit: 7794d41e18611b7a934d3ac2677c47432bf18ef9 [5/5] drm/i915: Use OpRegion BCLM/BCM to remap the backlight levels
config: x86_64-randconfig-r2304-20261127 (https://download.01.org/0day-ci/archive/20261128/20261128042930.hZvsBgnT-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
sparse: v0.6.5-rc1-21-g84ec0658
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261128/20261128042930.hZvsBgnT-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/20261128042930.hZvsBgnT-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/i915/display/intel_opregion.c:956:63: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct opregion_asle [noderef] __iomem *asle @@ got struct opregion_asle *asle @@
drivers/gpu/drm/i915/display/intel_opregion.c:956:63: sparse: expected struct opregion_asle [noderef] __iomem *asle
drivers/gpu/drm/i915/display/intel_opregion.c:956:63: sparse: got struct opregion_asle *asle
>> drivers/gpu/drm/i915/display/intel_opregion.c:992:73: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct opregion_backlight [noderef] __iomem *backlight @@ got struct opregion_backlight *backlight @@
drivers/gpu/drm/i915/display/intel_opregion.c:992:73: sparse: expected struct opregion_backlight [noderef] __iomem *backlight
drivers/gpu/drm/i915/display/intel_opregion.c:992:73: sparse: got struct opregion_backlight *backlight
vim +956 drivers/gpu/drm/i915/display/intel_opregion.c
953
954 static struct intel_backlight_map *build_backlight_map_bclm(struct intel_display *display)
955 {
> 956 struct opregion_asle __iomem *asle = display->opregion->asle;
957 struct intel_backlight_map *map;
958
959 /* BCLM may or may not not include min/max entries */
960 map = kzalloc_flex(*map, entries, ARRAY_SIZE(asle->bclm) + 2);
961 if (!map)
962 return NULL;
963
964 for (int i = 0; i < ARRAY_SIZE(asle->bclm); i++) {
965 uint16_t bclm = ioread16(&asle->bclm[i]);
966 int percent, duty_cycle;
967
968 if ((bclm & BCLM_VALID) == 0)
969 continue;
970
971 percent = FIELD_GET(BCLM_PERCENTAGE_MASK, bclm);
972 duty_cycle = FIELD_GET(BCLM_DUTY_CYCLE_MASK, bclm);
973
974 if (drm_WARN_ON(display->drm, percent > 100))
975 continue;
976
977 backlight_map_add(map, percent, duty_cycle);
978 }
979
980 fixup_backlight_map(map, 0xff);
981
982 return map;
983 }
984
985 #define BCM_VALID BIT(31)
986 #define BCM_PERCENTAGE_MASK GENMASK(22, 16)
987 #define BCM_DUTY_CYCLE_MASK GENMASK(15, 0)
988
989 static struct intel_backlight_map *build_backlight_map_bcm(struct intel_display *display,
990 int lfp_index)
991 {
> 992 struct opregion_backlight __iomem *backlight = display->opregion->backlight;
993 struct intel_backlight_map *map;
994
995 /* BCM may or may not not include min/max entries */
996 map = kzalloc_flex(*map, entries, ARRAY_SIZE(backlight->bcm1) + 2);
997 if (!map)
998 return NULL;
999
1000 for (int i = 0; i < ARRAY_SIZE(backlight->bcm1); i++) {
1001 uint32_t bcm = ioread32(lfp_index ?
1002 &backlight->bcm2[i] :
1003 &backlight->bcm1[i]);
1004 int percent, duty_cycle;
1005
1006 if ((bcm & BCM_VALID) == 0)
1007 continue;
1008
1009 percent = FIELD_GET(BCM_PERCENTAGE_MASK, bcm);
1010 duty_cycle = FIELD_GET(BCM_DUTY_CYCLE_MASK, bcm);
1011
1012 if (drm_WARN_ON(display->drm, percent > 100))
1013 continue;
1014
1015 backlight_map_add(map, percent, duty_cycle);
1016 }
1017
1018 fixup_backlight_map(map, 0xffff);
1019
1020 return map;
1021 }
1022
--
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:[~2026-11-28 3:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-28 3:38 [vsyrjala:bclm_bcm_backlight_remap_2 5/5] drivers/gpu/drm/i915/display/intel_opregion.c:956:63: sparse: sparse: incorrect type in initializer (different address spaces) kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.