Group: Hardware/Components/GPUs/radeon
(Add GRUB Radeon support without any nonfree software) |
m (fix grammar) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
− | The Radeon | + | The Radeon Graphic Processing Units (GPU) have many freedom issues that are referenced on the table below. |
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 69: | Line 69: | ||
Here are some relatively small tasks that could help: | Here are some relatively small tasks that could help: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Help completing the table in the introduction section | * Help completing the table in the introduction section | ||
* Add support for a GPU you can test on. Reading the tutorials might give you an idea of how long it would take for you to do it, and how easy it is for you to do that. | * Add support for a GPU you can test on. Reading the tutorials might give you an idea of how long it would take for you to do it, and how easy it is for you to do that. | ||
** There is a [https://trisquel.info/en/forum/first-development-alpha-iso-images-trisquel-80-flidas#comment-106872 tutorial for Trisquel]. It needs updating so you it would also be nice if you could add an updated version to this wiki page as well while you do that. | ** There is a [https://trisquel.info/en/forum/first-development-alpha-iso-images-trisquel-80-flidas#comment-106872 tutorial for Trisquel]. It needs updating so you it would also be nice if you could add an updated version to this wiki page as well while you do that. | ||
** There is a tutorial for Parabola that will be added below shortly. | ** There is a tutorial for Parabola that will be added below shortly. | ||
− | * Migrate the information in [[Group:Hardware/ReverseEngineering#Desktops_and_laptops_GPUs|ReverseEngineering#Desktops_and_laptops_GPUs]] here and make | + | * Migrate the information in [[Group:Hardware/ReverseEngineering#Desktops_and_laptops_GPUs|ReverseEngineering#Desktops_and_laptops_GPUs]] here and make that section point to this article for Radeon GPUs |
== Status in linux-libre == | == Status in linux-libre == | ||
Line 134: | Line 124: | ||
} | } | ||
} | } | ||
− | | Patch not enabled | + | | Not working (Patch not enabled). |
|- | |- | ||
| r600 (KMS) | | r600 (KMS) | ||
Line 169: | Line 159: | ||
/r = r600_init_microcode(rdev);/,/}/ s,return r;,/*(DEBLOBBED)*/, | /r = r600_init_microcode(rdev);/,/}/ s,return r;,/*(DEBLOBBED)*/, | ||
' drivers/gpu/drm/radeon/evergreen.c 'enable blobless activation' | ' drivers/gpu/drm/radeon/evergreen.c 'enable blobless activation' | ||
+ | |- | ||
+ | | | ||
+ | | evergreen.c | ||
+ | | | ||
+ | | | ||
+ | if (ASIC_IS_DCE5(rdev)) { | ||
+ | [...] | ||
+ | r = ni_init_microcode(rdev); | ||
+ | if (r) { | ||
+ | DRM_ERROR("Failed to load firmware!\n"); | ||
+ | return r; | ||
+ | } | ||
+ | } [...] | ||
+ | | Not working (Patch not enabled). | ||
|- | |- | ||
| rv770 | | rv770 | ||
Line 231: | Line 235: | ||
| Working: | | Working: | ||
[https://www.fsfla.org/pipermail/linux-libre/2019-December/003359.html The patch] has been [https://www.fsfla.org/pipermail/linux-libre/2019-December/003361.html merged] in linux-libre: | [https://www.fsfla.org/pipermail/linux-libre/2019-December/003359.html The patch] has been [https://www.fsfla.org/pipermail/linux-libre/2019-December/003361.html merged] in linux-libre: | ||
+ | |- | ||
+ | | ? | ||
+ | | cik.c | ||
+ | | ? | ||
+ | | | ||
+ | if (rdev->flags & RADEON_IS_IGP) { | ||
+ | [...] | ||
+ | r = cik_init_microcode(rdev); | ||
+ | if (r) { | ||
+ | DRM_ERROR("Failed to load firmware!\n"); | ||
+ | return r; | ||
+ | } | ||
+ | } else { | ||
+ | [...] | ||
+ | r = cik_init_microcode(rdev); | ||
+ | if (r) { | ||
+ | DRM_ERROR("Failed to load firmware!\n"); | ||
+ | return r; | ||
+ | } | ||
+ | } | ||
+ | | Not working (Patch not enabled). | ||
|- | |- | ||
|} | |} | ||
Line 281: | Line 306: | ||
| The modeseting driver is probably as good as the xf86-video-ati driver when 3D acceleration is not available | | The modeseting driver is probably as good as the xf86-video-ati driver when 3D acceleration is not available | ||
|} | |} | ||
+ | |||
+ | == See also == | ||
+ | * [[Group:Hardware/Strategies/ReverseEngineering#Desktops_and_laptops_GPUs]]: Also has some information on what work is needed to make some GPU work. | ||
== External links == | == External links == |
Latest revision as of 19:01, 11 April 2024
Contents
Introduction
The Radeon Graphic Processing Units (GPU) have many freedom issues that are referenced on the table below.
Nonfree software | Effects without the nonfree software or workarounds | Workaround | Workaround consequences | Fix | Existing projects that could be leveraged to fix the problem |
---|---|---|---|---|---|
Radeon firmwares/microcodes |
The Radeon driver doesn't load and Linux falls back on another driver like VESA or efifb:
|
Patch the radeon driver in linux-libre to enable it to load and work without the nonfree firwares |
The radeon driver loads:
|
Write free replacement for the firmwares |
|
AtomBIOS bytecode: This bytecode is part of the Video BIOS and is parsed and executed by the Linux driver |
|
? | Replace the nonfree bytecode by a free one. |
|
|
The Video BIOS | Use Libreboot or Coreboot with SeaBIOS, put the Video BIOS in memory but don't execute it | The display is initialized very late, when the Radeon driver loads, if the AtomBIOS tables are in the right memory area. | Implement a free Video BIOS replacement either as standalone replacement or in Coreboot and Libreboot. |
|
Hardware documentation
Firmware name | Hardware name | Function | Replacement strategies |
---|---|---|---|
? | CP: Command processor | Probably fetch and decode the GPU commands like a CPU does for the commands. |
How to help
Documenting all the freedom issues in depth and adding support for all the GPUs in linux-libre is a lot of work for one person.
Hopefully it can be broken in many small tasks, so it's easy to help by making a tiny part of the work.
Here are some relatively small tasks that could help:
- Help completing the table in the introduction section
- Add support for a GPU you can test on. Reading the tutorials might give you an idea of how long it would take for you to do it, and how easy it is for you to do that.
- There is a tutorial for Trisquel. It needs updating so you it would also be nice if you could add an updated version to this wiki page as well while you do that.
- There is a tutorial for Parabola that will be added below shortly.
- Migrate the information in ReverseEngineering#Desktops_and_laptops_GPUs here and make that section point to this article for Radeon GPUs
Status in linux-libre
The radeon driver has code like that for many GPU families:
if (!rdev->me_fw) { r = r100_cp_init_microcode(rdev); if (r) { DRM_ERROR("Failed to load firmware!\n"); return r; } }
The result of that is that without the nonfree firmware, the radeon driver doesn't load.
Being able to use that driver, even if the 3D acceleration doesn't work without the nonfree firmware is very interesting:
- it can enable native resolution
- It supports multi-displays
If you have a radeon, ATI or AMD GPU from a family that isn't listed below and that works, please make sure that we get to know about it either by:
- Adding it below
- Sending a mail to the linux-libre mailing list and mentioning it
- Contacting people on IRC that would do any of the above
It's also important to do the same for if you also have a GPU from a family that isn't listed below that doesn't work.
So far we didn't have access yet to GPUs from all families, so we weren't able to make them all work.
If you can manage to send a patch to linux-libre yourself it's even better as:
- It enables you to learn many things along the way, including how to contribute to some free software projects if you don't already know how to do it.
- We can spend time on other free software projects as well
family | file | commit introducing the driver .remove() | code | linux-libre status |
---|---|---|---|---|
r100 | r100.c |
70967ab9c0c9 radeon: Use request_firmware() |
if (!rdev->me_fw) { r = r100_cp_init_microcode(rdev); if (r) { DRM_ERROR("Failed to load firmware!\n"); return r; } } |
Not working (Patch not enabled). |
r600 (KMS) | r600.c | Always there:
3ce0a23d2d25 drm/radeon/kms: add r600 KMS support |
if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { r = r600_init_microcode(rdev); if (r) { DRM_ERROR("Failed to load firmware!\n"); return r; } } |
Working:
clean_sed ' /r = r600_init_microcode(rdev);/,/}/ s,return r;,/*(DEBLOBBED)*/, ' drivers/gpu/drm/radeon/r600.c 'enable blobless activation' |
r600 (UMS) | r600_cp.c |
70967ab9c0c9 radeon: Use request_firmware() |
UMS support has been removed in:
8333f607a631 drm/radeon: remove UMS support |
|
Evergreen | evergreen.c | Working:
clean_sed ' /r = r600_init_microcode(rdev);/,/}/ s,return r;,/*(DEBLOBBED)*/, ' drivers/gpu/drm/radeon/evergreen.c 'enable blobless activation' |
||
evergreen.c |
if (ASIC_IS_DCE5(rdev)) { [...] r = ni_init_microcode(rdev); if (r) { DRM_ERROR("Failed to load firmware!\n"); return r; } } [...] |
Not working (Patch not enabled). | ||
rv770 | rv770.c | Working:
clean_sed ' /r = r600_init_microcode(rdev);/,/}/ s,return r;,/*(DEBLOBBED)*/, ' drivers/gpu/drm/radeon/rv770.c 'enable blobless activation' |
||
Northern Islands | ni.c | Maybe this commit or before (not clear):
0af62b016804 drm/radeon/kms: add ucode loader for NI |
if (rdev->flags & RADEON_IS_IGP) { if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { r = ni_init_microcode(rdev); if (r) { DRM_ERROR("Failed to load firmware!\n"); return r; } } } else { if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw || !rdev->mc_fw) { r = ni_init_microcode(rdev); if (r) { DRM_ERROR("Failed to load firmware!\n"); return r; } } } |
Working:
clean_sed ' /r = ni_init_microcode(rdev);/,/}/ s,return r;,/*(DEBLOBBED)*/, ' drivers/gpu/drm/radeon/ni.c 'enable blobless activation' |
Southern Islands | si.c |
9b136d514e35 drm/radeon/kms: fill in startup/shutdown callbacks for SI |
if (!rdev->me_fw || !rdev->pfp_fw || !rdev->ce_fw || !rdev->rlc_fw || !rdev->mc_fw) { r = si_init_microcode(rdev); if (r) { DRM_ERROR("Failed to load firmware!\n"); return r; } } And: /* Don't start up if the MC ucode is missing. * The default clocks and voltages before the MC ucode * is loaded are not suffient for advanced operations. */ if (!rdev->mc_fw) { DRM_ERROR("radeon: MC ucode required for NI+.\n"); return -EINVAL; } |
Working: |
? | cik.c | ? |
if (rdev->flags & RADEON_IS_IGP) { [...] r = cik_init_microcode(rdev); if (r) { DRM_ERROR("Failed to load firmware!\n"); return r; } } else { [...] r = cik_init_microcode(rdev); if (r) { DRM_ERROR("Failed to load firmware!\n"); return r; } } |
Not working (Patch not enabled). |
How to patch and test linux-libre in Parabola
See the tutorial in the radeon/How to patch and test linux-libre in Parabola page.
How to patch and test linux-libre in Trisquel
There is a tutorial for Trisquel however It needs updating. So if you use it, it would also be nice if you could add an updated version here while you try the tutorial.
As it might be required to give permission to do so, Here is the permission:
- As I (Denis 'GNUtoo' Carikli) wrote this tutorial, I agree to assign copyright for your contribution to the Free Software Foundation (Copyrights). I am also promising us that I wrote this myself.
Status in the Xorg radeon driver
family | distribution and version information | configuration files | status | comments |
---|---|---|---|---|
|
|
Stock Xorg configuration files:
/usr/share/X11/xorg.conf.d/10-radeon.conf: Section "OutputClass" Identifier "Radeon" MatchDriver "radeon" Driver "radeon" |
/usr/lib/Xorg: symbol lookup error: /usr/lib/xorg/modules/drivers/radeon_drv.so: undefined symbol: exaGetPixmapDriverPrivate |
This is probably specific to that GPU family: The hardware may lack a 2D acceleration engine and EXA might fail because of that. |
Modified Xorg configuration files:
/usr/share/X11/xorg.conf.d/10-radeon.conf: Section "OutputClass" Identifier "Radeon" MatchDriver "radeon" Driver "modesetting" Option "AccelMethod" "none" EndSection |
Xorg works | The modeseting driver is probably as good as the xf86-video-ati driver when 3D acceleration is not available |
See also
- Group:Hardware/Strategies/ReverseEngineering#Desktops_and_laptops_GPUs: Also has some information on what work is needed to make some GPU work.
External links
- Radeon Xorg driver: Has many information on the GPUs
- linux-libre website
- linux-libre mailing list archives