Skip to content

Commit 8e3a1c5

Browse files
Nicholas Kazlauskasgregkh
authored andcommitted
drm/amd/display: Fix unintialized max_bpc state values
commit 49f1c44 upstream. [Why] If the "max bpc" isn't explicitly set in the atomic state then it have a value of 0. This has the correct behavior of limiting a panel to 8bpc in the case where the panel supports 8bpc. In the case of eDP panels this isn't a true assumption - there are panels that can only do 6bpc. Banding occurs for these displays. [How] Initialize the max_bpc when the connector resets to 8bpc. Also carry over the value when the state is duplicated. Bugzilla: https://bugs.freedesktop.org/108825 Fixes: 307638884f72 ("drm/amd/display: Support amdgpu "max bpc" connector property") Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5f0ab98 commit 8e3a1c5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2894,6 +2894,7 @@ void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector)
28942894
state->underscan_enable = false;
28952895
state->underscan_hborder = 0;
28962896
state->underscan_vborder = 0;
2897+
state->max_bpc = 8;
28972898

28982899
__drm_atomic_helper_connector_reset(connector, &state->base);
28992900
}
@@ -2911,6 +2912,7 @@ amdgpu_dm_connector_atomic_duplicate_state(struct drm_connector *connector)
29112912
if (new_state) {
29122913
__drm_atomic_helper_connector_duplicate_state(connector,
29132914
&new_state->base);
2915+
new_state->max_bpc = state->max_bpc;
29142916
return &new_state->base;
29152917
}
29162918

0 commit comments

Comments
 (0)