cancel
Showing results for 
Search instead for 
Did you mean: 

PC Drivers & Software

nibal
Challenger

Latest amdgpu-install_22.20.50200 breaks compilation of kernel module amdgpu.ko + fix

Hi,

I have succesfully installed latest amdgpu in my Ubuntu 20.04 5.15.0-53 hwe kernel.

Recently, I needed to change a usb kernel parameter with dpkg-reconfigure, which caused amdgpu to recompile:

ProblemType: Package
DKMSBuildLog:
DKMS make.log for amdgpu-5.16.9.22.20-1438746~20.04 for kernel 5.15.0-53-generic (x86_64)
Sun 11 Dec 2022 05:44:15 AM EET
make: Entering directory '/usr/src/linux-headers-5.15.0-53-generic'

[...]

CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/amd/amdgpu/amdgpu_object.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/amd/amdgpu/amdgpu_gart.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/amd/amdgpu/amdgpu_encoders.o
LD [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/amd/amdkcl/amdkcl.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/amd/amdgpu/amdgpu_display.o
/var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/amd/amdgpu/amdgpu_ttm.c: In function ‘amdgpu_ssg_init’:
/var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/amd/amdgpu/amdgpu_ttm.c:2313:24: error: incompatible types when assigning to type ‘struct percpu_ref’ from type ‘struct percpu_ref *’
2313 | adev->ssg.pgmap.ref = &adev->ssg.ref;
| ^
make[2]: *** [scripts/Makefile.build:297: /var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/amd/amdgpu/amdgpu_ttm.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.build:560: /var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/amd/amdgpu] Error 2
make: *** [Makefile:1903: /var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.0-53-generic'
DKMSKernelVersion: 5.15.0-53-generic
Date: Sun Dec 11 05:44:29 2022
DuplicateSignature: dkms:amdgpu-dkms-firmware:1:5.16.9.22.20.50200-1438746~20.04:/var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/amd/amdgpu/amdgpu_ttm.c:2313:24: error: incompatible types when assigning to type ‘struct percpu_ref’ from type ‘struct percpu_ref *’
Package: amdgpu-dkms-firmware 1:5.16.9.22.20.50200-1438746~20.04
PackageVersion: 1:5.16.9.22.20.50200-1438746~20.04
SourcePackage: amdgpu-dkms
Title: amdgpu-dkms-firmware 1:5.16.9.22.20.50200-1438746~20.04: amdgpu kernel module failed to build

 

The fix is simple:

src/amd/amdgpu/amdgpu_ttm.c:2313

adev->ssg.pgmap.ref = &adev->ssg.ref; -> adev->ssg.pgmap.ref = adev->ssg.ref;

I dunno how it compiled during installation. Anyway, plz fix:)

TIA

Nikos

0 Likes
0 Replies