| commit | 3f37cce66ef8b36932db08a1fb5e6486647da308 | [log] [tgz] |
|---|---|---|
| author | Arthur Heymans <arthur@aheymans.xyz> | Tue Mar 03 18:52:12 2026 +0100 |
| committer | Nico Huber <nico.h@gmx.de> | Sun Jun 28 09:24:08 2026 +0000 |
| tree | b14750a924f1384018f2b56854bb82a0803441a4 | |
| parent | 7e08e5d2803914af4e46280b558ec1307ead9031 [diff] |
gma g45: Add support for Intel GM965 (Crestline) Add GM965 as a new CPU type under the G45 generation. GM965 shares the GMCH display architecture with G45/GM45 (no PCH, same connector registers) but differs in PLL limits, VCO/CDClk tables, and register field encoding. Key differences from G45/GM45: - PLL limits: Uses i9xx limits (VCO 1.4-2.8 GHz) instead of g4x limits. Add I9XX_LVDS_Limits; refactor Calculate_Clock_Parameters to take Limits as a parameter, with a new Select_Limits function. - VCO: Uses Crestline (CL) VCO tables with different frequencies and divisors than GM45's Cantiga (CTG) tables. - CDClk: GCFGC register decoding uses bits 12:8 minus 1 (3 possible divisor selections), unlike GM45's single bit 12. - No native DisplayPort (SDVO B/C only). - No HD Audio (G4X_AUD_VID_DID reads as 0). - Has integrated LVDS transmitter (mobile platform). - PCI IDs: 0x2a02 (I965_GM), 0x2a12 (I965_GME). All implementation details cross-referenced against the Linux kernel i915 driver (intel_dpll.c, intel_cdclk.c, intel_display_device.c). Change-Id: I0d5d698cc1c2aa84778f0fc6c2752cb5ce4f1cb2 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.sourcearcade.org/c/libgfxinit/+/499 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: Nico Huber <nico.h@gmx.de>
libgfxinit is a graphics initialization (aka modesetting) library for embedded environments. It currently supports only Intel hardware, more specifically the Intel Core processor line.
It can query and set up most kinds of displays based on their EDID information. You can, however, also specify particular mode lines.
libgfxinit is written in SPARK, an Ada subset with formal verification aspects. Absence of runtime errors can be proved automatically with SPARK GPL 2016.
For compilation, the GNAT Ada compiler is required. Usual package names in Linux distributions are gcc-ada and gnat.
You'll need libhwbase and libgfxinit. Best is to clone the repositories into a common parent directory (this way libgfxinit will know where to find libhwbase).
$ mkdir gfxfun && cd gfxfun $ git clone https://review.coreboot.org/p/libhwbase.git $ git clone https://review.coreboot.org/p/libgfxinit.git
Both libraries are currently configured by hand-written config files. You can either write your own .config, link one of the shipped files in configs/, e.g.:
$ ln -s configs/linux libhwbase/.config
or overwrite the config filename by specifying cnf=<configfile> on the make command line.
By default most debug messages won't be compiled into the binary. To include them into the build, set DEBUG=1 on the command line or in your .config.
Let's install libhwbase. We'll need configs/linux to build regular Linux executables:
$ cd libhwbase $ make DEBUG=1 cnf=configs/linux install
By default this installs into a new subdirectory dest. You can however overwrite this decision by specifying DESTDIR=.
gfx_testlibgfxinit is configured and installed in the same manner as described above. You will have to select a configuration matching your hardware.
The makefile knows an additional target gfx_test to build a small Linux test application:
$ cd ../libgfxinit $ make DEBUG=1 cnf=configs/sandybridge gfx_test
The resulting binary is build/gfx_test.
gfx_test sets up its own framebuffer in the stolen memory. It backs any current framebuffer mapping and contents up first and restores it before exiting. This works somehow even while the i915 driver is running. A wrapper script gfxtest/gfx_test.sh is provided to help with the setup. It switches to a text console first and tries to unload the i915 driver. But ignores failures to do so (it won't work if you still have any application running that uses the gfx driver, e.g. an X server).
# gfxtest/gfx_test.sh
If you chose the right config above, you should be presented with a nice test image. But please be prepared that your console might be stuck in that state afterwards. You can try to run it with i915 deactivated then (e.g. when booting with nomodeset in the kernel command line or with i915 blacklisted) and loading it afterwards.