gma: Add cursor infrastructure
Allow ARGB cursors of 64x64, 128x128 or 256x256 pixels. Valid positions
depend a lot on the hardware generation, so we'll accept arbitrary
integer values in the interface and filter them internally. An out of
bounds cursor will simply be invisible.
It's unclear if the parameters also apply to other GFX hardware. Thus,
we keep the types in the GMA sub-package for now.
Change-Id: I1a380037ac91ba2beeb33c27a6882eb5caa126f9
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/23185
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index 8ece078..f4bd214 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -386,6 +386,7 @@
(others => Pipe_Config'
(Port => Disabled,
Framebuffer => HW.GFX.Default_FB,
+ Cursor => Default_Cursor,
Mode => HW.GFX.Invalid_Mode));
PLLs.Initialize;
@@ -476,10 +477,12 @@
(Primary =>
(Port => Analog,
Framebuffer => HW.GFX.Default_FB,
+ Cursor => Default_Cursor,
Mode => HW.GFX.Invalid_Mode),
others =>
(Port => Disabled,
Framebuffer => HW.GFX.Default_FB,
+ Cursor => Default_Cursor,
Mode => HW.GFX.Invalid_Mode));
begin
Power_And_Clocks.Power_Up (Cur_Configs, Fake_Config);