Skip to contentSkip to conversation

drm/amd/display: Fix duplicating scaling/underscan connector state

PATCH In review Nicholas Kazlauskas 3 participants 3 messages Dec 7, 2018 – Dec 11, 2018 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Fix duplicating scaling/underscan connector state

[Why]
These properties aren't being carried over when the atomic state. This tricks atomic check and commit tail into performing underscan and scaling operations when they aren't needed.

With the patch that forced scaling/RMX_ASPECT on by default this results in many unnecessary surface updates and hangs under certain conditions.

[How]
Duplicate the properties.

Fixes 91b66c47ba34 ("drm/amd/display: Set RMX_ASPECT as default")
Cc Bhawanpreet Lakha <[email protected]>
Cc Leo Li <[email protected]>
Cc Harry Wentland <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -0
index 23d61570df17..ddf5efd1a5f4 100644
@@ -3242,6 +3242,10 @@ 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->scaling = state->scaling;
+	new_state->underscan_enable = state->underscan_enable;
+	new_state->underscan_hborder = state->underscan_hborder;
+	new_state->underscan_vborder = state->underscan_vborder;
 	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): 20181207150709.18551-1-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org

Acked-by
#2 lore raw
Quoted 41 lines · Nicholas Kazlauskas

[Why]
These properties aren't being carried over when the atomic state. This tricks atomic check and commit tail into performing underscan and scaling operations when they aren't needed.

With the patch that forced scaling/RMX_ASPECT on by default this results in many unnecessary surface updates and hangs under certain conditions.

[How]
Duplicate the properties.

Fixes 91b66c47ba34 ("drm/amd/display: Set RMX_ASPECT as default")
Cc Bhawanpreet Lakha <[email protected]>
Cc Leo Li <[email protected]>
Cc Harry Wentland <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -1
index 23d61570df17..ddf5efd1a5f4 100644
@@ -3242,6 +3242,10 @@ 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->scaling = state->scaling;
+       new_state->underscan_enable = state->underscan_enable;
+       new_state->underscan_hborder = state->underscan_hborder;
+       new_state->underscan_vborder = state->underscan_vborder;
        new_state->max_bpc = state->max_bpc;
 
        return &new_state->base;
--

2.17.1

Quoted 4 lines

_______________________________________________
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

A message that is not in the archive (sent off-list or not yet received): CADnq5_OWLdmwei2_JH_795mvbSZgJi-7friD9apmYyC_P8wsNw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

Reviewed-by Leo Li
#4 lore raw
Quoted 44 lines · Alex Deucher
Quoted 41 lines · Nicholas Kazlauskas

[Why]
These properties aren't being carried over when the atomic state. This tricks atomic check and commit tail into performing underscan and scaling operations when they aren't needed.

With the patch that forced scaling/RMX_ASPECT on by default this results in many unnecessary surface updates and hangs under certain conditions.

[How]
Duplicate the properties.

Fixes 91b66c47ba34 ("drm/amd/display: Set RMX_ASPECT as default")
Cc Bhawanpreet Lakha <[email protected]>
Cc Leo Li <[email protected]>
Cc Harry Wentland <[email protected]>
---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -1
index 23d61570df17..ddf5efd1a5f4 100644
@@ -3242,6 +3242,10 @@ 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->scaling = state->scaling;
+       new_state->underscan_enable = state->underscan_enable;
+       new_state->underscan_hborder = state->underscan_hborder;
+       new_state->underscan_vborder = state->underscan_vborder;
         new_state->max_bpc = state->max_bpc;
 
         return &new_state->base;
--

2.17.1

Quoted 9 lines
Quoted 4 lines

_______________________________________________
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

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx