From: Dan Carpenter <error27@gmail.com>
To: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
Cc: amd-gfx@lists.freedesktop.org, "SHANMUGAM,
SRINIVASAN" <SRINIVASAN.SHANMUGAM@amd.com>
Subject: [bug report] drm/amd: Enable SMU 15_0_0 support
Date: Sat, 8 Aug 2026 14:44:38 +0300 [thread overview]
Message-ID: <ancWphnH1Ih23J6U@stanley.mountain> (raw)
Hello Pratik Vishwakarma,
Commit c7fc0f372374 ("drm/amd: Enable SMU 15_0_0 support") from Dec
5, 2025 (linux-next), leads to the following Smatch static checker
warning:
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu15/smu_v15_0.c:135 smu_v15_0_load_microcode()
error: uninitialized symbol 'mp1_fw_flags'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu15/smu_v15_0.c
109 int smu_v15_0_load_microcode(struct smu_context *smu)
110 {
111 struct amdgpu_device *adev = smu->adev;
112 const uint32_t *src;
113 const struct smc_firmware_header_v1_0 *hdr;
114 uint32_t addr_start = MP1_SRAM;
115 uint32_t i;
116 uint32_t smc_fw_size;
117 uint32_t mp1_fw_flags;
118
119 hdr = (const struct smc_firmware_header_v1_0 *) adev->pm.fw->data;
120 src = (const uint32_t *)(adev->pm.fw->data +
121 le32_to_cpu(hdr->header.ucode_array_offset_bytes));
122 smc_fw_size = hdr->header.ucode_size_bytes;
123
124 for (i = 1; i < smc_fw_size/4 - 1; i++) {
125 WREG32_PCIE(addr_start, src[i]);
126 addr_start += 4;
127 }
128
129
130 for (i = 0; i < adev->usec_timeout; i++) {
131 if (smu->is_apu)
132 mp1_fw_flags = RREG32_PCIE(MP1_Public |
133 (smnMP1_FIRMWARE_FLAGS & 0xffffffff));
mp1_fw_flags is uninitialized if smu->is_apu is false.
134
--> 135 if ((mp1_fw_flags & MP1_CRU1_MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED_MASK) >>
136 MP1_CRU1_MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED__SHIFT)
137 break;
138 udelay(1);
139 }
140
141 if (i == adev->usec_timeout)
142 return -ETIME;
143
144 return 0;
145 }
This email is a free service from the Smatch-CI project [smatch.sf.net].
regards,
dan carpenter
reply other threads:[~2026-08-10 6:42 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=ancWphnH1Ih23J6U@stanley.mountain \
--to=error27@gmail.com \
--cc=Pratik.Vishwakarma@amd.com \
--cc=SRINIVASAN.SHANMUGAM@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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.