do context switch only if gpu has kernel

This commit is contained in:
Marcel Lütke Dreimann
2022-08-24 11:48:13 +02:00
parent 8759c0d52e
commit a8ea41e618

View File

@@ -21,8 +21,7 @@ void Scheduler::schedule_next()
VGpu* next;
if ((next = static_cast<VGpu*>(_run_list.first())))
{
// set vgpu and change to its context
this->dispatch(*next);
// set vgpu
_curr_vgpu = next;
// move vgpu to end of list
@@ -74,6 +73,9 @@ void Scheduler::handle_gpu_event()
idle = false;
// switch context
dispatch(*_curr_vgpu);
// set frequency
gpgpudriver.setMaxFreq();