Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01e28f9c authored by Michel Dänzer's avatar Michel Dänzer Committed by Alex Deucher
Browse files

amdgpu/dm: Don't use DRM_ERROR in amdgpu_dm_atomic_check



The atomic_check hook is expected to fail in some cases, e.g. if the
modeset operation requested by userspace cannot be performed, so it must
not spam dmesg on failure.

Fixes spurious

 [drm:amdgpu_dm_atomic_check [amdgpu]] *ERROR* Atomic state validation failed with error :-35 !

error messages on DPMS off with CONFIG_DEBUG_WW_MUTEX_SLOWPATH enabled.

While we're at it, fix up the existing DRM_DEBUG_DRIVER strings.

Signed-off-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f368d3bf
Loading
Loading
Loading
Loading
+5 −7
Original line number Original line Diff line number Diff line
@@ -4662,10 +4662,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
	bool lock_and_validation_needed = false;
	bool lock_and_validation_needed = false;


	ret = drm_atomic_helper_check_modeset(dev, state);
	ret = drm_atomic_helper_check_modeset(dev, state);
	if (ret) {
	if (ret)
		DRM_ERROR("Atomic state validation failed with error :%d !\n", ret);
		goto fail;
		return ret;
	}


	/*
	/*
	 * legacy_cursor_update should be made false for SoC's having
	 * legacy_cursor_update should be made false for SoC's having
@@ -4782,11 +4780,11 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,


fail:
fail:
	if (ret == -EDEADLK)
	if (ret == -EDEADLK)
		DRM_DEBUG_DRIVER("Atomic check stopped due to to deadlock.\n");
		DRM_DEBUG_DRIVER("Atomic check stopped to avoid deadlock.\n");
	else if (ret == -EINTR || ret == -EAGAIN || ret == -ERESTARTSYS)
	else if (ret == -EINTR || ret == -EAGAIN || ret == -ERESTARTSYS)
		DRM_DEBUG_DRIVER("Atomic check stopped due to to signal.\n");
		DRM_DEBUG_DRIVER("Atomic check stopped due to signal.\n");
	else
	else
		DRM_ERROR("Atomic check failed with err: %d \n", ret);
		DRM_DEBUG_DRIVER("Atomic check failed with err: %d \n", ret);


	return ret;
	return ret;
}
}