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

[question] Does this driver support multi-gpu setups? #14

Open
KayJay7 opened this issue Mar 12, 2024 · 3 comments
Open

[question] Does this driver support multi-gpu setups? #14

KayJay7 opened this issue Mar 12, 2024 · 3 comments

Comments

@KayJay7
Copy link

KayJay7 commented Mar 12, 2024

I'm trying to have the driver select a different uc_line depending on whether the gpu is vega or polaris, so we don't need to change hardcoded values on every machine. But it's my first time working on drivers, so I don't know how some things work, and without knowing it's kind of hard to read.

I was reading the find_pci_dev function, and it only look for one device, so I'm questioning if this driver even supports multiple gpus or it only works on the first one. Unfortunately I don't have two gpus to test.

Another question is: what is the purpose of the adapter variable on line 8 of main.c? Does it only "hold" the adapter and it's callbacks/methods (which are called from outside the driver) or is it ever accessed directly from the driver itself (except for destruction and initialization)? If it isn't accessed directly, could I just make it an array to add support for multiple devices? Are there any other "global" variables that I should make arrays?

My "plan" is to make a struct that holds both the adapter global variable, and an uc_line value that is selected during device detection, to allow for selection. And to make an array of those structures to support multiple gpus. Does this sound right?

Edit: I understand if you are not interested in the development of this driver, I just here for some directions.

@crashniels
Copy link

I don't think it works with multiple GPUs. And the line number is hardcoded since this was designed for Asus Polaris cards.

adapter should be the i2c bus that will be added.

I was planning on doing something similar. Like have a list of known GPUs and their line number so it can change it depending on the GPU. OR "fix" it in the amdgpu driver itself and not having to rely on this but that is quite complicated as discussed over at OpenRGB. And also I don't have an AMD GPU anymore.

@KayJay7
Copy link
Author

KayJay7 commented Mar 13, 2024

It is designed for Polaris, understandable. But some forks (e.g. the one on copr) pull every pci_id (both polaris and vega) but do not address the different line number. Which results in a driver that loads for both polaris and vega cards, but would not work for one of the two. (The one on copr only works for vega, see my comment on said fork)

@KayJay7
Copy link
Author

KayJay7 commented Mar 29, 2024

@crashniels check out this pull request on a fork downstream. If you are still interested you could test if it works for you. hartmark#10

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

No branches or pull requests

2 participants