Vico Chen
User Details
- User Since
- Feb 14 2022, 9:14 AM (137 w, 5 d)
Sep 6 2023
ps://dpaste.com/CXTZE2TJY
No. I mean where I can get the latestgpu fw source code just like github, and then I can build the fw kos by myself. Does FreeBSD have git repo for gpu fw, or from ports?
https://github.com/freebsd/drm-kmod-firmware is the correct place, I was showing you that the firmware are correctly named when I build them, I don't know what you are doing wrong but clearly you're doing something wrong.
I download the latest firmware soruce from https://github.com/freebsd/drm-kmod-firmware from master.
And I make the firmware kos and it generates 'i915_glk_dmc_ver1_04_bin.c', but it shows calling 'firmware_register' by the name 'i915/glk_dmc_ver1_04.bin', but not 'i915_glk_dmc_ver1_04_bin'. Where can I get the latest FreeBSD gpu firmware source code?
- Based on my debugging, 'firmware_register' registers the fw to table by the name 'i915/glk_dmc_ver1_04.bin'. Is that right?
No, see https://dpaste.com/2VAAK6D6X
Oh, it is clear now. Based on this piece of code, the firmware is registered with the name 'i915_glk_dmc_ver1_04_bin', but my debugging shows it be registered by the name 'i915/glk_dmc_ver1_04.bin'. Is this piece of code in FreeBSD source or is it in the firmware building source? How can I move to this code?
If that's the error it would happend with all the firmwares that we provide, so I don't think that what you're saying is true.
OK. Let me confirm some facts:
- My i915 firmware module name is 'i915_glk_dmc_ver1_04_bin.ko'. Does your fw module have similar name format?
- I put the fw ko to /boot/kernel/. Do you put them in the same folder?
- Based on my debugging, 'firmware_register' registers the fw to table by the name 'i915/glk_dmc_ver1_04.bin'. Is that right?
- The fw ko will be loaded by a task 'loadimage', and the image name format is NOT similar to 'i915/glk_dmc_ver1_04.bin', but its format is similar to 'i915_glk_dmc_ver1_04_bin' since the ko format is 'i915_glk_dmc_ver1_04_bin.ko'. Is that right?
That's the normal operation for i915kms, it loads the firmware, uploads it to the GPU and release it as it's not needed anymore.
https://github.com/freebsd/drm-kmod/blob/master/drivers/gpu/drm/i915/display/intel_dmc.c#L633
Do you mean the FW ko loaded -> upload to GPU -> unload FW ko, and if we do 'kldstat', the FW ko is not listed. Right?
Hi All,
My previous version still has issues as the fw looks loaded well but it is unloaded after a while. The reason is: in i915 driver, after 'request_firmware', i915 driver calls 'release_firmware', and it calls 'firmware_put' to decrease reference counter to '0' and if with 'fp->file' value, it triggers the unload task to unload fw. I just upload another version patch to load the fw module in 'firmware_get_flag' instead of fw loaded in 'loadimage' to avoid 'fp->file' set to some value to trigger the unloading task, just like simulating load the fw ko manually and then load the i915kms.