sm7125: drm: msm: Properly dim the screen for HBM

This reverts commit 06439aa0b6.

Change-Id: Ifa7b1a5106cd42a171026d37d813dfae13de87aa
fourteen
Simon1511 2 years ago
parent ebdd80eb4d
commit a2fb8cee8e
  1. 51
      drivers/gpu/drm/msm/dsi-staging/dsi_panel.c

@ -54,27 +54,30 @@ struct bda {
}; };
struct bda fod_dim_lut[] = { struct bda fod_dim_lut[] = {
{0, 0xFF}, {0, 0xFF},
{4, 0xEB}, {1, 0xEC},
{8, 0xEA}, {2, 0xE6},
{12, 0xE9}, {3, 0xE0},
{13, 0xE8}, {4, 0xDC},
{20, 0xE5}, {6, 0xD5},
{24, 0xE3}, {10, 0xCA},
{30, 0xE0}, {20, 0xB7},
{68, 0xD0}, {21, 0xB5},
{133, 0xC0}, {30, 0xA8},
{218, 0xB0}, {42, 0x9A},
{328, 0xA0}, {63, 0x85},
{486, 0x90}, {84, 0x74},
{642, 0x80}, {105, 0x65},
{832, 0x70}, {126, 0x58},
{1043, 0x60}, {147, 0x4C},
{1267, 0x50}, {168, 0x40},
{1500, 0x40}, {189, 0x36},
{1770, 0x30}, {210, 0x2C},
{2000, 0x24}, {231, 0x23},
{2047, 0x21}, {252, 0x1A},
{273, 0x11},
{294, 0x9},
{315, 0x1},
}; };
enum dsi_dsc_ratio_type { enum dsi_dsc_ratio_type {
@ -1115,8 +1118,10 @@ u32 dsi_panel_get_fod_dim_alpha(struct dsi_panel *panel)
return fod_dim_lut[i - 1].dim_alpha; return fod_dim_lut[i - 1].dim_alpha;
return interpolate(brightness, return interpolate(brightness,
fod_dim_lut[i].brightness, fod_dim_lut[i - 1].brightness, fod_dim_lut[i - 1].brightness,
fod_dim_lut[i].dim_alpha, fod_dim_lut[i - 1].dim_alpha); fod_dim_lut[i].brightness,
fod_dim_lut[i - 1].dim_alpha,
fod_dim_lut[i].dim_alpha);
} }
int dsi_panel_set_backlight(struct dsi_panel *panel, u32 bl_lvl) int dsi_panel_set_backlight(struct dsi_panel *panel, u32 bl_lvl)

Loading…
Cancel
Save