History

drm/amd/display: Cap OLED brightness per max frame-average luminance

[Why] For OLED eDP the Display Manager uses max_cll value as a limit for brightness control. max_cll defines the content light luminance for individual pixel. Whereas max_fall defines frame-average level luminance. The user may not observe the difference in brightness in between max_fall and max_cll. That negatively impacts the user experience. [How] Use max_fall value instead of max_cll as a limit for brightness control.

Roman Li committed 4 years ago

Commit 4fd17f21 parent c904e3a1 file · +4 −4Browse files

Unified · Split

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+4−4
@@ -2812,7 +2812,7 @@ static struct drm_mode_config_helper_funcs amdgpu_dm_mode_config_helperfuncs = { · 2811 unmodified lines
28122812
28132813 static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
28142814 {
2815− u32 max_cll, min_cll, max, min, q, r;
2815+ u32 max_avg, min_cll, max, min, q, r;
28162816 struct amdgpu_dm_backlight_caps *caps;
28172817 struct amdgpu_display_manager *dm;
28182818 struct drm_connector *conn_base;
@@ -2842,7 +2842,7 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector) · 23 unmodified lines
28422842 caps = &dm->backlight_caps[i];
28432843 caps->ext_caps = &aconnector->dc_link->dpcd_sink_ext_caps;
28442844 caps->aux_support = false;
2845− max_cll = conn_base->hdr_sink_metadata.hdmi_type1.max_cll;
2845+ max_avg = conn_base->hdr_sink_metadata.hdmi_type1.max_fall;
28462846 min_cll = conn_base->hdr_sink_metadata.hdmi_type1.min_cll;
28472847
28482848 if (caps->ext_caps->bits.oled == 1 /*||
@@ -2870,8 +2870,8 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector) · 21 unmodified lines
28702870 * The results of the above expressions can be verified at
28712871 * pre_computed_values.
28722872 */
2873− q = max_cll >> 5;
2874− r = max_cll % 32;
2873+ q = max_avg >> 5;
2874+ r = max_avg % 32;
28752875 max = (1 << q) * pre_computed_values[r];
28762876
28772877 // min luminance: maxLum * (CV/255)^2 / 100