You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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)
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 ofmain.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.
The text was updated successfully, but these errors were encountered: