[PATCH v6 01/15] drm/sched: Add some scheduling quality unit tests

kernel test robot lkp at intel.com
Wed Jul 9 11:16:05 UTC 2025


Hi Tvrtko,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on v6.16-rc5 next-20250708]
[cannot apply to drm-exynos/exynos-drm-next linus/master drm/drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Tvrtko-Ursulin/drm-sched-Add-some-scheduling-quality-unit-tests/20250708-180519
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    https://lore.kernel.org/r/20250708095147.73366-2-tvrtko.ursulin%40igalia.com
patch subject: [PATCH v6 01/15] drm/sched: Add some scheduling quality unit tests
config: powerpc-randconfig-001-20250709 (https://download.01.org/0day-ci/archive/20250709/202507091842.CV3bHmEt-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250709/202507091842.CV3bHmEt-lkp@intel.com/reproduce)

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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507091842.CV3bHmEt-lkp@intel.com/

All errors (new ones prefixed by >>):

   powerpc-linux-ld: drivers/gpu/drm/scheduler/tests/tests_scheduler.o: in function `drm_sched_client_work':
>> drivers/gpu/drm/scheduler/tests/tests_scheduler.c:419: undefined reference to `__divdi3'


vim +419 drivers/gpu/drm/scheduler/tests/tests_scheduler.c

   409	
   410	static void drm_sched_client_work(struct kthread_work *work)
   411	{
   412		struct test_client *client = container_of(work, typeof(*client), work);
   413		const long sync_wait = MAX_SCHEDULE_TIMEOUT;
   414		unsigned int cycle, work_us, period_us;
   415		struct drm_mock_sched_job *job = NULL;
   416	
   417		work_us = client->params.job_cnt * client->params.job_us;
   418		period_us = work_us + client->params.wait_us;
 > 419		client->cycles = DIV_ROUND_UP(ktime_to_us(client->duration), period_us);
   420		client->ideal_duration = us_to_ktime(client->cycles * period_us);
   421	
   422		client->start = ktime_get();
   423	
   424		for (cycle = 0; cycle < client->cycles; cycle++) {
   425			unsigned int batch;
   426			unsigned long us;
   427			ktime_t t;
   428	
   429			if (READ_ONCE(client->done))
   430				break;
   431	
   432			t = ktime_get();
   433			for (batch = 0; batch < client->params.job_cnt; batch++) {
   434				job = drm_mock_sched_job_new(client->test,
   435							     client->entity);
   436				drm_mock_sched_job_set_duration_us(job,
   437								   client->params.job_us);
   438				drm_mock_sched_job_submit(job);
   439			}
   440	
   441			if (client->params.sync)
   442				drm_mock_sched_job_wait_finished(job, sync_wait);
   443	
   444			t = ktime_sub(ktime_get(), t);
   445			us = ktime_to_us(t);
   446			update_stats(&client->cycle_time, cycle, us);
   447			if (ktime_to_us(t) >= (long)work_us)
   448				us = ktime_to_us(t) - work_us;
   449			else if (WARN_ON_ONCE(client->params.sync))
   450				us = 0;
   451			update_stats(&client->latency_time, cycle, us);
   452			WRITE_ONCE(client->cycle, cycle);
   453	
   454			if (READ_ONCE(client->done))
   455				break;
   456	
   457			if (client->params.wait_us)
   458				fsleep(client->params.wait_us);
   459			else
   460				cond_resched();
   461		}
   462	
   463		client->done = drm_mock_sched_job_wait_finished(job, sync_wait);
   464		client->end = ktime_get();
   465	}
   466	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


More information about the amd-gfx mailing list