From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [android-common:upstream-linux-6.6.y 685/685] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:247 dcn21_set_backlight_level() error: we previously assumed 'tg' could be null (see line 244)
Date: Fri, 06 Mar 2026 21:48:30 +0800 [thread overview]
Message-ID: <202603062103.GcIsRo8v-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: cros-kernel-buildreports@googlegroups.com
tree: https://android.googlesource.com/kernel/common upstream-linux-6.6.y
head: 4fc00fe35d46b4fc8dac2eb543a0e3d44bb15f47
commit: 2e150ccea13129eb048679114808eb9770443e4d [685/685] drm/amd/display: Fix 'panel_cntl' could be null in 'dcn21_set_backlight_level()'
:::::: branch date: 23 hours ago
:::::: commit date: 2 years, 1 month ago
config: i386-randconfig-141-20260306 (https://download.01.org/0day-ci/archive/20260306/202603062103.GcIsRo8v-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9004-gb810ac53
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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202603062103.GcIsRo8v-lkp@intel.com/
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:247 dcn21_set_backlight_level() error: we previously assumed 'tg' could be null (see line 244)
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:254 dcn21_set_backlight_level() error: we previously assumed 'abm' could be null (see line 244)
vim +/tg +247 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c
474ac4a875ca6fe Yongqiang Sun 2020-04-27 233
474ac4a875ca6fe Yongqiang Sun 2020-04-27 234 bool dcn21_set_backlight_level(struct pipe_ctx *pipe_ctx,
474ac4a875ca6fe Yongqiang Sun 2020-04-27 235 uint32_t backlight_pwm_u16_16,
474ac4a875ca6fe Yongqiang Sun 2020-04-27 236 uint32_t frame_ramp)
474ac4a875ca6fe Yongqiang Sun 2020-04-27 237 {
474ac4a875ca6fe Yongqiang Sun 2020-04-27 238 struct dc_context *dc = pipe_ctx->stream->ctx;
474ac4a875ca6fe Yongqiang Sun 2020-04-27 239 struct abm *abm = pipe_ctx->stream_res.abm;
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 240 struct timing_generator *tg = pipe_ctx->stream_res.tg;
474ac4a875ca6fe Yongqiang Sun 2020-04-27 241 struct panel_cntl *panel_cntl = pipe_ctx->stream->link->panel_cntl;
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 242 uint32_t otg_inst;
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 243
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 @244 if (!abm && !tg && !panel_cntl)
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 245 return false;
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 246
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 @247 otg_inst = tg->inst;
474ac4a875ca6fe Yongqiang Sun 2020-04-27 248
474ac4a875ca6fe Yongqiang Sun 2020-04-27 249 if (dc->dc->res_pool->dmcu) {
474ac4a875ca6fe Yongqiang Sun 2020-04-27 250 dce110_set_backlight_level(pipe_ctx, backlight_pwm_u16_16, frame_ramp);
474ac4a875ca6fe Yongqiang Sun 2020-04-27 251 return true;
474ac4a875ca6fe Yongqiang Sun 2020-04-27 252 }
474ac4a875ca6fe Yongqiang Sun 2020-04-27 253
6f0ef80a00adfd5 Leon Huang 2022-12-08 @254 if (abm->funcs && abm->funcs->set_pipe_ex) {
71be0f674070a5a Lewis Huang 2023-12-01 255 abm->funcs->set_pipe_ex(abm,
71be0f674070a5a Lewis Huang 2023-12-01 256 otg_inst,
71be0f674070a5a Lewis Huang 2023-12-01 257 SET_ABM_PIPE_NORMAL,
71be0f674070a5a Lewis Huang 2023-12-01 258 panel_cntl->inst,
71be0f674070a5a Lewis Huang 2023-12-01 259 panel_cntl->pwrseq_inst);
6f0ef80a00adfd5 Leon Huang 2022-12-08 260 } else {
71be0f674070a5a Lewis Huang 2023-12-01 261 dmub_abm_set_pipe(abm,
71be0f674070a5a Lewis Huang 2023-12-01 262 otg_inst,
71be0f674070a5a Lewis Huang 2023-12-01 263 SET_ABM_PIPE_NORMAL,
71be0f674070a5a Lewis Huang 2023-12-01 264 panel_cntl->inst,
71be0f674070a5a Lewis Huang 2023-12-01 265 panel_cntl->pwrseq_inst);
6f0ef80a00adfd5 Leon Huang 2022-12-08 266 }
474ac4a875ca6fe Yongqiang Sun 2020-04-27 267
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 268 if (abm->funcs && abm->funcs->set_backlight_level_pwm)
6f0ef80a00adfd5 Leon Huang 2022-12-08 269 abm->funcs->set_backlight_level_pwm(abm, backlight_pwm_u16_16,
6f0ef80a00adfd5 Leon Huang 2022-12-08 270 frame_ramp, 0, panel_cntl->inst);
6f0ef80a00adfd5 Leon Huang 2022-12-08 271 else
6f0ef80a00adfd5 Leon Huang 2022-12-08 272 dmub_abm_set_backlight(dc, backlight_pwm_u16_16, frame_ramp, panel_cntl->inst);
474ac4a875ca6fe Yongqiang Sun 2020-04-27 273
474ac4a875ca6fe Yongqiang Sun 2020-04-27 274 return true;
474ac4a875ca6fe Yongqiang Sun 2020-04-27 275 }
474ac4a875ca6fe Yongqiang Sun 2020-04-27 276
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, cros-kernel-buildreports@googlegroups.com
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev
Subject: [android-common:upstream-linux-6.6.y 685/685] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:247 dcn21_set_backlight_level() error: we previously assumed 'tg' could be null (see line 244)
Date: Fri, 6 Mar 2026 21:15:31 +0300 [thread overview]
Message-ID: <202603062103.GcIsRo8v-lkp@intel.com> (raw)
Message-ID: <20260306181531.4QibeuKtNsrWq_eBlh6GuO5SbDevdgmivMWiNXy1VxA@z> (raw)
tree: https://android.googlesource.com/kernel/common upstream-linux-6.6.y
head: 4fc00fe35d46b4fc8dac2eb543a0e3d44bb15f47
commit: 2e150ccea13129eb048679114808eb9770443e4d [685/685] drm/amd/display: Fix 'panel_cntl' could be null in 'dcn21_set_backlight_level()'
config: i386-randconfig-141-20260306 (https://download.01.org/0day-ci/archive/20260306/202603062103.GcIsRo8v-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9004-gb810ac53
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>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202603062103.GcIsRo8v-lkp@intel.com/
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:247 dcn21_set_backlight_level() error: we previously assumed 'tg' could be null (see line 244)
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:254 dcn21_set_backlight_level() error: we previously assumed 'abm' could be null (see line 244)
vim +/tg +247 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c
474ac4a875ca6fe Yongqiang Sun 2020-04-27 234 bool dcn21_set_backlight_level(struct pipe_ctx *pipe_ctx,
474ac4a875ca6fe Yongqiang Sun 2020-04-27 235 uint32_t backlight_pwm_u16_16,
474ac4a875ca6fe Yongqiang Sun 2020-04-27 236 uint32_t frame_ramp)
474ac4a875ca6fe Yongqiang Sun 2020-04-27 237 {
474ac4a875ca6fe Yongqiang Sun 2020-04-27 238 struct dc_context *dc = pipe_ctx->stream->ctx;
474ac4a875ca6fe Yongqiang Sun 2020-04-27 239 struct abm *abm = pipe_ctx->stream_res.abm;
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 240 struct timing_generator *tg = pipe_ctx->stream_res.tg;
474ac4a875ca6fe Yongqiang Sun 2020-04-27 241 struct panel_cntl *panel_cntl = pipe_ctx->stream->link->panel_cntl;
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 242 uint32_t otg_inst;
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 243
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 @244 if (!abm && !tg && !panel_cntl)
Presumable || was intended instead of &&.
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 245 return false;
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 246
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 @247 otg_inst = tg->inst;
474ac4a875ca6fe Yongqiang Sun 2020-04-27 248
474ac4a875ca6fe Yongqiang Sun 2020-04-27 249 if (dc->dc->res_pool->dmcu) {
474ac4a875ca6fe Yongqiang Sun 2020-04-27 250 dce110_set_backlight_level(pipe_ctx, backlight_pwm_u16_16, frame_ramp);
474ac4a875ca6fe Yongqiang Sun 2020-04-27 251 return true;
474ac4a875ca6fe Yongqiang Sun 2020-04-27 252 }
474ac4a875ca6fe Yongqiang Sun 2020-04-27 253
6f0ef80a00adfd5 Leon Huang 2022-12-08 @254 if (abm->funcs && abm->funcs->set_pipe_ex) {
71be0f674070a5a Lewis Huang 2023-12-01 255 abm->funcs->set_pipe_ex(abm,
71be0f674070a5a Lewis Huang 2023-12-01 256 otg_inst,
71be0f674070a5a Lewis Huang 2023-12-01 257 SET_ABM_PIPE_NORMAL,
71be0f674070a5a Lewis Huang 2023-12-01 258 panel_cntl->inst,
71be0f674070a5a Lewis Huang 2023-12-01 259 panel_cntl->pwrseq_inst);
6f0ef80a00adfd5 Leon Huang 2022-12-08 260 } else {
71be0f674070a5a Lewis Huang 2023-12-01 261 dmub_abm_set_pipe(abm,
71be0f674070a5a Lewis Huang 2023-12-01 262 otg_inst,
71be0f674070a5a Lewis Huang 2023-12-01 263 SET_ABM_PIPE_NORMAL,
71be0f674070a5a Lewis Huang 2023-12-01 264 panel_cntl->inst,
71be0f674070a5a Lewis Huang 2023-12-01 265 panel_cntl->pwrseq_inst);
6f0ef80a00adfd5 Leon Huang 2022-12-08 266 }
474ac4a875ca6fe Yongqiang Sun 2020-04-27 267
2e150ccea13129e Srinivasan Shanmugam 2024-01-27 268 if (abm->funcs && abm->funcs->set_backlight_level_pwm)
6f0ef80a00adfd5 Leon Huang 2022-12-08 269 abm->funcs->set_backlight_level_pwm(abm, backlight_pwm_u16_16,
6f0ef80a00adfd5 Leon Huang 2022-12-08 270 frame_ramp, 0, panel_cntl->inst);
6f0ef80a00adfd5 Leon Huang 2022-12-08 271 else
6f0ef80a00adfd5 Leon Huang 2022-12-08 272 dmub_abm_set_backlight(dc, backlight_pwm_u16_16, frame_ramp, panel_cntl->inst);
474ac4a875ca6fe Yongqiang Sun 2020-04-27 273
474ac4a875ca6fe Yongqiang Sun 2020-04-27 274 return true;
474ac4a875ca6fe Yongqiang Sun 2020-04-27 275 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-03-06 13:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 13:48 kernel test robot [this message]
2026-03-06 18:15 ` [android-common:upstream-linux-6.6.y 685/685] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:247 dcn21_set_backlight_level() error: we previously assumed 'tg' could be null (see line 244) Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2026-03-07 11:48 kernel test robot
2026-03-07 23:36 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202603062103.GcIsRo8v-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.