summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWiwit Rifa'i <wiwitrifai@google.com>2023-03-21 21:51:29 +0800
committerWiwit Rifa'i <wiwitrifai@google.com>2023-04-10 13:56:40 +0800
commita84a8c5bc06e5bc93ffae2d1fb520c9d550e68ee (patch)
tree2a3e730ab79be120de14f3548a2ea627c78ec640
parentbe0d3d7fc36085be615de0a476c092871e1f8043 (diff)
downloadzuma-a84a8c5bc06e5bc93ffae2d1fb520c9d550e68ee.tar.gz
libhwc2.1: move & update ppc_table_map
Move G2D ppc_table_map under soc namespace so that we can modify the table for specific soc. And, update ppc_table_map according to the latest measurement for zuma. Bug: 263454363 Test: play some videos that needs G2D Test: simulate various scenarios with hwc-tester Change-Id: I0ccdfff532568001cab94b6357a874cc534ba25b
-rw-r--r--libhwc2.1/ExynosResourceRestriction.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/libhwc2.1/ExynosResourceRestriction.h b/libhwc2.1/ExynosResourceRestriction.h
index 5e99b2d..198963c 100644
--- a/libhwc2.1/ExynosResourceRestriction.h
+++ b/libhwc2.1/ExynosResourceRestriction.h
@@ -92,6 +92,32 @@ static const restriction_key_t restriction_format_table[] = {
{MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_GOOGLE_NV12_SP_10B, 0},
};
+
+static ppc_table ppc_table_map = {
+ /* G2D support only 2 plane YUV, so all YUV format should use YUV2P PPC table */
+ /* In case of Scale-Up, G2D should use same PPC table */
+ {PPC_IDX(MPP_G2D,PPC_FORMAT_YUV420,PPC_ROT_NO), {2.2, 2.4, 4.3, 5.0, 4.5, 3.4, 3.4}},
+ {PPC_IDX(MPP_G2D,PPC_FORMAT_YUV420,PPC_ROT), {2.2, 3.6, 4.2, 4.3, 3.6, 2.0, 2.0}},
+
+ {PPC_IDX(MPP_G2D,PPC_FORMAT_YUV422,PPC_ROT_NO), {2.2, 2.4, 4.3, 5.0, 4.5, 3.4, 3.4}},
+ {PPC_IDX(MPP_G2D,PPC_FORMAT_Y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