Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue]: Can't build amdgpu-dkms on recent kernels #3084

Closed
G-Guillard opened this issue May 4, 2024 · 4 comments
Closed

[Issue]: Can't build amdgpu-dkms on recent kernels #3084

G-Guillard opened this issue May 4, 2024 · 4 comments

Comments

@G-Guillard
Copy link

G-Guillard commented May 4, 2024

Problem Description

As mentioned in this comment, issue reported in #2939 isn't Ubuntu specific but kernel-related.

The main error, ‘MAX_ORDER’ undeclared here, is due to this change in the kernel source. It is easy to fix, just replace the few occurrences of MAX_ORDER + 1 into NR_PAGE_ORDERS and of MAX_ORDER into NR_PAGE_ORDERS - 1 in the following files :

/usr/src/amdgpu-6.7.0-1756574.22.04/ttm/ttm_pool.c
/usr/src/amdgpu-6.7.0-1756574.22.04/ttm/tests/ttm_pool_test.c
/usr/src/amdgpu-6.7.0-1756574.22.04/ttm/tests/ttm_device_test.c
/usr/src/amdgpu-6.7.0-1756574.22.04/include/drm/ttm/ttm_pool.h

However the build also fails on two other issues.

The first one, error: ‘I2C_CLASS_DDC’ undeclared (first use in this function); did you mean ‘I2C_CLASS_SPD’? is related to this change in the kernel source and can be fixed by adding #define I2C_CLASS_DDC (1<<3) /* DDC bus on graphics adapters */ to amd/display/amdgpu_dm/amdgpu_dm.h and amd/amdgpu/amdgpu_i2c.h.

The last one, too few arguments to function ‘drm_exec_init’, can simply be fixed by adding a 0 argument to calls to this function (e.g. drm_exec_init(&exec, DRM_EXEC_IGNORE_DUPLICATES); -> drm_exec_init(&exec, DRM_EXEC_IGNORE_DUPLICATES, 0);).

I don't know how to check if the module works as expected after that, but at least it builds.

As I'm a complete kernel noob, I'm not sure whether there may be side effects by this modifications. The first one should be pretty safe as I understand it. The commit comment of the I2C one is not very reassuring. I think the last one should also be safe.

Operating System

GNU/Linux

NB : GPU randomly selected as mine is not in the list (Lucienne). Same for ROCm, 6.7 is not in the list.

@radudiaconu0
Copy link

dkms is only avilable on kernel 6.5 maximum

@ppanchad-amd
Copy link

@G-Guillard Internal ticket has been created to investigate this issue. Thanks!

@nairboon
Copy link

dkms is only avilable on kernel 6.5 maximum

The latest release 6.1.1 seems to compile on kernel 6.8

@ppanchad-amd
Copy link

@nairboon Thank you for verifying with the latest build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants