drivers/gpu/drm/i915/display/intel_color.c:2392 i9xx_color_check() error: we previously assumed 'crtc_state->hw.gamma_lut' could be null (see line 2385)

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Yury Norov <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2f1baf1fc8929e6c48370be543ad028ac7ad4131
commit: 09472f591aa0b72c2dd6c693f48b2d6fea66c7ba bitfield: wire __bf_shf to __builtin_ctzll
date:   3 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 3 months ago
config: x86_64-randconfig-161-20260813 (https://download.01.org/0day-ci/archive/20260815/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9187-g5189e3fb

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
| Fixes: 09472f591aa0 ("bitfield: wire __bf_shf to __builtin_ctzll")
| Reported-by: kernel test robot <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

New smatch warnings:
drivers/gpu/drm/i915/display/intel_color.c:2392 i9xx_color_check() error: we previously assumed 'crtc_state->hw.gamma_lut' could be null (see line 2385)

Old smatch warnings:
drivers/gpu/drm/i915/display/intel_color.c:1544 ivb_load_luts() error: we previously assumed 'post_csc_lut' could be null (see line 1534)

vim +2392 drivers/gpu/drm/i915/display/intel_color.c

18f1b5ae7ecab0 drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2022-10-24  2371  
5f128aa1052e7d drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2024-05-23  2372  static int i9xx_color_check(struct intel_atomic_state *state,
5f128aa1052e7d drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2024-05-23  2373  			    struct intel_crtc *crtc)
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2374  {
9d476ce24f72fc drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2024-10-24  2375  	struct intel_display *display = to_intel_display(state);
5f128aa1052e7d drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2024-05-23  2376  	struct intel_crtc_state *crtc_state =
5f128aa1052e7d drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2024-05-23  2377  		intel_atomic_get_new_crtc_state(state, crtc);
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2378  	int ret;
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2379  
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2380  	ret = check_luts(crtc_state);
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2381  	if (ret)
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2382  		return ret;
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2383  
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2384  	crtc_state->gamma_enable =
1326a92c346641 drivers/gpu/drm/i915/display/intel_color.c Maarten Lankhorst 2019-10-31 @2385  		crtc_state->hw.gamma_lut &&
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2386  		!crtc_state->c8_planes;
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2387  
e262568eb58fe7 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-04-01  2388  	crtc_state->gamma_mode = i9xx_gamma_mode(crtc_state);
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2389  
9d476ce24f72fc drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2024-10-24  2390  	if (DISPLAY_VER(display) < 4 &&
67630bacae2354 drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2022-11-14  2391  	    crtc_state->gamma_mode == GAMMA_MODE_MODE_10BIT) {
dd3721a76f0b8a drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2024-10-24 @2392  		ret = i9xx_check_lut_10(crtc, crtc_state->hw.gamma_lut);
67630bacae2354 drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2022-11-14  2393  		if (ret)
67630bacae2354 drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2022-11-14  2394  			return ret;
67630bacae2354 drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2022-11-14  2395  	}
67630bacae2354 drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2022-11-14  2396  
5f128aa1052e7d drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2024-05-23  2397  	ret = intel_color_add_affected_planes(state, crtc);
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2398  	if (ret)
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2399  		return ret;
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2400  
18f1b5ae7ecab0 drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2022-10-24  2401  	intel_assign_luts(crtc_state);
18f1b5ae7ecab0 drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2022-10-24  2402  
5f128aa1052e7d drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2024-05-23  2403  	crtc_state->preload_luts = intel_can_preload_luts(state, crtc);
0ccc42a2fd5107 drivers/gpu/drm/i915/display/intel_color.c Ville Syrjälä     2019-10-30  2404  
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2405  	return 0;
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2406  }
e98f35624ca4a4 drivers/gpu/drm/i915/intel_color.c         Ville Syrjälä     2019-03-27  2407  

:::::: The code at line 2392 was first introduced by commit
:::::: dd3721a76f0b8a0054acc1befe5298a7bef47f07 drm/i915/color: Pimp debugs

:::::: TO: Ville Syrjälä <[email protected]>
:::::: CC: Ville Syrjälä <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.