Page MenuHomeFreeBSD

vico.chern_qq.com (Vico Chen)
Vico Chen

Projects

User does not belong to any projects.

User Details

User Since
Feb 14 2022, 9:14 AM (113 w, 4 d)

Vico Chen

Recent Activity

Sep 6 2023

vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..

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.

Sep 6 2023, 4:26 PM
vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..

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?

https://dpaste.com/CXTZE2TJY

Sep 6 2023, 3:58 PM
vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..
In D41729#951580, @manu wrote:
  1. 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?

It's generated code, you should never need to "move to this code" but if you want to see what's happening go to i915kmsfw/glkdmc_104 and make.

Sep 6 2023, 3:37 PM
vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..
  1. 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?

Sep 6 2023, 3:25 PM
vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..
In D41729#951563, @bz wrote:

To me this smells that the firmware is from before:
https://github.com/freebsd/drm-kmod-firmware/commit/f4f876a64d06143bec3e65c24ed9d5a6b8d6cb27
and
https://github.com/freebsd/drm-kmod-firmware/commit/efe0d9f294e4a3fa6673dc9c2ab4ec173dddf273

Also manually copying the firmware seems weird. Why don't you just try to install the package using fwget and see what happens?

Sep 6 2023, 3:17 PM
vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..
In D41729#951522, @bz wrote:

Where does your firmware kernel image come from and how old is it?

Sep 6 2023, 3:04 PM
vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..

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:

  1. My i915 firmware module name is 'i915_glk_dmc_ver1_04_bin.ko'. Does your fw module have similar name format?
  2. I put the fw ko to /boot/kernel/. Do you put them in the same folder?
  3. Based on my debugging, 'firmware_register' registers the fw to table by the name 'i915/glk_dmc_ver1_04.bin'. Is that right?
  4. 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?
Sep 6 2023, 2:55 PM
vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..

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?

Sep 6 2023, 2:44 PM
vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..
In D41729#951494, @manu wrote:

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'

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

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.

The 'request_firmware' and 'release_firmware' is NOT designed as Linux usage. I am still thinking about if there are better way to comptible Linux usage but don't break current FreeBSD logic.
Welcome any suggestions.

Sep 6 2023, 2:36 PM
vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..
In D41729#951384, @manu wrote:
In D41729#951068, @manu wrote:

I don't really understand the problem, firmware loads fine here.

How do you load the firmware?
For my case, if I load firmware manually 'kldload i915_glk_dmc_ver1_04_bin.ko', and then load i915kms.ko, it will work well. But if I only load the i915kms.ko, but let the i915 driver to load the firmware automatically, then the firmware loading will be failed.

I don't load the firmware, i915kms do it for me and it should also do it for you, can you share part of dmesg when you load i915kms without this patch ?

Sep 6 2023, 10:53 AM
vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..

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.

Sep 6 2023, 10:31 AM
vico.chern_qq.com updated the diff for D41729: GPU firmware: Load i915 and amdgpu firmware failed..
Sep 6 2023, 10:23 AM
vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..
In D41729#951025, @bz wrote:

This seems questionable. Isn't the real problem where the firmware modules get created? Has anything changed recently (in Linux or there)? I am sure this will break other drivers.

Sep 6 2023, 4:07 AM
vico.chern_qq.com added a comment to D41729: GPU firmware: Load i915 and amdgpu firmware failed..
In D41729#951068, @manu wrote:

I don't really understand the problem, firmware loads fine here.

Sep 6 2023, 3:04 AM

Sep 5 2023

vico.chern_qq.com requested review of D41729: GPU firmware: Load i915 and amdgpu firmware failed..
Sep 5 2023, 10:58 AM

Sep 4 2023

vico.chern_qq.com attached a referenced file: F67050293: timerfd.c.
Sep 4 2023, 3:31 AM
vico.chern_qq.com added a comment to D41708: Linux ABI timerfd can't work on FreeBSD 14 stable..

Add test case, and this case need be compiled on Ubuntu.

Sep 4 2023, 3:28 AM
vico.chern_qq.com requested review of D41708: Linux ABI timerfd can't work on FreeBSD 14 stable..
Sep 4 2023, 3:24 AM

Mar 8 2023

vico.chern_qq.com added a reviewer for D38977: Random failure to read dos file in bootloader: tsoome.
Mar 8 2023, 9:29 AM
vico.chern_qq.com added reviewers for D38978: Linux Compatible: enhance the linux_mremap: jhb, dchagin.
Mar 8 2023, 9:25 AM
vico.chern_qq.com added a reviewer for D38978: Linux Compatible: enhance the linux_mremap: trasz.
Mar 8 2023, 9:22 AM
vico.chern_qq.com requested review of D38978: Linux Compatible: enhance the linux_mremap.
Mar 8 2023, 9:17 AM
vico.chern_qq.com requested review of D38977: Random failure to read dos file in bootloader.
Mar 8 2023, 8:11 AM

Mar 7 2023

vico.chern_qq.com updated vico.chern_qq.com.
Mar 7 2023, 10:48 AM

Mar 3 2023

vico.chern_qq.com updated vico.chern_qq.com.
Mar 3 2023, 10:36 AM
vico.chern_qq.com updated vico.chern_qq.com.
Mar 3 2023, 10:36 AM
vico.chern_qq.com updated the summary of D38885: Keep Linux Compatible SYSFS the same as Ubuntu.
Mar 3 2023, 10:32 AM
vico.chern_qq.com requested review of D38885: Keep Linux Compatible SYSFS the same as Ubuntu.
Mar 3 2023, 10:26 AM
vico.chern_qq.com updated vico.chern_qq.com.
Mar 3 2023, 9:36 AM