Is GOP faster than VBE? How fast?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
nifanfa
Member
Member
Posts: 104
Joined: Tue Aug 17, 2021 10:40 am
Libera.chat IRC: visitor
Location: CN
Contact:

Is GOP faster than VBE? How fast?

Post by nifanfa »

from the page
https://wiki.osdev.org/GOP
i've learned that GOP and VBE has same problem - read or write to video memory is slow. but a lot of people agree that GOP is faster than VBE.
but is it true? how fast it is between VBE and GOP?
User avatar
pvc
Member
Member
Posts: 201
Joined: Mon Jan 15, 2018 2:27 pm

Re: Is GOP faster than VBE? How fast?

Post by pvc »

I think that framebuffer access speed has nothing to do with being initialized by VBE, GOP or even dedicated driver. It has more to do with cache policy and write combining. These are controlled in the CPU itself using MTRRs and page tables. PCIe graphics cards are usually affected more since data has to go over PCIe, which usually has more latency than system RAM. In general, you want fewer but longer bursts of data transferred, to maximize performance.
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: Is GOP faster than VBE? How fast?

Post by Korona »

Exactly. Writing to video memory (or any PCI BAR) is slow in the sense that it has high latency - but the bandwidth of current iterations of PCIe should be more than enough (assuming that everything mentioned by pvc is set up correctly).
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
davmac314
Member
Member
Posts: 121
Joined: Mon Jul 05, 2021 6:57 pm

Re: Is GOP faster than VBE? How fast?

Post by davmac314 »

Korona wrote:Exactly. Writing to video memory (or any PCI BAR) is slow
This could be seen as a nit-pick, but you're not talking about writing to a PCI BAR. You mean writing to the address mapped via a PCI BAR. A BAR is a register that controls an address range, not the address range itself. BAR = Base Address Register.

(Writing to a BAR itself may well also be "slow", but you don't need to do it after setting up the framebuffer).
Post Reply