Attached patch fixes the build of xf86-video-ati-legacy after the xorg-server 1.20.7 update.
I have not verified if it works runtime
It did compile but no joy sadly :(.
I left the complete log here:
[ 181.833] (II) Initializing extension DRI2
[ 181.834] (EE) RADEON(0): Failed to make prime FD for handle: 22
[ 181.834] (EE) RADEON(0): Failed to create textured screen.(II) RADEON(0): Setting screen physical size to 338 x 270