Making the radeon driver work again

Denis 'GNUtoo' Carikli GNUtoo at no-log.org
Sun Apr 17 15:32:47 UTC 2016


Hi again,

On Sun, 19 Jul 2015 23:03:32 +0200
"Denis 'GNUtoo' Carikli" <GNUtoo at no-log.org> wrote:
> Now I'll try to find the time to:
> -> Work on a clean patch for linux-libre.
> -> Make the deblob script do the same modification than the clean
> patch.  

I've attached the a patch against deblob-4.5.
I wasn't sure which file to patch since there are different deblob
scripts, like the ones in the svn. I hope it's the correct file.

On Wed, 15 Jul 2015 22:06:38 -0300
Alexandre Oliva <lxoliva at fsfla.org> wrote:

> > Integration:
> > ------------
> > So if integrating a way to do that automatically in linux-libre is
> > desirable, how would I have to do it:
> > - Trough sed/awk scripts that would break easily between
> > releases ?  
> 
> This would probably be best.  Having to adjust changes between major
> releases is not unusual, and I'd prefer that over additional
> dependencies.
The deblob-4.5 didn't use awk, so not to add more dependencies, I used
grep.
Should I rewrite it using awk, to be less fragile?

Tests:
------
To test I've built parabola's linux-libre 4.5.1, replacing their radeon
patch by the one generated by the test.sh[1] script attached.

The machine then rebooted fine. The radeon driver and xf86-video-ati
worked fine (without 3D or XV acceleration).

The internal GPU of the Asus M4A785T-M mainboard was used to test:
> 01:05.0 VGA compatible controller [0300]: Advanced Micro Devices,
> Inc. [AMD/ATI] RS880 [Radeon HD 4200] [1002:9710]

This gpu is handled by the r600.c file that the patch touches.

I've not tried to support other GPUs because:
- Testing the patch on other GPU families would require access to such
  GPUs, and it's for me, either time consuming or not possible,
  depending on the family.
- Adapting such patch to another GPU is trivial.
  To do that one needs to find code that looks like that in the the .c
  file handling a given GPU family:
> 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;
>       }
> }
  Then if the number of lines to remove (7 here) matches "func_len" in
  radeon_skip_init_microcode_check, one just need to call
  radeon_skip_init_microcode_check with the right file, like it is done
  for r600.c

References:
-----------
[1] Patches integrity checks was disable while building.

Denis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: radeon-r600.patch
Type: text/x-patch
Size: 1167 bytes
Desc: not available
URL: <http://www.fsfla.org/pipermail/linux-libre/attachments/20160417/f2c2df16/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.sh
Type: application/x-shellscript
Size: 1190 bytes
Desc: not available
URL: <http://www.fsfla.org/pipermail/linux-libre/attachments/20160417/f2c2df16/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://www.fsfla.org/pipermail/linux-libre/attachments/20160417/f2c2df16/attachment.sig>


More information about the linux-libre mailing list