drm/amd/display: Fix unintialized max_bpc state values
Subsystems (3)
PATCH 1/1 drm/amd/display: Fix unintialized max_bpc state values
[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
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
@@ -3215,6 +3215,7 @@ void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector) state->underscan_enable = false; state->underscan_hborder =0 ; state->underscan_vborder =0 ; + state->max_bpc =8 ;__drm_atomic_helper_connector_reset (connector, &state->base); }
@@ -3236,6 +3237,7 @@ amdgpu_dm_connector_atomic_duplicate_state(struct drm_connector *connector) new_state->freesync_capable = state->freesync_capable; new_state->abm_level = state->abm_level; + new_state->max_bpc = state->max_bpc;return &new_state->base; }
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20181129154446.14838-1-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Nicholas Kazlauskas <[email protected]>
Sent: Thursday, November 29, 2018 10:44:46 AM
To: [email protected]
Cc: Kazlauskas, Nicholas
Subject: [PATCH] drm/amd/display: Fix unintialized max_bpc state values
[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
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
@@ -3215,6 +3215,7 @@ void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector) state->underscan_enable = false; state->underscan_hborder =0 ; state->underscan_vborder =0 ; + state->max_bpc =8 ;__drm_atomic_helper_connector_reset (connector, &state->base); }
@@ -3236,6 +3237,7 @@ amdgpu_dm_connector_atomic_duplicate_state(struct drm_connector *connector) new_state->freesync_capable = state->freesync_capable; new_state->abm_level = state->abm_level; + new_state->max_bpc = state->max_bpc;return &new_state->base; }
--
2.17.1
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Wentland, Harry
Reviewed-by Harry WentlandQuoted 9 lines · Nicholas Kazlauskas
[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.
Quoted 8 lines
[How]
Initialize themax_bpcwhen 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 <[email protected]>
Harry
Quoted 18 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-0@@ -3215,6 +3215,7 @@ void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector) state->underscan_enable = false; state->underscan_hborder =0 ; state->underscan_vborder =0 ; + state->max_bpc =8 ;__drm_atomic_helper_connector_reset (connector, &state->base); }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c amdgpu_dm_connector_atomic_duplicate_state(struct drm_connector *connector) · line 3243
Quoted 7 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-0@@ -3236,6 +3237,7 @@ amdgpu_dm_connector_atomic_duplicate_state(struct drm_connector *connector) new_state->freesync_capable = state->freesync_capable; new_state->abm_level = state->abm_level; + new_state->max_bpc = state->max_bpc;return &new_state->base; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx