Re: kaveri_mec2.bin file missing
Hello On Thu, Nov 25, 2021 at 8:22 PM matthew green wrote: > > Riza Dindir writes: > > Hello All, > > > > Finally... I was able to enable and use my Kaveri device > > (0x1002/0x1309), at the end. It is using the external monitor and is > > using the correct 1440x900 resolution. This is very nice. > > > > There is one thing that I would like to ask. > > > > There is a "CONFIG_ACPI" definition that is being used in the > > radeon_bios file. I looked for this definition in the sources and > > found that "sys/external/bsd/drm2/dist/drm/i915/i915_drv.h" has this > > definition (that is the only place). > > > > I wanted to copy or do something similar in the radeon driver. But I > > was not sure. Then I checked at runtime definitions CONFIG_ACPI and > > NACPICA (as used in the i915 driver). The NACPICA has a value and is > > > 0. And CONFIG_ACPI is not defined, as seen below. > > > > [10.911949] kern info: [drm] CONFIG_ACPI not set > > [10.920577] kern info: [drm] NACPICA > 0 > > > > Do you have any ideas on why CONFIG_ACPI is not defined in radeon? > > (Maybe this is not the correct place to ask this question). > > the ACPI code in the drm code base requires porting to netbsd, > for both the radeon and the nouveau drivers. it's been a while > since i was looking at it (i had nouveau compiling at some > point). ie, it's not enabled because it doesn't compile there, > it is only enabled on i915 because it does there. I see. Might try defining CONFIG_ACPI. > > > If I were to submit patches, how can I submit these, where? > > sending patches to this list is good. > > (there's also tech-x11@ but this stuff is relevant for the > console and other operations that don't need X, and is about > the kernel side..) Yes I will do. The code boiled down to using some functions defined in the acpica.h files in the netbsd code (AcpiGetTable). Although the new porting efforts use the new linux kernel code, which has acpi_get_table, which might even work without modifications, given that CONFIG_ACPI is defined. > > thanks. > > > .mrg. Regards Riza
Re: kaveri_mec2.bin file missing
Hello Sorry for the late reply. It landed in spam for some reason. I apologize. On Sun, Nov 21, 2021 at 5:54 PM Robert Swindells wrote: > > > Riza Dindir wrote: > >I have put the two files listed above (by RVP) to the > >"src/sys/dev/microcode/radeon/" directory. I also changed the > >configuration to only include the radeon device that is the > >0x1002/0x1309 Kaveri device. Did add the KAVERI_mec2.bin to the > >MODULE_FIRMWARE definitions in the radeon_cik.c file (since this was > >missing). But this failed to load the microcode. It does fail in the > >function "cik_init_microcode". > > > >I have put these bin files into "src/sys/dev/microcode/radeon/". Isn't > >this the correct path to put these bin files in? > > It is the correct source directory for Radeon microcode files, unless > you have added something to the Makefile they won't get copied to > the destination directory which is /libdata/firmware/radeon. I have done that but they did not get copied to the /libdata directory. I do not know when the makefile in the src/sys/dev/microcode/radeon directory is being invoked. > > You could just copy files from the linux-firmware tree to > /libdata/firmware/radeon to test things. Yes I manually copied these files and it worked. > > >Are the file names in this directory case-sensitive? Although in the > >"src/sys/dev/microcode/radeon/" directory all the bin files begin with > >capital letters (KAVERI_mec.bin for instance). > > The filenames are case sensitive, you can see that the files are not the > same. > > % diff -b KAVERI_me.bin kaveri_me.bin > Binary files KAVERI_me.bin and kaveri_me.bin differ > > I would expect to use either the KAVERI* or the kaveri* files as a set. On examining the radeok_cik.c file in the cik_init_microcode() function (or something like that) it looks for the KAVERI*, then the kaveri* files. As far as I can tell the kaveri* files are the new firmware. You have to have all the kaveri* files in the libdata directory, so that it will use all the new firmware, otherwise it complains that old and new firmware is being mixed. Thanks for the response. Riza
re: kaveri_mec2.bin file missing
Riza Dindir writes: > Hello All, > > Finally... I was able to enable and use my Kaveri device > (0x1002/0x1309), at the end. It is using the external monitor and is > using the correct 1440x900 resolution. This is very nice. > > There is one thing that I would like to ask. > > There is a "CONFIG_ACPI" definition that is being used in the > radeon_bios file. I looked for this definition in the sources and > found that "sys/external/bsd/drm2/dist/drm/i915/i915_drv.h" has this > definition (that is the only place). > > I wanted to copy or do something similar in the radeon driver. But I > was not sure. Then I checked at runtime definitions CONFIG_ACPI and > NACPICA (as used in the i915 driver). The NACPICA has a value and is > > 0. And CONFIG_ACPI is not defined, as seen below. > > [10.911949] kern info: [drm] CONFIG_ACPI not set > [10.920577] kern info: [drm] NACPICA > 0 > > Do you have any ideas on why CONFIG_ACPI is not defined in radeon? > (Maybe this is not the correct place to ask this question). the ACPI code in the drm code base requires porting to netbsd, for both the radeon and the nouveau drivers. it's been a while since i was looking at it (i had nouveau compiling at some point). ie, it's not enabled because it doesn't compile there, it is only enabled on i915 because it does there. > If I were to submit patches, how can I submit these, where? sending patches to this list is good. (there's also tech-x11@ but this stuff is relevant for the console and other operations that don't need X, and is about the kernel side..) thanks. .mrg.
Re: kaveri_mec2.bin file missing
Hello All, Finally... I was able to enable and use my Kaveri device (0x1002/0x1309), at the end. It is using the external monitor and is using the correct 1440x900 resolution. This is very nice. There is one thing that I would like to ask. There is a "CONFIG_ACPI" definition that is being used in the radeon_bios file. I looked for this definition in the sources and found that "sys/external/bsd/drm2/dist/drm/i915/i915_drv.h" has this definition (that is the only place). I wanted to copy or do something similar in the radeon driver. But I was not sure. Then I checked at runtime definitions CONFIG_ACPI and NACPICA (as used in the i915 driver). The NACPICA has a value and is > 0. And CONFIG_ACPI is not defined, as seen below. [10.911949] kern info: [drm] CONFIG_ACPI not set [10.920577] kern info: [drm] NACPICA > 0 Do you have any ideas on why CONFIG_ACPI is not defined in radeon? (Maybe this is not the correct place to ask this question). If I were to submit patches, how can I submit these, where? Best Regards, Riza Dindir On Sun, Nov 21, 2021 at 2:40 PM Riza Dindir wrote: > > Hello, > > Here is what I try to accomplish. I could not find the bios for the > 0x1002/0x6604 device. So I thought that I could just disable this > device, and use the Kaveri device (0x1002/0x1309), since I have that > bios. > > I have put the two files listed above (by RVP) to the > "src/sys/dev/microcode/radeon/" directory. I also changed the > configuration to only include the radeon device that is the > 0x1002/0x1309 Kaveri device. Did add the KAVERI_mec2.bin to the > MODULE_FIRMWARE definitions in the radeon_cik.c file (since this was > missing). But this failed to load the microcode. It does fail in the > function "cik_init_microcode". > > I have put these bin files into "src/sys/dev/microcode/radeon/". Isn't > this the correct path to put these bin files in? > > Are the file names in this directory case-sensitive? Although in the > "src/sys/dev/microcode/radeon/" directory all the bin files begin with > capital letters (KAVERI_mec.bin for instance). > > Also in the file radeon_cik.c there are MODULE_FIRMWARE > declarations/definitions that have both KAVERI_*.bin files and > kaveri_*.bin files. And the KAVERI_mec2.bin file was missing in that > list, in which all the files start with KAVERI (with capital letters). > Should this entry not be there? Although I tried it both ways. Adding > KAVERI_mec2.bin in the MODULE_FIRMWARE definitions. And tried it also > by removing that entry. It did not change anything. > > I might have not put these files in the correct directory maybe. Am I > missing something? > > On Sun, Nov 21, 2021 at 9:20 AM Riza Dindir wrote: > > > > Thanks, I will copy both files to "src/sys/dev/microcode/radeon/" on > > my system. Although "kaveri_mec.bin". > > > > Regards > > Riza > > > > On Sun, Nov 21, 2021 at 12:29 AM matthew green wrote: > > > > > > Riza Dindir writes: > > > > Hello > > > > > > > > I am using NetBSD 9.2 (amd64). Am trying to make the radeon driver work. > > > > > > > > In the file "sys/external/bsd/drm2/dist/drm/radeon/radeon_cik.c", > > > > there is a reference to a kaveri_mec2.bin file. But this file is not > > > > present in the "src/sys/dev/microcode/radeon/" directory. Is it > > > > possible to comment out the reference to kaveri_mec2.bin? > > > > > > copy this out of the upstream "linux-firmware" package: > > > > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/ > > > > > > we're planning on updating these files for netbsd-10, but for > > > now this is the right process. > > > > > > > > > .mrg.
Re: kaveri_mec2.bin file missing
Riza Dindir wrote: >I have put the two files listed above (by RVP) to the >"src/sys/dev/microcode/radeon/" directory. I also changed the >configuration to only include the radeon device that is the >0x1002/0x1309 Kaveri device. Did add the KAVERI_mec2.bin to the >MODULE_FIRMWARE definitions in the radeon_cik.c file (since this was >missing). But this failed to load the microcode. It does fail in the >function "cik_init_microcode". > >I have put these bin files into "src/sys/dev/microcode/radeon/". Isn't >this the correct path to put these bin files in? It is the correct source directory for Radeon microcode files, unless you have added something to the Makefile they won't get copied to the destination directory which is /libdata/firmware/radeon. You could just copy files from the linux-firmware tree to /libdata/firmware/radeon to test things. >Are the file names in this directory case-sensitive? Although in the >"src/sys/dev/microcode/radeon/" directory all the bin files begin with >capital letters (KAVERI_mec.bin for instance). The filenames are case sensitive, you can see that the files are not the same. % diff -b KAVERI_me.bin kaveri_me.bin Binary files KAVERI_me.bin and kaveri_me.bin differ I would expect to use either the KAVERI* or the kaveri* files as a set.
Re: kaveri_mec2.bin file missing
Hello, Here is what I try to accomplish. I could not find the bios for the 0x1002/0x6604 device. So I thought that I could just disable this device, and use the Kaveri device (0x1002/0x1309), since I have that bios. I have put the two files listed above (by RVP) to the "src/sys/dev/microcode/radeon/" directory. I also changed the configuration to only include the radeon device that is the 0x1002/0x1309 Kaveri device. Did add the KAVERI_mec2.bin to the MODULE_FIRMWARE definitions in the radeon_cik.c file (since this was missing). But this failed to load the microcode. It does fail in the function "cik_init_microcode". I have put these bin files into "src/sys/dev/microcode/radeon/". Isn't this the correct path to put these bin files in? Are the file names in this directory case-sensitive? Although in the "src/sys/dev/microcode/radeon/" directory all the bin files begin with capital letters (KAVERI_mec.bin for instance). Also in the file radeon_cik.c there are MODULE_FIRMWARE declarations/definitions that have both KAVERI_*.bin files and kaveri_*.bin files. And the KAVERI_mec2.bin file was missing in that list, in which all the files start with KAVERI (with capital letters). Should this entry not be there? Although I tried it both ways. Adding KAVERI_mec2.bin in the MODULE_FIRMWARE definitions. And tried it also by removing that entry. It did not change anything. I might have not put these files in the correct directory maybe. Am I missing something? On Sun, Nov 21, 2021 at 9:20 AM Riza Dindir wrote: > > Thanks, I will copy both files to "src/sys/dev/microcode/radeon/" on > my system. Although "kaveri_mec.bin". > > Regards > Riza > > On Sun, Nov 21, 2021 at 12:29 AM matthew green wrote: > > > > Riza Dindir writes: > > > Hello > > > > > > I am using NetBSD 9.2 (amd64). Am trying to make the radeon driver work. > > > > > > In the file "sys/external/bsd/drm2/dist/drm/radeon/radeon_cik.c", > > > there is a reference to a kaveri_mec2.bin file. But this file is not > > > present in the "src/sys/dev/microcode/radeon/" directory. Is it > > > possible to comment out the reference to kaveri_mec2.bin? > > > > copy this out of the upstream "linux-firmware" package: > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/ > > > > we're planning on updating these files for netbsd-10, but for > > now this is the right process. > > > > > > .mrg.
Re: kaveri_mec2.bin file missing
Thanks, I will copy both files to "src/sys/dev/microcode/radeon/" on my system. Although "kaveri_mec.bin". Regards Riza On Sun, Nov 21, 2021 at 12:29 AM matthew green wrote: > > Riza Dindir writes: > > Hello > > > > I am using NetBSD 9.2 (amd64). Am trying to make the radeon driver work. > > > > In the file "sys/external/bsd/drm2/dist/drm/radeon/radeon_cik.c", > > there is a reference to a kaveri_mec2.bin file. But this file is not > > present in the "src/sys/dev/microcode/radeon/" directory. Is it > > possible to comment out the reference to kaveri_mec2.bin? > > copy this out of the upstream "linux-firmware" package: > > > https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/ > > we're planning on updating these files for netbsd-10, but for > now this is the right process. > > > .mrg.
re: kaveri_mec2.bin file missing
Riza Dindir writes: > Hello > > I am using NetBSD 9.2 (amd64). Am trying to make the radeon driver work. > > In the file "sys/external/bsd/drm2/dist/drm/radeon/radeon_cik.c", > there is a reference to a kaveri_mec2.bin file. But this file is not > present in the "src/sys/dev/microcode/radeon/" directory. Is it > possible to comment out the reference to kaveri_mec2.bin? copy this out of the upstream "linux-firmware" package: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/ we're planning on updating these files for netbsd-10, but for now this is the right process. .mrg.
Re: kaveri_mec2.bin file missing
On Sat, 20 Nov 2021, Riza Dindir wrote: In the file "sys/external/bsd/drm2/dist/drm/radeon/radeon_cik.c", there is a reference to a kaveri_mec2.bin file. But this file is not present in the "src/sys/dev/microcode/radeon/" directory. Is it possible to comment out the reference to kaveri_mec2.bin? You could copy that file over from a Linux distro. On Ubuntu 19.04: $ ls -l /lib/firmware/radeon/kaveri_mec* -rw-r--r-- 1 rvp rvp 17024 12 Jul 2019 /media/lib/firmware/radeon/kaveri_mec.bin -rw-r--r-- 1 rvp rvp 17024 12 Jul 2019 /media/lib/firmware/radeon/kaveri_mec2.bin $ -RVP