Skip to contentSkip to conversation

amd/display: downgrade validation failure log level

PATCH Applied Simon Ser 3 participants 3 messages Sep 7, 2021

Subsystems (3)
lore
Share & tools
lore

Simon Ser

author
#0 lore raw

PATCH 1/1 amd/display: downgrade validation failure log level

In amdgpu_dm_atomic_check, dc_validate_global_state is called. On failure this logs a warning to the kernel journal. However warnings shouldn't be used for atomic test-only commit failures: user-space might be perfoming a lot of atomic test-only commits to find the best hardware configuration.

Downgrade the log to a regular DRM atomic message. While at it, use the new device-aware logging infrastructure.

This fixes error messages in the kernel when running gamescope [1].

[1]: https://github.com/Plagman/gamescope/issues/245

Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Nicholas Kazlauskas <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -1
index 986c9d29d686..6f3b6f2a952c 100644
@@ -10467,7 +10467,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
 			goto fail;
 		status = dc_validate_global_state(dc, dm_state->context, false);
 		if (status != DC_OK) {
-			DC_LOG_WARNING("DC global validation failure: %s (%d)",
+			drm_dbg_atomic(dev,
+				       "DC global validation failure: %s (%d)",
 				       dc_status_to_str(status), status);
 			ret = -EINVAL;
 			goto fail;
Signature · 1 line
2.33.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Simon Ser

In amdgpu_dm_atomic_check, dc_validate_global_state is called. On failure this logs a warning to the kernel journal. However warnings shouldn't be used for atomic test-only commit failures: user-space might be perfoming a lot of atomic test-only commits to find the best hardware configuration.

Downgrade the log to a regular DRM atomic message. While at it, use the new device-aware logging infrastructure.

Quoted 8 lines

This fixes error messages in the kernel when running gamescope [1].

[1]: https://github.com/Plagman/gamescope/issues/245

Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Nicholas Kazlauskas <[email protected]>

Makes sense since validation can fail. Thanks for the patch!

Regards,
Nicholas Kazlauskas

Quoted 19 lines
---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -1
index 986c9d29d686..6f3b6f2a952c 100644
@@ -10467,7 +10467,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
  			goto fail;
  		status = dc_validate_global_state(dc, dm_state->context, false);
  		if (status != DC_OK) {
-			DC_LOG_WARNING("DC global validation failure: %s (%d)",
+			drm_dbg_atomic(dev,
+				       "DC global validation failure: %s (%d)",
  				       dc_status_to_str(status), status);
  			ret = -EINVAL;
  			goto fail;
Applied
#2 lore raw

Applied. Thanks!

Alex

Quoted 47 lines · Nicholas
Quoted 9 lines · Simon Ser

In amdgpu_dm_atomic_check, dc_validate_global_state is called. On failure this logs a warning to the kernel journal. However warnings shouldn't be used for atomic test-only commit failures: user-space might be perfoming a lot of atomic test-only commits to find the best hardware configuration.

Downgrade the log to a regular DRM atomic message. While at it, use the new device-aware logging infrastructure.

Quoted 8 lines

This fixes error messages in the kernel when running gamescope [1].

[1]: https://github.com/Plagman/gamescope/issues/245

Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Nicholas Kazlauskas <[email protected]>

Makes sense since validation can fail. Thanks for the patch!

Regards,
Nicholas Kazlauskas

Quoted 19 lines
---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -1
index 986c9d29d686..6f3b6f2a952c 100644
@@ -10467,7 +10467,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
                      goto fail;
              status = dc_validate_global_state(dc, dm_state->context, false);
              if (status != DC_OK) {
-                     DC_LOG_WARNING("DC global validation failure: %s (%d)",
+                     drm_dbg_atomic(dev,
+                                    "DC global validation failure: %s (%d)",
                                     dc_status_to_str(status), status);
                      ret = -EINVAL;
                      goto fail;