Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
knowning vesafb's bus, devfn address
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5365

PostPosted: Sat Feb 09, 2019 5:20 pm    Post subject: knowning vesafb's bus, devfn address Reply with quote

Greetings,

I need a way to get the fb0's bus, devfn at either kernel time or userspace time.
the system can have multiple gpus, the only driver is vesafb.
I cannot use sysfs as the bus, devfn isn't shown there.
I tried using a fixup hook but I cannot be sure which one is fb0
any ideas? can I be sure that the first gpu is always fb0?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
xdarma
l33t
l33t


Joined: 08 Dec 2003
Posts: 686
Location: tra veneto e friuli (italy)

PostPosted: Sat Feb 09, 2019 11:09 pm    Post subject: Reply with quote

Maybe there's one option on kernel configuration:
Code:

Bus Options (PCI etc.) ->
      [*] Mark VGA/VBE/EFI FB as generic system framebuffer

Symbol on config file is: CONFIG_X86_SYSFB

This is the result after boot:
Code:

# dmesg | grep fb0
[    2.125905] simple-framebuffer simple-framebuffer.0: fb0: simplefb registered!
[    6.404297] fbcon: amdgpudrmfb (fb0) is primary device
[    6.435855] amdgpu 0000:23:00.0: fb0: amdgpudrmfb frame buffer device

_________________
proud user of faKeDE-4.7.3
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5365

PostPosted: Sun Feb 10, 2019 9:58 am    Post subject: Reply with quote

unfortunaty that doesn't work, see:
Code:

ls -l /sys/class/graphics
lrwxrwxrwx    1 root     root             0 Feb 10 09:53 fb0 -> ../../devices/platform/simple-framebuffer.0/graphics/fb0
lrwxrwxrwx    1 root     root             0 Feb 10 09:55 fbcon -> ../../devices/virtual/graphics/fbcon

dmesg | grep fb0
<6>[    1.564758] simple-framebuffer simple-framebuffer.0: fb0: simplefb registered!


I had to keep vesafb set as without this there is no fb0, any other ideas?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sun Feb 10, 2019 11:08 am    Post subject: Reply with quote

DaggyStyle,

I would expect framebuffer devices to be enumerated in PCI bus order, as thats the order the GPUs will be discovered in.
It will get a bit messy if you have GPU drivers that don't provide a framebuffer, like nVidia set up for the binary blob driver.

For now, vesafb will work with any GPU less than 20 years old but it won't play nicely with some Xorf drivers.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5365

PostPosted: Sun Feb 10, 2019 11:30 am    Post subject: Reply with quote

Greetings Neddy,

NeddySeagoon wrote:
DaggyStyle,

I would expect framebuffer devices to be enumerated in PCI bus order, as thats the order the GPUs will be discovered in.

so the first gpu will always be the main one? e.g. the one connected to the screen?
NeddySeagoon wrote:
DaggyStyle,
It will get a bit messy if you have GPU drivers that don't provide a framebuffer, like nVidia set up for the binary blob driver.

that is a problem for another day, my main issue is to use vesafb and find the bus devfunc of the main vga e.g. the one connected to the screen.
NeddySeagoon wrote:
DaggyStyle,
For now, vesafb will work with any GPU less than 20 years old but it won't play nicely with some Xorf drivers.

in this specific scenario, xorg is not an issue, my setup uses only framebuffer
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum