* [linux-next:master 13439/13737] drivers/gpu/drm/xe/xe_drm_client.c:272 show_runtime() error: uninitialized symbol 'hwe'.
@ 2024-05-23 4:27 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-23 4:27 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Lucas De Marchi <lucas.demarchi@intel.com>
CC: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 3689b0ef08b70e4e03b82ebd37730a03a672853a
commit: 188ced1e0ff892f0948f20480e2e0122380ae46d [13439/13737] drm/xe/client: Print runtime to fdinfo
:::::: branch date: 3 hours ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-161-20240523 (https://download.01.org/0day-ci/archive/20240523/202405231226.hSDvgv0G-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202405231226.hSDvgv0G-lkp@intel.com/
smatch warnings:
drivers/gpu/drm/xe/xe_drm_client.c:272 show_runtime() error: uninitialized symbol 'hwe'.
drivers/gpu/drm/xe/xe_drm_client.c:292 show_runtime() error: uninitialized symbol 'gpu_timestamp'.
vim +/hwe +272 drivers/gpu/drm/xe/xe_drm_client.c
0845233388f8a2 Tejas Upadhyay 2023-09-15 239
188ced1e0ff892 Lucas De Marchi 2024-05-17 240 static void show_runtime(struct drm_printer *p, struct drm_file *file)
188ced1e0ff892 Lucas De Marchi 2024-05-17 241 {
188ced1e0ff892 Lucas De Marchi 2024-05-17 242 unsigned long class, i, gt_id, capacity[XE_ENGINE_CLASS_MAX] = { };
188ced1e0ff892 Lucas De Marchi 2024-05-17 243 struct xe_file *xef = file->driver_priv;
188ced1e0ff892 Lucas De Marchi 2024-05-17 244 struct xe_device *xe = xef->xe;
188ced1e0ff892 Lucas De Marchi 2024-05-17 245 struct xe_gt *gt;
188ced1e0ff892 Lucas De Marchi 2024-05-17 246 struct xe_hw_engine *hwe;
188ced1e0ff892 Lucas De Marchi 2024-05-17 247 struct xe_exec_queue *q;
188ced1e0ff892 Lucas De Marchi 2024-05-17 248 u64 gpu_timestamp;
188ced1e0ff892 Lucas De Marchi 2024-05-17 249
188ced1e0ff892 Lucas De Marchi 2024-05-17 250 xe_pm_runtime_get(xe);
188ced1e0ff892 Lucas De Marchi 2024-05-17 251
188ced1e0ff892 Lucas De Marchi 2024-05-17 252 /* Accumulate all the exec queues from this client */
188ced1e0ff892 Lucas De Marchi 2024-05-17 253 mutex_lock(&xef->exec_queue.lock);
188ced1e0ff892 Lucas De Marchi 2024-05-17 254 xa_for_each(&xef->exec_queue.xa, i, q)
188ced1e0ff892 Lucas De Marchi 2024-05-17 255 xe_exec_queue_update_runtime(q);
188ced1e0ff892 Lucas De Marchi 2024-05-17 256 mutex_unlock(&xef->exec_queue.lock);
188ced1e0ff892 Lucas De Marchi 2024-05-17 257
188ced1e0ff892 Lucas De Marchi 2024-05-17 258 /* Get the total GPU cycles */
188ced1e0ff892 Lucas De Marchi 2024-05-17 259 for_each_gt(gt, xe, gt_id) {
188ced1e0ff892 Lucas De Marchi 2024-05-17 260 hwe = xe_gt_any_hw_engine(gt);
188ced1e0ff892 Lucas De Marchi 2024-05-17 261 if (!hwe)
188ced1e0ff892 Lucas De Marchi 2024-05-17 262 continue;
188ced1e0ff892 Lucas De Marchi 2024-05-17 263
188ced1e0ff892 Lucas De Marchi 2024-05-17 264 xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
188ced1e0ff892 Lucas De Marchi 2024-05-17 265 gpu_timestamp = xe_hw_engine_read_timestamp(hwe);
188ced1e0ff892 Lucas De Marchi 2024-05-17 266 xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
188ced1e0ff892 Lucas De Marchi 2024-05-17 267 break;
188ced1e0ff892 Lucas De Marchi 2024-05-17 268 }
188ced1e0ff892 Lucas De Marchi 2024-05-17 269
188ced1e0ff892 Lucas De Marchi 2024-05-17 270 xe_pm_runtime_put(xe);
188ced1e0ff892 Lucas De Marchi 2024-05-17 271
188ced1e0ff892 Lucas De Marchi 2024-05-17 @272 if (unlikely(!hwe))
188ced1e0ff892 Lucas De Marchi 2024-05-17 273 return;
188ced1e0ff892 Lucas De Marchi 2024-05-17 274
188ced1e0ff892 Lucas De Marchi 2024-05-17 275 for (class = 0; class < XE_ENGINE_CLASS_MAX; class++) {
188ced1e0ff892 Lucas De Marchi 2024-05-17 276 const char *class_name;
188ced1e0ff892 Lucas De Marchi 2024-05-17 277
188ced1e0ff892 Lucas De Marchi 2024-05-17 278 for_each_gt(gt, xe, gt_id)
188ced1e0ff892 Lucas De Marchi 2024-05-17 279 capacity[class] += gt->user_engines.instances_per_class[class];
188ced1e0ff892 Lucas De Marchi 2024-05-17 280
188ced1e0ff892 Lucas De Marchi 2024-05-17 281 /*
188ced1e0ff892 Lucas De Marchi 2024-05-17 282 * Engines may be fused off or not exposed to userspace. Don't
188ced1e0ff892 Lucas De Marchi 2024-05-17 283 * return anything if this entire class is not available
188ced1e0ff892 Lucas De Marchi 2024-05-17 284 */
188ced1e0ff892 Lucas De Marchi 2024-05-17 285 if (!capacity[class])
188ced1e0ff892 Lucas De Marchi 2024-05-17 286 continue;
188ced1e0ff892 Lucas De Marchi 2024-05-17 287
188ced1e0ff892 Lucas De Marchi 2024-05-17 288 class_name = xe_hw_engine_class_to_str(class);
188ced1e0ff892 Lucas De Marchi 2024-05-17 289 drm_printf(p, "drm-cycles-%s:\t%llu\n",
188ced1e0ff892 Lucas De Marchi 2024-05-17 290 class_name, xef->runtime[class]);
188ced1e0ff892 Lucas De Marchi 2024-05-17 291 drm_printf(p, "drm-total-cycles-%s:\t%llu\n",
188ced1e0ff892 Lucas De Marchi 2024-05-17 @292 class_name, gpu_timestamp);
188ced1e0ff892 Lucas De Marchi 2024-05-17 293
188ced1e0ff892 Lucas De Marchi 2024-05-17 294 if (capacity[class] > 1)
188ced1e0ff892 Lucas De Marchi 2024-05-17 295 drm_printf(p, "drm-engine-capacity-%s:\t%lu\n",
188ced1e0ff892 Lucas De Marchi 2024-05-17 296 class_name, capacity[class]);
188ced1e0ff892 Lucas De Marchi 2024-05-17 297 }
188ced1e0ff892 Lucas De Marchi 2024-05-17 298 }
188ced1e0ff892 Lucas De Marchi 2024-05-17 299
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-23 4:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-23 4:27 [linux-next:master 13439/13737] drivers/gpu/drm/xe/xe_drm_client.c:272 show_runtime() error: uninitialized symbol 'hwe' kernel test robot
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.