diff options
author | Gil Liu <gilliu@google.com> | 2022-05-30 09:17:21 +0000 |
---|---|---|
committer | Gil Liu <gilliu@google.com> | 2022-06-01 06:46:56 +0000 |
commit | 6731d5f7dba566b589fc0e7b87fa8b48c4cb874c (patch) | |
tree | 3e3a9bc01673e0c7f20bc164dfb8825f5e53e68f /display | |
parent | 51b6c155340ad8757bc5461a78fc440f89c8944f (diff) | |
download | bluejay-6731d5f7dba566b589fc0e7b87fa8b48c4cb874c.tar.gz |
Revert "s6e3fc3_6a: add update lhbm gamma function"
This reverts commit d18e5309e408571df00110316cb128478614349a.
Reason for revert: Sensor team request due to DTE OPR testing
Bug: 232857978
Change-Id: I898762d6c96285e4115fce0eb670998550acdac9
Diffstat (limited to 'display')
-rw-r--r-- | display/panel-samsung-s6e3fc3_6a.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/display/panel-samsung-s6e3fc3_6a.c b/display/panel-samsung-s6e3fc3_6a.c index 3476cbc..cb2e184 100644 --- a/display/panel-samsung-s6e3fc3_6a.c +++ b/display/panel-samsung-s6e3fc3_6a.c @@ -242,47 +242,6 @@ static void s6e3fc3_6a_set_nolp_mode(struct exynos_panel *ctx, } #define S6E3FC3_LOCAL_HBM_GAMMA_CMD_SIZE 6 -static void s6e3fc3_6a_update_lhbm_gamma(struct exynos_panel *ctx) -{ - /* ratio provided by HW for update the LHBM gamma. - * ratio must be a integer due to kernel didn't support floating. - * ratio original value R: 1.076923077, G: 1.061566485, B: 1.065269461. - * ratio cannot exceed u32 max 4294967296. - * R gamma hex from last 16bit from gamma_cmd[1] combine with gamma_cmd[3] - * G gamma hex from first 16bit from gamma_cmd[2] combine with gamma_cmd[4] - * B gamma hex from last 16bit from gamma_cmd[2] combine with gamma_cmd[5] - */ - u8 *gamma_cmd = ctx->hbm.local_hbm.gamma_cmd; - const u32 rgb_ratio[3] = {1076923077, 1061566485, 1065269461}; - const u8 rgb_index[3][2] = {{1, 3}, {2, 4}, {2, 5}}; - u8 new_gamma_cmd[S6E3FC3_LOCAL_HBM_GAMMA_CMD_SIZE] = {0}; - u64 tmp; - int i; - u16 mask, shift; - dev_info(ctx->dev, "%s: gamma_cmd(%02x %02x %02x %02x %02x)\n", __func__, - gamma_cmd[1], gamma_cmd[2], gamma_cmd[3], gamma_cmd[4], gamma_cmd[5]); - for (i = 0; i < ARRAY_SIZE(rgb_ratio); i++) { - if (i % 2) { - mask = 0xf0; - shift = 4; - } else { - mask = 0x0f; - shift = 0; - } - tmp = ((gamma_cmd[rgb_index[i][0]] & mask) >> shift) << 8 | gamma_cmd[rgb_index[i][1]]; - dev_dbg(ctx->dev, "%s: lhbm_gamma[%d] = %llu\n", __func__, i, tmp); - - /* Round off and revert to original gamma value */ - tmp = (tmp * rgb_ratio[i] + 500000000)/1000000000; - dev_dbg(ctx->dev, "%s: new lhbm_gamma[%d] = %llu\n", __func__, i, tmp); - new_gamma_cmd[rgb_index[i][0]] |= ((tmp & 0xff00) >> 8) << shift; - new_gamma_cmd[rgb_index[i][1]] |= tmp & 0xff; - } - memcpy(&gamma_cmd[1], &new_gamma_cmd[1], S6E3FC3_LOCAL_HBM_GAMMA_CMD_SIZE - 1); - dev_info(ctx->dev, "%s: new_gamma_cmd(%02x %02x %02x %02x %02x)\n", __func__, - gamma_cmd[1], gamma_cmd[2], gamma_cmd[3], gamma_cmd[4], gamma_cmd[5]); -} - static int s6e3fc3_6a_lhbm_gamma_read(struct exynos_panel *ctx) { struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); @@ -305,7 +264,6 @@ static int s6e3fc3_6a_lhbm_gamma_read(struct exynos_panel *ctx) EXYNOS_DCS_WRITE_SEQ(ctx, 0xB0, 0x00, 0x28, 0xF2); /* global para*/ EXYNOS_DCS_WRITE_SEQ(ctx, 0xF2, 0xC4); /* 8 bit */ EXYNOS_DCS_WRITE_TABLE(ctx, test_key_off_f0); - s6e3fc3_6a_update_lhbm_gamma(ctx); return ret; } |