Page 1 of 1

Integrated Graphics Backwards Compatibility & Detection

Posted: Thu Sep 23, 2021 4:43 pm
by PavelChekov
Would the latest Intel integrated graphics be backwards compatible with older, Intel HD Graphics? Also, what is the most efficient way to detect CPU, in order to decide whether to initialize Intel or AMD integrated graphics? CPUID?

Thanks

Re: Integrated Graphics Backwards Compatibility & Detection

Posted: Thu Sep 23, 2021 5:13 pm
by Octocontrabass
PavelCheckov wrote:Would the latest Intel integrated graphics be backwards compatible with older, Intel HD Graphics?
I don't think they're backwards compatible at the register level, but they do have some similarities, so parts of the drivers can be the same between different generations. For example, take a look at the Linux i915 driver.
PavelCheckov wrote:Also, what is the most efficient way to detect CPU, in order to decide whether to initialize Intel or AMD integrated graphics? CPUID?
Enumerate PCI. The integrated graphics will appear as a PCI device.

Re: Integrated Graphics Backwards Compatibility & Detection

Posted: Fri Sep 24, 2021 5:12 pm
by PavelChekov
So, to support most modern computers, which version of integrated graphics should I write a driver for? I would use the framebuffer, but my understanding is that is not the ideal method.

Re: Integrated Graphics Backwards Compatibility & Detection

Posted: Fri Sep 24, 2021 6:07 pm
by h0bby1
Well if you want the most compatibility, i would say vesa is the most compatible.

There is no real hardware acceleration as standard, but you might still get some form of hardware blitting with it ( not sure how good is the support through bios interface though).

There are technics that can be workable to use bios interupt from protected mode.

Working directly on the hardware is going to be complicated and not very compatible.

Chipset become incredibly complex and varied.

For the 2d part you might have some chance to work it up with limited amount of drivers. From what i last looked in linux ddx drivers, it seems roughly compatible but still many switch for potential internal format / frequencies or other things.

Re: Integrated Graphics Backwards Compatibility & Detection

Posted: Fri Sep 24, 2021 6:36 pm
by Octocontrabass
PavelCheckov wrote:I would use the framebuffer, but my understanding is that is not the ideal method.
If you're only using a framebuffer, you don't need to write a driver. Your bootloader can ask the firmware (VBE or GOP) to set up a framebuffer.

Re: Integrated Graphics Backwards Compatibility & Detection

Posted: Sat Sep 25, 2021 1:13 am
by davmac314
PavelCheckov wrote:So, to support most modern computers, which version of integrated graphics should I write a driver for? I would use the framebuffer, but my understanding is that is not the ideal method.
I think you're getting way ahead of yourself. Start with the framebuffer provided by firmware/bootloader/whatever. That will be far easier than trying to write any specific driver, and is the most compatible option. Then get the rest of your OS working. Then, finally, you can worry about making the graphics more efficient.

If you try to go about writing a chip-specific graphics driver before you have anything much else, I can almost guarantee you'll get bogged down and never really get anywhere.

Re: Integrated Graphics Backwards Compatibility & Detection

Posted: Sat Sep 25, 2021 5:49 am
by h0bby1
I agree with the last post, unless your goal is really focused on accelerated graphics, its not neccesarily the first thing you should get into.

Already handle all the infrastructures to load/unload drivers ( you probably will have to do this a couple times x)
Some tools to debug/test/monitor etc

Eventually start working some basic rendering primitives, drawing pixels, lines, polygons, fonts, image blitting etc using the framebuffer with a good testing already for the basics.

Then Eventually you can start recoding that with real accelerated manually programmed graphic drivers.

Well thats my 2 cents anyway ;-)

Re: Integrated Graphics Backwards Compatibility & Detection

Posted: Sat Sep 25, 2021 8:58 am
by PavelChekov
Thanks, everyone!