Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Added support for multiple GPUs, and enabled support for both Polaris and Vega without editing hardcoded constants#10

Merged
KayJay7 merged 5 commits intohartmark:masterfrom
KayJay7:master
Oct 13, 2024
Merged

Added support for multiple GPUs, and enabled support for both Polaris and Vega without editing hardcoded constants#10
KayJay7 merged 5 commits intohartmark:masterfrom
KayJay7:master

Conversation

@KayJay7
Copy link
Copy Markdown
Collaborator

@KayJay7 KayJay7 commented Mar 29, 2024

This pull request makes the driver scan for up to a certain number (4, but it's configurable) of compatible devices, and creates an i2c_adapter for each one, stored on a fixed size array, allowing for controlling multiple GPUs.

On the side, the driver now saves the asic_type (e.g.: CHIP_POLARIS10) for each adapter, and the i2c transfer algorithm now runs a looks up for that type when transferring, in order to choose which line to use for each device (e.g.: 6 for Polaris), defaulting to 6 for unknown asics. With this now users don't need to edit the UC_LINE macro depending on their specific hardware.

One of the commit also adds a new pci_id to the list.

Due to lack of hardware, this has only been tested with a single Polaris GPU, but it should work with multiple GPUs, and also with Vega, without editing. At the very least, it still works for a single GPU and with editing it will surely work for any asic, so it is not a regression. Testing is welcome.

@KayJay7
Copy link
Copy Markdown
Collaborator Author

KayJay7 commented Mar 29, 2024

I have also added some troubleshooting help to the readme

@KayJay7
Copy link
Copy Markdown
Collaborator Author

KayJay7 commented Apr 6, 2024

This module stopped building with kernel 6.8, I'm trying to fix it, I'll do a separate pull request for that.

@KayJay7 KayJay7 mentioned this pull request Apr 6, 2024
@KayJay7
Copy link
Copy Markdown
Collaborator Author

KayJay7 commented Apr 30, 2024

Poke @hartmark

@hartmark
Copy link
Copy Markdown
Owner

hartmark commented May 1, 2024

I lost the notification so thanks for the poke. I'll try to look at this in the the coming days. We're having national holiday today so let's see if I have time tonight

@KayJay7
Copy link
Copy Markdown
Collaborator Author

KayJay7 commented May 1, 2024

No pressure, I figured you list the notification. If it doesn't compile look at the other pull request first

@hartmark
Copy link
Copy Markdown
Owner

hartmark commented May 1, 2024

I have resolved the conflict and it's compiling on my machine but I don't have any aura GPU anymore so I'm unable to properly test it.

@KayJay7
Copy link
Copy Markdown
Collaborator Author

KayJay7 commented May 1, 2024

I have only one, so all I can say is that it works on that. Do you know anybody who can test this?

@KayJay7
Copy link
Copy Markdown
Collaborator Author

KayJay7 commented May 1, 2024

We could try to contact someone from openRGB to test it

@hartmark
Copy link
Copy Markdown
Owner

hartmark commented May 1, 2024

I don't know anyone with multiple aura devices sadly, poking in openRGB sounds like a good idea.

I don't have any aura capable GPU any more so if you like I can make you a correlaborator on the repo so you can keep the ball rolling.

I'm not so experienced with kernel module development, I was just piecing stuff together to get Aura working on my Vega64 (which I now longer own)

I also have the aur package for arch linux to build this
https://aur.archlinux.org/packages/aura-gpu-dkms-git

What distro are you on?

@KayJay7
Copy link
Copy Markdown
Collaborator Author

KayJay7 commented May 1, 2024

Actually this was also my first time writing something for the kernel, I didn't even know what static did in C.

Fedora, I don't know how to package for AUR (or fedora either, I built it from source), so I can't help with that.
And I also am not using my aura GPU anymore, but I wanted to scratch the itch of this pull request.

But you can make me a collaborator for this repo, I will keep merging pull requests for a bit more. And hope that someone steps in.

@KayJay7
Copy link
Copy Markdown
Collaborator Author

KayJay7 commented May 1, 2024

Thanks, if I get no answers from openRGB, can I just merge this and call it a day?

Copy link
Copy Markdown
Owner

@hartmark hartmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK

@hartmark
Copy link
Copy Markdown
Owner

hartmark commented May 1, 2024

Yeah, I have added you as corroborator now and PRs to master needs to have atleast one approver so we get one extra set of eyes.

You can complete the PR when you're ready as I have already approved now.

@KayJay7
Copy link
Copy Markdown
Collaborator Author

KayJay7 commented Oct 13, 2024

Alright, I tried to get some people to test it, and failed.

I have decided to merge it anyway because:

  • The driver did not work to begin with, so it can't be worse
  • I want to see it merged because it's useful for me
  • We may get some feedback from the few users of this driver

We can always revert this later

@KayJay7 KayJay7 merged commit dfc38da into hartmark:master Oct 13, 2024
@hartmark
Copy link
Copy Markdown
Owner

👍 let's hope for no issues

@KayJay7
Copy link
Copy Markdown
Collaborator Author

KayJay7 commented Dec 20, 2024

@hartmark Hijacking this pull request because issues are not enabled on the repo but i have nothing to commit yet.

As posted on mastodon by OpenRGB's main developer, AMD is working on some patches to support the i2c interfaces on cards from Polaris and onward, and it works with OpenRGB. Effectively it replaces this driver.
It also comes at a great moment, because aura-gpu stopped compiling with 6.12 and I don't want to deal with that right now.

When it is merged I will open a pull request on the readme describing the situation, before archiving the repository, I don't think I have the permissions to set the repo as archived tho.

@hartmark
Copy link
Copy Markdown
Owner

Great news! Have a great holidays and keep up the good work

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants