From: Dan Carpenter <error27@gmail.com>
To: oe-kbuild@lists.linux.dev, Harry Wentland <harry.wentland@amd.com>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org,
Alex Deucher <alexander.deucher@amd.com>,
Alex Hung <alex.hung@amd.com>
Subject: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3415 dm_suspend() warn: inconsistent returns '&dm->dc_lock'.
Date: Thu, 23 Jul 2026 11:34:00 +0300 [thread overview]
Message-ID: <202607220433.GXC845n9-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b95f03f04d475aa6719d15a636ddf32222d55657
commit: af3f2f5db2659a13c256d2fb096c473eb50412ef drm/amdgpu: Remove UML build exclusion from Kconfig
config: um-randconfig-r071-20260721 (https://download.01.org/0day-ci/archive/20260722/202607220433.GXC845n9-lkp@intel.com/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: af3f2f5db265 ("drm/amdgpu: Remove UML build exclusion from Kconfig")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202607220433.GXC845n9-lkp@intel.com/
New smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3415 dm_suspend() warn: inconsistent returns '&dm->dc_lock'.
vim +3415 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
982d7f9bfe4a503 Sunil Khatri 2024-09-30 3359 static int dm_suspend(struct amdgpu_ip_block *ip_block)
4562236b3bc0a28 Harry Wentland 2017-09-12 3360 {
982d7f9bfe4a503 Sunil Khatri 2024-09-30 3361 struct amdgpu_device *adev = ip_block->adev;
4562236b3bc0a28 Harry Wentland 2017-09-12 3362 struct amdgpu_display_manager *dm = &adev->dm;
4562236b3bc0a28 Harry Wentland 2017-09-12 3363
53b3f8f40e6cff3 Dennis Li 2020-08-19 3364 if (amdgpu_in_reset(adev)) {
3cf7a0bc87f028b Mario Limonciello 2025-02-17 3365 enum dc_status res;
3cf7a0bc87f028b Mario Limonciello 2025-02-17 3366
cdaae8371aa9d4e Bhawanpreet Lakha 2020-05-11 3367 mutex_lock(&dm->dc_lock);
I guess this lock was supposed to be deleted when we converted to
scoped locks? Bad merge???
98ab5f3513f90f1 Bhawanpreet Lakha 2021-01-11 3368
754003486c3cc95 Ray Wu 2025-12-17 3369 amdgpu_dm_ism_disable(dm);
98ab5f3513f90f1 Bhawanpreet Lakha 2021-01-11 3370 dc_allow_idle_optimizations(adev->dm.dc, false);
98ab5f3513f90f1 Bhawanpreet Lakha 2021-01-11 3371
09a4ec5da92c849 Dillon Varone 2023-11-17 3372 dm->cached_dc_state = dc_state_create_copy(dm->dc->current_state);
cdaae8371aa9d4e Bhawanpreet Lakha 2020-05-11 3373
8092aa3ab8f7b73 Alex Hung 2024-06-04 3374 if (dm->cached_dc_state)
cdaae8371aa9d4e Bhawanpreet Lakha 2020-05-11 3375 dm_gpureset_toggle_interrupts(adev, dm->cached_dc_state, false);
cdaae8371aa9d4e Bhawanpreet Lakha 2020-05-11 3376
3cf7a0bc87f028b Mario Limonciello 2025-02-17 3377 res = amdgpu_dm_commit_zero_streams(dm->dc);
3cf7a0bc87f028b Mario Limonciello 2025-02-17 3378 if (res != DC_OK) {
3cf7a0bc87f028b Mario Limonciello 2025-02-17 3379 drm_err(adev_to_drm(adev), "Failed to commit zero streams: %d\n", res);
3cf7a0bc87f028b Mario Limonciello 2025-02-17 3380 return -EINVAL;
mutex_unlock(&dm->dc_lock); before returning.
3cf7a0bc87f028b Mario Limonciello 2025-02-17 3381 }
cdaae8371aa9d4e Bhawanpreet Lakha 2020-05-11 3382
cdaae8371aa9d4e Bhawanpreet Lakha 2020-05-11 3383 amdgpu_dm_irq_suspend(adev);
cdaae8371aa9d4e Bhawanpreet Lakha 2020-05-11 3384
8e794421bc98158 Wayne Lin 2021-07-23 3385 hpd_rx_irq_work_suspend(dm);
8e794421bc98158 Wayne Lin 2021-07-23 3386
65890cad2edb53b Mario Limonciello 2025-02-17 3387 return 0;
cdaae8371aa9d4e Bhawanpreet Lakha 2020-05-11 3388 }
4562236b3bc0a28 Harry Wentland 2017-09-12 3389
50e0bae34fa6b8b Mario Limonciello 2025-02-13 3390 if (!adev->dm.cached_state) {
709a37ab9c63297 Mario Limonciello 2025-06-01 3391 int r = dm_cache_state(adev);
709a37ab9c63297 Mario Limonciello 2025-06-01 3392
709a37ab9c63297 Mario Limonciello 2025-06-01 3393 if (r)
709a37ab9c63297 Mario Limonciello 2025-06-01 3394 return r;
50e0bae34fa6b8b Mario Limonciello 2025-02-13 3395 }
d2f0b53bda31938 Leo (Hanghong Ma 2019-01-24 3396)
7594874227e1b04 Kun Liu 2025-01-08 3397 s3_handle_hdmi_cec(adev_to_drm(adev), true);
7594874227e1b04 Kun Liu 2025-01-08 3398
4a580877bdcb837 Luben Tuikov 2020-08-24 3399 s3_handle_mst(adev_to_drm(adev), true);
4562236b3bc0a28 Harry Wentland 2017-09-12 3400
4562236b3bc0a28 Harry Wentland 2017-09-12 3401 amdgpu_dm_irq_suspend(adev);
4562236b3bc0a28 Harry Wentland 2017-09-12 3402
754003486c3cc95 Ray Wu 2025-12-17 3403 scoped_guard(mutex, &dm->dc_lock)
754003486c3cc95 Ray Wu 2025-12-17 3404 amdgpu_dm_ism_disable(dm);
double lock. What?
754003486c3cc95 Ray Wu 2025-12-17 3405
8e794421bc98158 Wayne Lin 2021-07-23 3406 hpd_rx_irq_work_suspend(dm);
8e794421bc98158 Wayne Lin 2021-07-23 3407
32f5062d1c7dc2a Tom St Denis 2017-10-17 3408 dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D3);
2fe79508d9c393b Hamza Mahfooz 2024-10-04 3409
2fe79508d9c393b Hamza Mahfooz 2024-10-04 3410 if (dm->dc->caps.ips_support && adev->in_s0ix)
2fe79508d9c393b Hamza Mahfooz 2024-10-04 3411 dc_allow_idle_optimizations(dm->dc, true);
2fe79508d9c393b Hamza Mahfooz 2024-10-04 3412
0f657938e4345a7 Samson Tam 2023-11-28 3413 dc_dmub_srv_set_power_state(dm->dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D3);
4562236b3bc0a28 Harry Wentland 2017-09-12 3414
1c2075d401f06a2 Jason Yan 2020-05-04 @3415 return 0;
4562236b3bc0a28 Harry Wentland 2017-09-12 3416 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-07-23 10:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202607220433.GXC845n9-lkp@intel.com \
--to=error27@gmail.com \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=harry.wentland@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®