Skip to contentSkip to conversation

Revert "drm/amd/display: disable dcn20 abm feature for bring up"

PATCH In review Harry Wentland 5 participants 7 messages May 28, 2020

Subsystems (3)
lore
Share & tools
lore

Harry Wentland

author maintainer
#0 lore raw

PATCH 1/1 Revert "drm/amd/display: disable dcn20 abm feature for bring up"

This reverts commit 96cb7cf13d8530099c256c053648ad576588c387.

This change was used for DCN2 bringup and is no longer desired. In fact it breaks backlight on DCN2 systems.

Cc Alexander Monakov <[email protected]>
Cc Hersen Wu <[email protected]>
Cc Anthony Koo <[email protected]>
Cc Michael Chiu <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -7
index ddc979e3eebe..acd4874e0743 100644
@@ -1356,7 +1356,7 @@ static int dm_late_init(void *handle)
 	unsigned int linear_lut[16];
 	int i;
 	struct dmcu *dmcu = NULL;
-	bool ret = false;
+	bool ret;
 
 	if (!adev->dm.fw_dmcu)
 		return detect_mst_link_for_all_connectors(adev->ddev);
@@ -1377,13 +1377,10 @@ static int dm_late_init(void *handle)
 	 */
 	params.min_abm_backlight = 0x28F;
 
-	/* todo will enable for navi10 */
-	if (adev->asic_type <= CHIP_RAVEN) {
-		ret = dmcu_load_iram(dmcu, params);
+	ret = dmcu_load_iram(dmcu, params);
 
-		if (!ret)
-			return -EINVAL;
-	}
+	if (!ret)
+		return -EINVAL;
 
 	return detect_mst_link_for_all_connectors(adev->ddev);
 }
Signature · 6 lines
2.26.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw
Quoted 4 lines · Harry Wentland

This reverts commit 96cb7cf13d8530099c256c053648ad576588c387.

This change was used for DCN2 bringup and is no longer desired. In fact it breaks backlight on DCN2 systems.

Thanks.

Quoted 30 lines
Cc Alexander Monakov <[email protected]>
Cc Hersen Wu <[email protected]>
Cc Anthony Koo <[email protected]>
Cc Michael Chiu <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -4
index ddc979e3eebe..acd4874e0743 100644
@@ -1356,7 +1356,7 @@ static int dm_late_init(void *handle)
 	unsigned int linear_lut[16];
 	int i;
 	struct dmcu *dmcu = NULL;
-	bool ret = false;
+	bool ret;
 
 	if (!adev->dm.fw_dmcu)
 		return detect_mst_link_for_all_connectors(adev->ddev);
@@ -1377,13 +1377,10 @@ static int dm_late_init(void *handle)
 	 */
 	params.min_abm_backlight = 0x28F;
 
-	/* todo will enable for navi10 */
-	if (adev->asic_type <= CHIP_RAVEN) {
-		ret = dmcu_load_iram(dmcu, params);

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int dm_late_init(void *handle) · line 1386

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -3
+	ret = dmcu_load_iram(dmcu, params);
 
-		if (!ret)
-			return -EINVAL;
-	}
+	if (!ret)
+		return -EINVAL;
 
 	return detect_mst_link_for_all_connectors(adev->ddev);
 }

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

#2 lore raw
Quoted 11 lines · Alexander Monakov
Quoted 4 lines · Harry Wentland

This reverts commit 96cb7cf13d8530099c256c053648ad576588c387.

This change was used for DCN2 bringup and is no longer desired. In fact it breaks backlight on DCN2 systems.

Thanks, Alex.

Just to confirm, this fixes the backlight issue you were seeing?

Harry

Quoted 39 lines

Thanks.

Quoted 37 lines
Cc Alexander Monakov <[email protected]>
Cc Hersen Wu <[email protected]>
Cc Anthony Koo <[email protected]>
Cc Michael Chiu <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -7
index ddc979e3eebe..acd4874e0743 100644
@@ -1356,7 +1356,7 @@ static int dm_late_init(void *handle)
 	unsigned int linear_lut[16];
 	int i;
 	struct dmcu *dmcu = NULL;
-	bool ret = false;
+	bool ret;
 
 	if (!adev->dm.fw_dmcu)
 		return detect_mst_link_for_all_connectors(adev->ddev);
@@ -1377,13 +1377,10 @@ static int dm_late_init(void *handle)
 	 */
 	params.min_abm_backlight = 0x28F;
 
-	/* todo will enable for navi10 */
-	if (adev->asic_type <= CHIP_RAVEN) {
-		ret = dmcu_load_iram(dmcu, params);
+	ret = dmcu_load_iram(dmcu, params);
 
-		if (!ret)
-			return -EINVAL;
-	}
+	if (!ret)
+		return -EINVAL;
 
