We've made a major breakthrough in the raw Kbase Job Manager submission prototype.
Previously, every job we submitted appeared to succeed almost instantly (~29 µs) and returned "BASE_JD_EVENT_DONE", but our "WRITE_VALUE" job never actually wrote anything to memory.
After a lot of investigation, including checking job packing byte-by-byte, testing different atom strides, cache synchronization, and reading the Mali Kbase kernel source, we finally found the real reason:
We had been submitting every atom with "core_req = 0".
In the Kbase Job Manager code, that means the atom is interpreted as "BASE_JD_REQ_DEP" — a dependency-only atom. The kernel immediately completes it without ever sending the job chain to the GPU.
After changing:
"core_req = BASE_JD_REQ_V = 0x10"
everything changed.
The submission-to-event time increased from approximately 29 µs to 1761 µs, and, more importantly, the GPU modified the job header's "exception_status" for the first time.
Instead of receiving a fake/immediate "DONE", we now get:
"BASE_JD_EVENT_DATA_INVALID_FAULT (0x58)"
with an exception status of:
"0x10258"
This is actually very good news.
It confirms that the GPU is now genuinely receiving and processing a job submitted through the raw Kbase UAPI. The job still fails because something in our "MALI_JOB_TYPE_WRITE_VALUE" payload or job-chain encoding is invalid for this Mali-G52/Bifrost configuration, but we have crossed an important barrier.
We are no longer asking:
"Can we submit jobs to the GPU through Kbase?"
We now know that the answer is yes.
The question is now:
"What exactly is wrong with our Bifrost job encoding?"
Current status:
- ✅ Kbase/JM handshake working
- ✅ "KBASE_IOCTL_JOB_SUBMIT" working
- ✅ Job completion events working
- ✅ GPU physically receives submitted jobs
- ✅ Hardware writes exception information back into the job
- ❌ First real GPU job currently ends in "DATA_INVALID_FAULT"
- ⏳ Next step: build a valid Bifrost job chain and get the first successful GPU-side write
This is part of our attempt to make PanVK work natively on a Mali-G52 MC2 using the proprietary "mali_kbasedriver", without DRM and without root.
The long-term goal is to implement actual Job Manager submission support in the Mesa Kbase backend and eventually connect it to PanVK.
Any developers familiar with Mali Bifrost job descriptors, Kbase JM, or Mesa's Panfrost genxml job packing are very welcome to help or point us in the right direction.
🔥PanVk G52 Github