gma pipe_setup: Enable key color feffff for cursor plane
Somehow the alpha blending is not accurate. On a screen with good
color resolution, fully transparent pixels of the cursor are slightly
visible. Hence, enable source keying for the cursor plane.
Change-Id: I1815a1e70b60d4bd74c581eed873ef5a2a32353d
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.sourcearcade.org/c/libgfxinit/+/547
Reviewed-by: Thomas Heijligen <src@posteo.de>
Tested-by: Ada SPARK <gnatbot@sourcearcade.org>
diff --git a/common/hw-gfx-gma-registers.ads b/common/hw-gfx-gma-registers.ads
index 025c5b5..02e7520 100644
--- a/common/hw-gfx-gma-registers.ads
+++ b/common/hw-gfx-gma-registers.ads
@@ -583,6 +583,8 @@
DSPASTRIDE,
PLANE_POS_1_A,
PLANE_SIZE_1_A,
+ PLANE_KEYVAL_1_A,
+ PLANE_KEYMSK_1_A,
DSPASURF,
DSPATILEOFF,
PLANE_AUX_DIST_1_A,
@@ -600,6 +602,8 @@
PLANE_STRIDE_2_A,
PLANE_POS_2_A,
PLANE_SIZE_2_A,
+ PLANE_KEYVAL_2_A,
+ PLANE_KEYMSK_2_A,
PLANE_SURF_2_A,
PLANE_OFFSET_2_A,
PLANE_COLOR_CTL_2_A,
@@ -641,6 +645,8 @@
DSPBSTRIDE,
PLANE_POS_1_B,
PLANE_SIZE_1_B,
+ PLANE_KEYVAL_1_B,
+ PLANE_KEYMSK_1_B,
DSPBSURF,
DSPBTILEOFF,
PLANE_AUX_DIST_1_B,
@@ -658,6 +664,8 @@
PLANE_STRIDE_2_B,
PLANE_POS_2_B,
PLANE_SIZE_2_B,
+ PLANE_KEYVAL_2_B,
+ PLANE_KEYMSK_2_B,
PLANE_SURF_2_B,
PLANE_OFFSET_2_B,
PLANE_COLOR_CTL_2_B,
@@ -696,6 +704,8 @@
DSPCSTRIDE,
PLANE_POS_1_C,
PLANE_SIZE_1_C,
+ PLANE_KEYVAL_1_C,
+ PLANE_KEYMSK_1_C,
DSPCSURF,
DSPCTILEOFF,
PLANE_AUX_DIST_1_C,
@@ -713,6 +723,8 @@
PLANE_STRIDE_2_C,
PLANE_POS_2_C,
PLANE_SIZE_2_C,
+ PLANE_KEYVAL_2_C,
+ PLANE_KEYMSK_2_C,
PLANE_SURF_2_C,
PLANE_OFFSET_2_C,
PLANE_COLOR_CTL_2_C,
@@ -1152,6 +1164,8 @@
DSPASTRIDE => 16#07_0188# / Register_Width,
PLANE_POS_1_A => 16#07_018c# / Register_Width,
PLANE_SIZE_1_A => 16#07_0190# / Register_Width,
+ PLANE_KEYVAL_1_A => 16#07_0194# / Register_Width,
+ PLANE_KEYMSK_1_A => 16#07_0198# / Register_Width,
DSPASURF => 16#07_019c# / Register_Width,
DSPATILEOFF => 16#07_01a4# / Register_Width,
@@ -1160,6 +1174,8 @@
PLANE_STRIDE_2_A => 16#07_0288# / Register_Width,
PLANE_POS_2_A => 16#07_028c# / Register_Width,
PLANE_SIZE_2_A => 16#07_0290# / Register_Width,
+ PLANE_KEYVAL_2_A => 16#07_0294# / Register_Width,
+ PLANE_KEYMSK_2_A => 16#07_0298# / Register_Width,
PLANE_SURF_2_A => 16#07_029c# / Register_Width,
PLANE_OFFSET_2_A => 16#07_02a4# / Register_Width,
@@ -1280,6 +1296,8 @@
DSPBSTRIDE => 16#07_1188# / Register_Width,
PLANE_POS_1_B => 16#07_118c# / Register_Width,
PLANE_SIZE_1_B => 16#07_1190# / Register_Width,
+ PLANE_KEYVAL_1_B => 16#07_1194# / Register_Width,
+ PLANE_KEYMSK_1_B => 16#07_1198# / Register_Width,
DSPBSURF => 16#07_119c# / Register_Width,
DSPBTILEOFF => 16#07_11a4# / Register_Width,
@@ -1289,6 +1307,8 @@
PLANE_POS_2_B => 16#07_128c# / Register_Width,
PLANE_SIZE_2_B => 16#07_1290# / Register_Width,
PLANE_SURF_2_B => 16#07_129c# / Register_Width,
+ PLANE_KEYVAL_2_B => 16#07_1294# / Register_Width,
+ PLANE_KEYMSK_2_B => 16#07_1298# / Register_Width,
PLANE_OFFSET_2_B => 16#07_12a4# / Register_Width,
-- FDI and PCH transcoder control
@@ -1388,6 +1408,8 @@
DSPCSTRIDE => 16#07_2188# / Register_Width,
PLANE_POS_1_C => 16#07_218c# / Register_Width,
PLANE_SIZE_1_C => 16#07_2190# / Register_Width,
+ PLANE_KEYVAL_1_C => 16#07_2194# / Register_Width,
+ PLANE_KEYMSK_1_C => 16#07_2198# / Register_Width,
DSPCSURF => 16#07_219c# / Register_Width,
DSPCTILEOFF => 16#07_21a4# / Register_Width,
@@ -1396,6 +1418,8 @@
PLANE_STRIDE_2_C => 16#07_2288# / Register_Width,
PLANE_POS_2_C => 16#07_228c# / Register_Width,
PLANE_SIZE_2_C => 16#07_2290# / Register_Width,
+ PLANE_KEYVAL_2_C => 16#07_2294# / Register_Width,
+ PLANE_KEYMSK_2_C => 16#07_2298# / Register_Width,
PLANE_SURF_2_C => 16#07_229c# / Register_Width,
PLANE_OFFSET_2_C => 16#07_22a4# / Register_Width,