tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 39676dfe52331dba909c617f213fdb21015c8d10 commit: f872e2f5f0beabd34c03799a5c597f6ba47b51cc [4679/10295] drm/amd/display: Add writeback enable field (wb_enabled) config: x86_64-randconfig-161-20231228 (https://download.01.org/0day-ci/archive/20240101/202401010520.1VZfOvg0-lkp@xxxxxxxxx/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 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> | Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> | Closes: https://lore.kernel.org/r/202401010520.1VZfOvg0-lkp@xxxxxxxxx/ New smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9280 amdgpu_dm_atomic_commit_tail() error: we previously assumed 'acrtc' could be null (see line 9277) vim +/acrtc +9280 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c e7b07ceef2a650 Harry Wentland 2017-08-10 9263 c81e13b929df2f Alex Hung 2023-12-01 9264 /* Enable writeback */ c81e13b929df2f Alex Hung 2023-12-01 9265 for_each_new_connector_in_state(state, connector, new_con_state, i) { c81e13b929df2f Alex Hung 2023-12-01 9266 struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state); c81e13b929df2f Alex Hung 2023-12-01 9267 struct amdgpu_crtc *acrtc = to_amdgpu_crtc(dm_new_con_state->base.crtc); c81e13b929df2f Alex Hung 2023-12-01 9268 c81e13b929df2f Alex Hung 2023-12-01 9269 if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK) c81e13b929df2f Alex Hung 2023-12-01 9270 continue; c81e13b929df2f Alex Hung 2023-12-01 9271 c81e13b929df2f Alex Hung 2023-12-01 9272 if (!new_con_state->writeback_job) c81e13b929df2f Alex Hung 2023-12-01 9273 continue; c81e13b929df2f Alex Hung 2023-12-01 9274 c81e13b929df2f Alex Hung 2023-12-01 9275 new_crtc_state = NULL; c81e13b929df2f Alex Hung 2023-12-01 9276 c81e13b929df2f Alex Hung 2023-12-01 @9277 if (acrtc) ^^^^^ Check for NULL c81e13b929df2f Alex Hung 2023-12-01 9278 new_crtc_state = drm_atomic_get_new_crtc_state(state, &acrtc->base); c81e13b929df2f Alex Hung 2023-12-01 9279 f872e2f5f0beab Alex Hung 2023-12-01 @9280 if (acrtc->wb_enabled) ^^^^^^^^^^^^^^^^^ Unchecked dereference f872e2f5f0beab Alex Hung 2023-12-01 9281 continue; f872e2f5f0beab Alex Hung 2023-12-01 9282 c81e13b929df2f Alex Hung 2023-12-01 9283 dm_new_crtc_state = to_dm_crtc_state(new_crtc_state); c81e13b929df2f Alex Hung 2023-12-01 9284 c81e13b929df2f Alex Hung 2023-12-01 9285 dm_set_writeback(dm, dm_new_crtc_state, connector, new_con_state); f872e2f5f0beab Alex Hung 2023-12-01 9286 acrtc->wb_enabled = true; c81e13b929df2f Alex Hung 2023-12-01 9287 } c81e13b929df2f Alex Hung 2023-12-01 9288 6ce8f316673f61 Nicholas Kazlauskas 2019-07-11 9289 /* Update audio instances for each connector. */ 6ce8f316673f61 Nicholas Kazlauskas 2019-07-11 9290 amdgpu_dm_commit_audio(dev, state); 6ce8f316673f61 Nicholas Kazlauskas 2019-07-11 9291 7230362c78d441 Alex Deucher 2020-12-10 9292 /* restore the backlight level */ -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki