case 1:/* Boosted */
for (i = 0; i < 50; i++)
- cgc_lut[i] = tune_mode[1][i];
+ cgc_lut[i] = tune_mode[2][i];
for (i = 0; i < 35; i++)
- hsc_lut[i] = tune_mode[1][i + 245];
+ hsc_lut[i] = tune_mode[2][i + 245];
break;
case 2:/* Saturated */
for (i = 0; i < 50; i++)
- cgc_lut[i] = tune_mode[2][i];
+ cgc_lut[i] = tune_mode[3][i];
for (i = 0; i < 35; i++)
- hsc_lut[i] = tune_mode[2][i + 245];
+ hsc_lut[i] = tune_mode[3][i + 245];
break;
- case 90:/* mode0 */
+ case 90:/* mode0 (bypass) */
for (i = 0; i < 50; i++)
cgc_lut[i] = tune_mode[0][i];
for (i = 0; i < 35; i++)
switch (mode->color_mode) {
case HAL_COLOR_MODE_SRGB:
- for (i = 0; i < 50; i++)
- cgc_lut[i] = tune_mode[1][i];
- for (i = 0; i < 35; i++)
- hsc_lut[i] = tune_mode[1][i + 245];
+ case HAL_COLOR_MODE_DCI_P3:
+ if (dqe->ctx.boosted_on) {
+ for (i = 0; i < 50; i++)
+ cgc_lut[i] = tune_mode[2][i];
+ for (i = 0; i < 35; i++)
+ hsc_lut[i] = tune_mode[2][i + 245];
+ } else {
+ for (i = 0; i < 50; i++)
+ cgc_lut[i] = tune_mode[1][i];
+ for (i = 0; i < 35; i++)
+ hsc_lut[i] = tune_mode[1][i + 245];
+ }
break;
case HAL_COLOR_MODE_NATIVE:
- for (i = 0; i < 50; i++)
- cgc_lut[i] = tune_mode[2][i];
- for (i = 0; i < 35; i++)
- hsc_lut[i] = tune_mode[2][i + 245];
- break;
-
- case HAL_COLOR_MODE_DCI_P3:
for (i = 0; i < 50; i++)
cgc_lut[i] = tune_mode[3][i];
for (i = 0; i < 35; i++)
mutex_lock(&dqe->lock);
+ dqe->ctx.boosted_on = 0;
+
if (decon) {
if ((decon->state == DECON_STATE_OFF) ||
(decon->state == DECON_STATE_INIT)) {
for (i = 0; i < 16; i++)
if (transform->matrix[i] == -1 || transform->matrix[i] == 1)
transform->matrix[i] = 0;
+
+ dqe->ctx.boosted_on = 1;
}
for (i = 0; i < 16; i++) {
else
dqe->ctx.night_light_on = 1;
+ if (dqe->ctx.color_mode == HAL_COLOR_MODE_SRGB ||
+ dqe->ctx.color_mode == HAL_COLOR_MODE_DCI_P3) {
+ if (dqe->ctx.boosted_on) {
+ for (i = 0; i < 50; i++)
+ cgc_lut[i] = tune_mode[2][i];
+ for (i = 0; i < 35; i++)
+ hsc_lut[i] = tune_mode[2][i + 245];
+ } else {
+ for (i = 0; i < 50; i++)
+ cgc_lut[i] = tune_mode[1][i];
+ for (i = 0; i < 35; i++)
+ hsc_lut[i] = tune_mode[1][i + 245];
+ }
+ dqe_cgc_lut_set();
+ dqe_hsc_lut_set();
+ dqe->ctx.cgc_on = DQE_CGC_ON_MASK;
+ dqe->ctx.hsc_on = DQE_HSC_ON_MASK;
+ }
+
for (i = 0; i < 3; i++)
for (j = 0; j < 65; j++)
gamma_lut[i][j] = bypass_gamma_tune[i][j];
err:
mutex_unlock(&dqe->lock);
- dqe_info("%s : ret=%d color_mode=%d, hint=%d\n",
- __func__,ret , dqe->ctx.color_mode, transform->hint);
+ dqe_info("%s : ret=%d color_mode=%d, hint=%d, boosted=%d\n",
+ __func__,ret , dqe->ctx.color_mode, transform->hint, dqe->ctx.boosted_on);
return ret;
}