Skip to contentSkip to conversation

drm/amd/display: Fix set scaling doesn's work

PATCH In review hongao 3 participants 4 messages Nov 22, 2022 – Jan 12, 2023

Subsystems (3)
lore
Share & tools
lore

hongao

author
#0 lore raw

PATCH 1/1 drm/amd/display: Fix set scaling doesn's work

[Why]
Setting scaling does not correctly update CRTC state. As a result dc stream state's src (composition area) && dest (addressable area) was not calculated as expected. This causes set scaling doesn's work.

[How]
Correctly update CRTC state when setting scaling property.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -2
index 3e1ecca72430..a88a6f758748 100644
@@ -9386,8 +9386,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
 			goto fail;
 		}
 
-		if (dm_old_con_state->abm_level !=
-		    dm_new_con_state->abm_level)
+		if (dm_old_con_state->abm_level != dm_new_con_state->abm_level ||
+		    dm_old_con_state->scaling != dm_new_con_state->scaling)
 			new_crtc_state->connectors_changed = true;
 	}
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 15 lines · hongao

[Why]
Setting scaling does not correctly update CRTC state. As a result dc stream state's src (composition area) && dest (addressable area) was not calculated as expected. This causes set scaling doesn's work.

[How]
Correctly update CRTC state when setting scaling property.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 3e1ecca72430..a88a6f758748 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_atomic_check(struct drm_device *dev, · line 9393

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -2
@@ -9386,8 +9386,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
  			goto fail;
  		}
 
-		if (dm_old_con_state->abm_level !=
-		    dm_new_con_state->abm_level)
+		if (dm_old_con_state->abm_level != dm_new_con_state->abm_level ||
+		    dm_old_con_state->scaling != dm_new_con_state->scaling)
  			new_crtc_state->connectors_changed = true;
  	}
 

Hi,

This change lgtm, and I also run it in our CI, and from IGT perspective, we are good.

Harry, do you have any comment about this change?

Thanks
Siqueira

maintainer Reviewed-by
#2 lore raw
Quoted 30 lines · Rodrigo Siqueira Jordao
Quoted 17 lines · hongao

[Why]
Setting scaling does not correctly update CRTC state. As a result dc stream state's src (composition area) && dest (addressable area) was not calculated as expected. This causes set scaling doesn's work.

[How]
Correctly update CRTC state when setting scaling property.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 3e1ecca72430..a88a6f758748 100644
@@ -9386,8 +9386,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
               goto fail;
           }
Quoted 7 lines

  -        if (dm_old_con_state->abm_level !=
-            dm_new_con_state->abm_level)
+        if (dm_old_con_state->abm_level != dm_new_con_state->abm_level || +            dm_old_con_state->scaling != dm_new_con_state->scaling) new_crtc_state->connectors_changed = true;
      }

Hi,

Quoted 4 lines

This change lgtm, and I also run it in our CI, and from IGT perspective, we are good.

Harry, do you have any comment about this change?

LGTM

Harry

Quoted 2 lines

Thanks
Siqueira

#3 lore raw
Quoted 33 lines · Harry Wentland
Quoted 32 lines · Rodrigo Siqueira Jordao
Quoted 15 lines · hongao

[Why]
Setting scaling does not correctly update CRTC state. As a result dc stream state's src (composition area) && dest (addressable area) was not calculated as expected. This causes set scaling doesn's work.

[How]
Correctly update CRTC state when setting scaling property.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 3e1ecca72430..a88a6f758748 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_atomic_check(struct drm_device *dev, · line 9393

Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -1
@@ -9386,8 +9386,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
               goto fail;
           }
   -        if (dm_old_con_state->abm_level !=
-            dm_new_con_state->abm_level)
+        if (dm_old_con_state->abm_level != dm_new_con_state->abm_level ||
+            dm_old_con_state->scaling != dm_new_con_state->scaling)
               new_crtc_state->connectors_changed = true;
       }
 

Hi,

This change lgtm, and I also run it in our CI, and from IGT perspective, we are good.

Quoted 12 lines
Quoted 2 lines

Harry, do you have any comment about this change?

LGTM

Harry

Quoted 2 lines

Thanks
Siqueira

Thanks, patch applied to amd-staging-drm-next.