}
};
+#define HMT_NITS_COUNT 30
+
+static const int hmt_nits[HMT_NITS_COUNT] = {
+ 20, 21, 22, 23, 25, 27, 29, 31, 33, 35,
+ 37, 39, 41, 44, 47, 50, 53, 56, 60, 64,
+ 68, 72, 77, 82, 87, 93, 99, 105, 150, 360
+};
+
+static const int hmt_brightness_base[][HMT_NITS_COUNT] = {
+ {
+ 98, 101, 105, 108, 117, 126, 134, 141, 151, 157,
+ 166, 173, 181, 192, 206, 215, 228, 239, 252, 268,
+ 284, 297, 224, 237, 252, 265, 281, 295, 550, 360
+ }, {
+ 92, 94, 99, 104, 107, 113, 122, 133, 138, 145,
+ 154, 160, 163, 173, 184, 193, 206, 215, 223, 237,
+ 247, 262, 206, 217, 229, 248, 256, 265, 550, 360
+ }
+};
+
+static const int hmt_gradation[][HMT_NITS_COUNT][DAID_GCP_COUNT] = {
+ {
+ {0, 9, 8, 8, 7, 6, 6, 3, 3, 0},
+ {0, 9, 8, 7, 6, 5, 6, 4, 3, 0},
+ {0, 13, 8, 7, 7, 6, 6, 5, 4, 0},
+ {0, 11, 8, 7, 7, 6, 6, 6, 4, 0},
+ {0, 14, 8, 7, 7, 6, 8, 6, 5, 0},
+ {0, 10, 9, 7, 7, 6, 8, 6, 3, 0},
+ {0, 12, 8, 8, 7, 6, 8, 6, 4, 0},
+ {0, 19, 8, 7, 7, 6, 8, 7, 4, 0},
+ {0, 8, 9, 8, 7, 6, 8, 7, 3, 0},
+ {0, 19, 8, 7, 7, 7, 8, 7, 3, 0},
+ {0, 9, 9, 7, 7, 7, 8, 8, 2, 0},
+ {0, 10, 9, 8, 7, 7, 9, 7, 3, 0},
+ {0, 12, 8, 7, 7, 7, 9, 8, 3, 0},
+ {0, 12, 8, 7, 6, 7, 9, 7, 3, 0},
+ {0, 7, 9, 8, 8, 8, 9, 8, 4, 0},
+ {0, 9, 9, 8, 8, 8, 9, 10, 5, 0},
+ {0, 12, 8, 8, 8, 8, 10, 9, 4, 0},
+ {0, 13, 8, 8, 8, 9, 10, 10, 6, 0},
+ {0, 13, 8, 7, 8, 8, 9, 8, 3, 0},
+ {0, 8, 9, 8, 8, 10, 10, 9, 6, 0},
+ {0, 11, 8, 8, 8, 10, 10, 9, 5, 0},
+ {0, 11, 8, 8, 8, 11, 11, 9, 6, 0},
+ {0, 8, 5, 5, 5, 6, 8, 8, 4, 0},
+ {0, 8, 5, 5, 6, 6, 8, 8, 3, 0},
+ {0, 9, 5, 5, 6, 7, 9, 8, 5, 0},
+ {0, 6, 6, 6, 6, 8, 9, 9, 4, 0},
+ {0, 7, 5, 6, 6, 8, 9, 8, 5, 0},
+ {0, 7, 5, 6, 6, 8, 10, 7, 5, 0},
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ }, {
+ {0, 11, 9, 7, 6, 6, 5, 3, 4, 0},
+ {0, 15, 9, 7, 7, 5, 6, 3, 6, 0},
+ {0, 16, 8, 8, 7, 6, 5, 3, 4, 0},
+ {0, 15, 8, 7, 6, 5, 6, 4, 4, 0},
+ {0, 13, 8, 7, 7, 7, 8, 7, 6, 0},
+ {0, 9, 9, 7, 7, 7, 8, 9, 6, 0},
+ {0, 9, 9, 7, 7, 7, 7, 9, 7, 0},
+ {0, 17, 9, 7, 7, 7, 7, 9, 5, 0},
+ {0, 16, 8, 7, 7, 7, 8, 9, 4, 0},
+ {0, 15, 8, 7, 7, 7, 8, 9, 5, 0},
+ {0, 16, 8, 6, 7, 7, 8, 7, 3, 0},
+ {0, 12, 9, 7, 8, 8, 9, 11, 5, 0},
+ {0, 10, 9, 7, 7, 8, 10, 9, 5, 0},
+ {0, 17, 9, 8, 8, 8, 10, 11, 7, 0},
+ {0, 16, 8, 7, 8, 8, 9, 10, 6, 0},
+ {0, 8, 9, 8, 7, 8, 10, 12, 6, 0},
+ {0, 10, 9, 8, 8, 8, 10, 10, 5, 0},
+ {0, 10, 9, 8, 8, 8, 9, 11, 7, 0},
+ {0, 12, 9, 7, 9, 8, 10, 11, 4, 0},
+ {0, 15, 8, 8, 9, 9, 10, 12, 6, 0},
+ {0, 8, 9, 9, 9, 9, 11, 13, 9, 0},
+ {0, 10, 9, 8, 9, 10, 12, 14, 6, 0},
+ {0, 5, 6, 5, 6, 7, 9, 10, 8, 0},
+ {0, 6, 6, 6, 6, 6, 8, 10, 5, 0},
+ {0, 7, 5, 5, 6, 7, 8, 10, 7, 0},
+ {0, 9, 5, 6, 6, 6, 8, 9, 5, 0},
+ {0, 6, 6, 6, 8, 8, 11, 12, 9, 0},
+ {0, 8, 6, 6, 7, 8, 10, 11, 5, 0},
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ }
+};
+
+static const daid_rgb hmt_color_ofs[][HMT_NITS_COUNT][DAID_GCP_COUNT] = {
+ {
+ {{0, 0, 0}, {0, 0, 0}, {-13, 5, -10}, {-7, 0, -3}, {-2, 0, 0}, {-1, -1, 3}, {1, 0, 0}, {0, 0, 1}, {0, 0, 0}, {13, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-12, 4, -9}, {-6, 0, -3}, {-2, 0, 0}, {-1, 0, 2}, {1, 0, 2}, {0, 0, 0}, {1, 0, 1}, {13, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-19, 5, -11}, {-9, 0, -4}, {-2, 0, 0}, {0, -1, 2}, {0, 0, 0}, {1, 0, 2}, {0, 0, 0}, {12, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-15, 5, -10}, {-7, 0, -3}, {-2, 0, 0}, {0, 0, 2}, {1, 0, 2}, {0, 0, 1}, {1, 0, 1}, {13, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-18, 5, -12}, {-6, 0, -2}, {-3, 0, 0}, {0, -1, 2}, {1, 0, 1}, {0, 0, 0}, {0, 0, 1}, {12, -3, 15}},
+ {{0, 0, 0}, {0, 0, 0}, {-12, 4, -9}, {-8, 0, -2}, {-2, 0, 0}, {0, -1, 2}, {0, 0, 1}, {0, 0, 0}, {0, 0, 1}, {13, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-15, 4, -10}, {-7, 0, -1}, {0, 0, 1}, {0, 0, 1}, {1, 0, 2}, {1, 0, 1}, {0, 0, 0}, {13, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-15, 4, -10}, {-7, 0, -1}, {-2, 0, 0}, {0, -1, 2}, {1, 0, 1}, {0, 0, 0}, {0, 0, 0}, {14, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-12, 3, -8}, {-6, 0, -1}, {-2, 0, 0}, {0, -1, 2}, {1, 0, 1}, {0, 0, 0}, {0, 0, 1}, {14, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-14, 4, -10}, {-7, 0, -2}, {0, 0, 2}, {0, -1, 2}, {2, 0, 2}, {0, 0, 1}, {0, 0, 0}, {14, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-11, 4, -8}, {-6, 0, -1}, {-2, 0, 1}, {0, -1, 2}, {2, 0, 2}, {0, 0, 0}, {0, 0, 1}, {13, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-12, 3, -8}, {-5, 0, 0}, {0, 0, 2}, {1, 0, 2}, {0, 0, 1}, {0, 0, 0}, {1, 0, 1}, {13, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-12, 3, -8}, {-4, 0, -1}, {-1, 0, 2}, {1, -1, 2}, {1, 0, 2}, {1, 0, 0}, {0, 0, 1}, {14, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-12, 3, -8}, {-4, -1, -1}, {-1, -1, 2}, {1, 0, 2}, {2, 0, 2}, {0, 0, 0}, {1, 0, 1}, {14, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-10, 3, -6}, {-2, 0, 0}, {-1, 0, 2}, {0, 0, 1}, {0, 0, 2}, {0, 0, 0}, {1, 0, 1}, {14, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-10, 3, -6}, {-3, -1, 0}, {0, -1, 2}, {0, -1, 2}, {1, 0, 1}, {1, 0, 1}, {0, 0, 0}, {13, -4, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-12, 3, -6}, {-3, -1, 0}, {-1, -1, 2}, {1, 0, 1}, {1, 0, 1}, {0, 0, 1}, {0, 0, 0}, {13, -4, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-12, 2, -6}, {-2, 0, 0}, {-1, 0, 2}, {1, 0, 2}, {2, 0, 2}, {1, 0, 1}, {0, 0, 0}, {12, -4, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-12, 3, -6}, {-4, 0, -1}, {0, 0, 2}, {1, -1, 2}, {1, 0, 2}, {1, 0, 0}, {1, 0, 1}, {13, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-10, 2, -5}, {-2, -1, 0}, {0, -1, 3}, {1, 0, 2}, {2, 0, 1}, {0, 0, 1}, {0, 0, 0}, {13, -4, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-10, 2, -5}, {-1, -1, 0}, {0, -1, 3}, {1, 0, 1}, {1, 0, 2}, {1, 0, 1}, {0, 0, 0}, {13, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-9, 2, -5}, {-2, 0, 0}, {0, 0, 2}, {2, 0, 2}, {2, 0, 1}, {0, 0, 1}, {1, 0, 0}, {13, -4, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-7, 2, -6}, {0, -1, 0}, {0, -1, 2}, {1, -1, 2}, {1, -1, 2}, {0, 0, 1}, {1, 0, 1}, {14, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-6, 2, -6}, {-1, -1, 0}, {1, -1, 4}, {1, 0, 1}, {1, -1, 2}, {1, 0, 1}, {1, 0, 1}, {13, -3, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-6, 2, -6}, {0, -1, 1}, {0, -1, 2}, {2, 0, 2}, {2, 0, 2}, {0, 0, 1}, {1, 0, 1}, {13, -4, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-5, 2, -5}, {0, -1, 1}, {1, -1, 3}, {2, 0, 2}, {1, 0, 2}, {0, 0, 1}, {0, 0, 0}, {13, -4, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-5, 2, -4}, {0, -1, 1}, {1, -1, 3}, {2, 0, 2}, {0, 0, 2}, {1, 0, 1}, {1, 0, 1}, {13, -4, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {-4, 2, -4}, {0, -1, 1}, {0, -1, 3}, {2, 0, 2}, {2, 0, 2}, {0, 0, 1}, {1, 0, 1}, {13, -4, 16}},
+ {{0, 0, 0}, {0, 0, 0}, {13, 17, 10}, {5, 3, 6}, {0, 0, 3}, {6, 5, 7}, {10, 8, 9}, {6, 5, 6}, {-2, -2, -3}, {-12, -22, -8}},
+ {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},},
+ }, {
+ {{0, 0, 0}, {0, 0, 0}, {-40, 6, -14}, {-11, 1, -7}, {-3, 1, -2}, {-4, 0, 2}, {0, 0, 0}, {6, -1, 5}, {0, 0, 1}, {13, -4, 17}},
+ {{0, 0, 0}, {0, 0, 0}, {-42, 6, -14}, {-11, 0, -6}, {-4, 0, -2}, {-5, 0, 0}, {0, 0, 0}, {6, -1, 5}, {1, 0, 2}, {12, -4, 17}},
+ {{0, 0, 0}, {0, 0, 0}, {-44, 7, -16}, {-9, 1, -5}, {-3, 1, -2}, {-4, 0, 1}, {0, 0, 1}, {4, -1, 4}, {-1, 0, 0}, {15, -4, 20}},
+ {{0, 0, 0}, {0, 0, 0}, {-42, 7, -14}, {-10, 0, -6}, {-3, 0, -2}, {-4, 0, 1}, {2, 0, 2}, {3, 0, 4}, {-1, 0, 0}, {15, -4, 20}},
+ {{0, 0, 0}, {0, 0, 0}, {-44, 7, -15}, {-11, 0, -6}, {-3, 0, -2}, {-3, 0, 1}, {4, -1, 3}, {1, 0, 3}, {0, 0, 1}, {14, -4, 18}},
+ {{0, 0, 0}, {0, 0, 0}, {-29, 5, -11}, {-11, 0, -6}, {-2, 0, -1}, {-4, 0, 0}, {5, -1, 4}, {-1, 0, 0}, {1, 0, 2}, {13, -4, 17}},
+ {{0, 0, 0}, {0, 0, 0}, {-30, 6, -13}, {-7, 0, -4}, {-2, 0, -1}, {-4, 0, 0}, {5, -1, 4}, {0, 0, 2}, {0, 0, 0}, {15, -4, 19}},
+ {{0, 0, 0}, {0, 0, 0}, {-34, 6, -14}, {-10, 0, -5}, {-4, 0, -1}, {-1, 0, 2}, {2, -2, 4}, {0, 0, 0}, {0, 0, 0}, {15, -4, 19}},
+ {{0, 0, 0}, {0, 0, 0}, {-32, 6, -14}, {-8, 0, -4}, {-2, 0, 0}, {-4, 0, 0}, {5, -1, 4}, {-1, 0, 0}, {-1, 0, 1}, {17, -4, 19}},
+ {{0, 0, 0}, {0, 0, 0}, {-29, 6, -13}, {-7, 0, -4}, {-3, 0, 0}, {-4, 0, 0}, {5, -1, 4}, {0, 0, 2}, {0, 0, 0}, {16, -4, 19}},
+ {{0, 0, 0}, {0, 0, 0}, {-32, 6, -14}, {-8, 0, -4}, {-3, 0, 0}, {-1, -1, 2}, {3, -1, 3}, {-1, 0, 1}, {0, 0, 0}, {17, -4, 20}},
+ {{0, 0, 0}, {0, 0, 0}, {-26, 6, -12}, {-8, 0, -4}, {-2, 0, 0}, {-2, 0, 1}, {1, -1, 2}, {-1, 0, 0}, {0, 0, 0}, {16, -5, 20}},
+ {{0, 0, 0}, {0, 0, 0}, {-24, 5, -12}, {-8, 0, -4}, {-2, 0, 0}, {0, 0, 1}, {2, -1, 3}, {-1, 0, 0}, {2, 0, 2}, {17, -4, 20}},
+ {{0, 0, 0}, {0, 0, 0}, {-27, 5, -12}, {-7, 0, -4}, {-2, 0, 0}, {-2, 0, 1}, {2, -1, 3}, {-1, 0, 1}, {0, 0, 0}, {17, -5, 21}},
+ {{0, 0, 0}, {0, 0, 0}, {-24, 5, -11}, {-6, 0, -4}, {-3, 0, 0}, {-1, 0, 1}, {1, -1, 2}, {0, 0, 2}, {0, 0, 0}, {17, -5, 20}},
+ {{0, 0, 0}, {0, 0, 0}, {-19, 5, -10}, {-5, 0, -2}, {-4, 0, 0}, {-1, 0, 1}, {3, -1, 4}, {0, 0, 1}, {0, 0, 0}, {17, -5, 21}},
+ {{0, 0, 0}, {0, 0, 0}, {-20, 4, -10}, {-4, 0, -1}, {-4, 0, 0}, {-1, 0, 0}, {2, -1, 3}, {-1, 0, 0}, {0, 0, 0}, {20, -5, 23}},
+ {{0, 0, 0}, {0, 0, 0}, {-20, 4, -10}, {-5, 0, -2}, {-3, 0, 0}, {0, 0, 1}, {2, -1, 3}, {-1, 0, 0}, {0, 0, 0}, {19, -5, 23}},
+ {{0, 0, 0}, {0, 0, 0}, {-20, 4, -10}, {-6, 0, -2}, {-4, 0, 0}, {0, 0, 1}, {2, -1, 3}, {-1, 0, 0}, {-1, 0, 0}, {22, -5, 24}},
+ {{0, 0, 0}, {0, 0, 0}, {-20, 4, -10}, {-5, 0, -2}, {-4, 0, 0}, {0, 0, 1}, {0, -1, 2}, {-1, 0, 0}, {2, 0, 2}, {19, -5, 22}},
+ {{0, 0, 0}, {0, 0, 0}, {-15, 4, -8}, {-5, 0, -2}, {-3, 0, 0}, {0, 0, 1}, {2, -1, 2}, {0, 0, 1}, {0, 0, 0}, {19, -5, 23}},
+ {{0, 0, 0}, {0, 0, 0}, {-16, 3, -8}, {-5, 0, -2}, {-2, 0, 0}, {0, 0, 1}, {1, -1, 2}, {-1, 0, -1}, {0, 0, 1}, {21, -6, 24}},
+ {{0, 0, 0}, {0, 0, 0}, {-11, 4, -8}, {-2, 0, 0}, {0, 0, 2}, {1, -1, 2}, {1, -1, 2}, {2, 0, 3}, {0, 0, 0}, {15, -5, 20}},
+ {{0, 0, 0}, {0, 0, 0}, {-11, 3, -8}, {-1, 0, -1}, {-1, 0, 2}, {0, -1, 2}, {3, -1, 3}, {0, 0, 1}, {0, 0, 1}, {17, -4, 20}},
+ {{0, 0, 0}, {0, 0, 0}, {-10, 4, -8}, {-1, 0, 0}, {0, 0, 2}, {0, -1, 2}, {2, -1, 3}, {0, 0, 1}, {0, 0, 0}, {16, -5, 21}},
+ {{0, 0, 0}, {0, 0, 0}, {-11, 3, -8}, {-2, 0, 0}, {0, 0, 2}, {3, -1, 4}, {0, 0, 1}, {0, 0, 1}, {-1, 0, 0}, {19, -5, 22}},
+ {{0, 0, 0}, {0, 0, 0}, {-9, 3, -6}, {-2, 0, -1}, {0, 0, 2}, {3, -2, 4}, {0, 0, 1}, {0, 0, 0}, {0, 0, 1}, {16, -5, 21}},
+ {{0, 0, 0}, {0, 0, 0}, {-8, 2, -6}, {-2, 0, -1}, {0, 0, 1}, {1, -2, 4}, {-1, 0, 1}, {0, 0, -1}, {0, 0, 1}, {20, -5, 23}},
+ {{0, 0, 0}, {0, 0, 0}, {-34, -24, -13}, {-11, -10, -7}, {-8, -10, -6}, {-4, -10, -1}, {1, 0, -2}, {5, 4, 5}, {-4, -4, -5}, {-13, -32, -9}},
+ {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},}
+ }
+};
+
unsigned char VINT_TABLE[] = {
0x18, 0x19, 0x1A, 0x1B, 0x1C,
0x1D, 0x1E, 0x1F, 0x20, 0x21
struct mutex lock;
u8 gammodes[S6E3HA2_NITS_COUNT][DAID_PARAM_COUNT];
+ u8 hmt_gammodes[HMT_NITS_COUNT][DAID_PARAM_COUNT];
};
static inline struct s6e3ha2 *panel_to_s6e3ha2(struct drm_panel *panel)
.color_offset = s6e3ha2_color_ofs[ctx->model],
.brightness_base = s6e3ha2_brightness_base[ctx->model],
};
+ struct daid_cfg hmt_cfg = {
+ .vreg_out = S6E3HA2_VREG_OUT,
+ .nits = hmt_nits,
+ .nits_count = HMT_NITS_COUNT,
+ .nit_gct = 150,
+ .gradation = hmt_gradation[ctx->model],
+ .color_offset = hmt_color_ofs[ctx->model],
+ .brightness_base = hmt_brightness_base[ctx->model],
+ };
u8 mtp[44];
s6e3ha2_dcs_read(ctx, LDI_MTP_REG, mtp, ARRAY_SIZE(mtp));
BITS(mtp[41], 4, 0), BITS(mtp[42], 4, 0), BITS(mtp[43], 5, 0));
daid_calc_gammodes(ctx->gammodes, &cfg, mtp);
+ daid_calc_gammodes(ctx->hmt_gammodes, &hmt_cfg, mtp);
}
static void s6e3ha2_gamma_update(struct s6e3ha2 *ctx)
static unsigned int s6e3ha2_get_brightness_index(struct s6e3ha2 *ctx,
unsigned int brightness)
{
- int nit, b = 0, e = S6E3HA2_NITS_COUNT, m;
- const int *nits = s6e3ha2_nits[ctx->model];
+ const int *nits = ctx->hmt_mode ? hmt_nits : s6e3ha2_nits[ctx->model];
+ const int count = ctx->hmt_mode ? HMT_NITS_COUNT : S6E3HA2_NITS_COUNT;
+ int nit, b = 0, e = count, m;
- nit = brightness * nits[S6E3HA2_NITS_COUNT - 1] / MAX_BRIGHTNESS;
+ nit = brightness * nits[count - 1] / MAX_BRIGHTNESS;
while (e - b > 1) {
m = (b + e) / 2;
b = m;
}
- if (e < S6E3HA2_NITS_COUNT && nit - nits[b] > nits[e] - nit)
+ if (e < count && nit - nits[b] > nits[e] - nit)
b = e;
return b;
static void s6e3ha2_update_gamma(struct s6e3ha2 *ctx, unsigned int brightness)
{
unsigned int index = s6e3ha2_get_brightness_index(ctx, brightness);
- char data[DAID_PARAM_COUNT + 1];
+ u8 data[DAID_PARAM_COUNT + 1];
+ u8 *g = ctx->hmt_mode ? ctx->hmt_gammodes[index] : ctx->gammodes[index];
data[0] = LDI_GAMMODE1;
- memcpy(data + 1, ctx->gammodes[index], DAID_PARAM_COUNT);
+ memcpy(data + 1, g, DAID_PARAM_COUNT);
s6e3ha2_dcs_write(ctx, data, ARRAY_SIZE(data));
- s6e3ha2_gamma_update(ctx);
-
if (!ctx->error)
ctx->bl_dev->props.brightness = brightness;
}
-static void s6e3ha2_set_hmt_gamma(struct s6e3ha2 *ctx)
-{
- /* TODO */
- s6e3ha2_dcs_write_seq_static(ctx,
- 0xca, 0x00, 0xf3, 0x00, 0xe6, 0x00, 0xf4, 0x86, 0x85,
- 0x85, 0x85, 0x85, 0x86, 0x88, 0x87, 0x88, 0x86, 0x84,
- 0x86, 0x83, 0x82, 0x85, 0x88, 0x86, 0x87, 0x8f, 0x93,
- 0x85, 0xa6, 0x90, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00);
-}
-
static void s6e3ha2_set_hmt_aid_parameter_ctl(struct s6e3ha2 *ctx)
{
/* TODO */
s6e3ha2_test_key_on_f0(ctx);
s6e3ha2_test_key_on_fc(ctx);
- s6e3ha2_set_hmt_gamma(ctx);
+ s6e3ha2_update_gamma(ctx, ctx->bl_dev->props.brightness);
s6e3ha2_set_hmt_aid_parameter_ctl(ctx);
s6e3ha2_set_hmt_elvss(ctx);
if (ctx->model == MODEL_1440)
s6e3ha2_set_hmt_brightness(ctx);
return;
}
-
s6e3ha2_test_key_on_f0(ctx);
s6e3ha2_update_gamma(ctx, ctx->bl_dev->props.brightness);
+ s6e3ha2_gamma_update(ctx);
s6e3ha2_aor_control(ctx);
s6e3ha2_set_vint(ctx);
s6e3ha2_test_key_off_f0(ctx);