Quoted 3 lines

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int dm_late_init(void *handle) · line 1386

Quoted 3 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
 	return detect_mst_link_for_all_connectors(adev->ddev);
 }

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

#3 lore raw
Quoted 10 lines · Harry Wentland
Quoted 9 lines · Alexander Monakov
Quoted 4 lines · Harry Wentland

This reverts commit 96cb7cf13d8530099c256c053648ad576588c387.

This change was used for DCN2 bringup and is no longer desired. In fact it breaks backlight on DCN2 systems.

Quoted 6 lines
Quoted 2 lines

Thanks, Alex.

Just to confirm, this fixes the backlight issue you were seeing?

I applied a similar fix to my kernel yesterday, and it worked fine. Tested by changing brightness a few times. If any problems come up, I'll send new reports.

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

#4 lore raw
Quoted 17 lines · Alexander Monakov
Quoted 13 lines · Harry Wentland
Quoted 11 lines · Alexander Monakov
Quoted 4 lines · Harry Wentland

This reverts commit 96cb7cf13d8530099c256c053648ad576588c387.

This change was used for DCN2 bringup and is no longer desired. In fact it breaks backlight on DCN2 systems.

Quoted 8 lines
Quoted 3 lines

Thanks, Alex.

Just to confirm, this fixes the backlight issue you were seeing?

I applied a similar fix to my kernel yesterday, and it worked fine. Tested by changing brightness a few times. If any problems come up, I'll send new reports.

Thanks for the confirmation.

Harry

Quoted 2 lines

Alexander

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

Acked-by on v1 1/1
#5 lore raw
In reply to Harry Wentland
Quoted 11 lines · Harry Wentland

This reverts commit 96cb7cf13d8530099c256c053648ad576588c387.

This change was used for DCN2 bringup and is no longer desired. In fact it breaks backlight on DCN2 systems.

Cc Alexander Monakov <[email protected]>
Cc Hersen Wu <[email protected]>
Cc Anthony Koo <[email protected]>
Cc Michael Chiu <[email protected]>
Quoted 37 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -8
index ddc979e3eebe..acd4874e0743 100644
@@ -1356,7 +1356,7 @@ static int dm_late_init(void *handle)
        unsigned int linear_lut[16];
        int i;
        struct dmcu *dmcu = NULL;
-       bool ret = false;
+       bool ret;
 
        if (!adev->dm.fw_dmcu)
                return detect_mst_link_for_all_connectors(adev->ddev);
@@ -1377,13 +1377,10 @@ static int dm_late_init(void *handle)
         */
        params.min_abm_backlight = 0x28F;
 
-       /* todo will enable for navi10 */
-       if (adev->asic_type <= CHIP_RAVEN) {
-               ret = dmcu_load_iram(dmcu, params);
+       ret = dmcu_load_iram(dmcu, params);
 
-               if (!ret)
-                       return -EINVAL;
-       }
+       if (!ret)
+               return -EINVAL;
 
        return detect_mst_link_for_all_connectors(adev->ddev);
 }
--

2.26.2

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

#6 lore raw
Quoted 7 lines · Alex Deucher
Quoted 6 lines · Harry Wentland

This reverts commit 96cb7cf13d8530099c256c053648ad576588c387.

This change was used for DCN2 bringup and is no longer desired. In fact it breaks backlight on DCN2 systems.

Quoted 7 lines
Quoted 5 lines
Cc Alexander Monakov <[email protected]>
Cc Hersen Wu <[email protected]>
Cc Anthony Koo <[email protected]>
Cc Michael Chiu <[email protected]>
Quoted 38 lines
Quoted 38 lines
---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
  1 file changed, 4 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -8
index ddc979e3eebe..acd4874e0743 100644
@@ -1356,7 +1356,7 @@ static int dm_late_init(void *handle)
         unsigned int linear_lut[16];
         int i;
         struct dmcu *dmcu = NULL;
-       bool ret = false;
+       bool ret;
 
         if (!adev->dm.fw_dmcu)
                 return detect_mst_link_for_all_connectors(adev->ddev);
@@ -1377,13 +1377,10 @@ static int dm_late_init(void *handle)
          */
         params.min_abm_backlight = 0x28F;
 
-       /* todo will enable for navi10 */
-       if (adev->asic_type <= CHIP_RAVEN) {
-               ret = dmcu_load_iram(dmcu, params);
+       ret = dmcu_load_iram(dmcu, params);
 
-               if (!ret)
-                       return -EINVAL;
-       }
+       if (!ret)
+               return -EINVAL;
 
         return detect_mst_link_for_all_connectors(adev->ddev);
  }
--

2.26.2

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