All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] amdgpu/dm: Don't use DRM_ERROR in amdgpu_dm_atomic_check
@ 2017-11-09 17:38 Michel Dänzer
       [not found] ` <20171109173809.2865-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Michel Dänzer @ 2017-11-09 17:38 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: dc_upstream-5C7GfCeVMHo

From: Michel Dänzer <michel.daenzer@amd.com>

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: Michel Dänzer <michel.daenzer@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index ccfbf14c0f09..ed8b7524b741 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4691,10 +4691,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
 	bool lock_and_validation_needed = false;
 
 	ret = drm_atomic_helper_check_modeset(dev, state);
-	if (ret) {
-		DRM_ERROR("Atomic state validation failed with error :%d !\n", ret);
-		return ret;
-	}
+	if (ret)
+		goto fail;
 
 	/*
 	 * legacy_cursor_update should be made false for SoC's having
@@ -4811,11 +4809,11 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
 
 fail:
 	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)
-		DRM_DEBUG_DRIVER("Atomic check stopped due to to signal.\n");
+		DRM_DEBUG_DRIVER("Atomic check stopped due to signal.\n");
 	else
-		DRM_ERROR("Atomic check failed with err: %d \n", ret);
+		DRM_DEBUG_DRIVER("Atomic check failed with err: %d \n", ret);
 
 	return ret;
 }
-- 
2.15.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] amdgpu/dm: Don't use DRM_ERROR in amdgpu_dm_atomic_check
       [not found] ` <20171109173809.2865-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2017-11-09 17:58   ` Alex Deucher
  2017-11-09 19:14   ` Harry Wentland
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2017-11-09 17:58 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: dc_upstream-5C7GfCeVMHo, amd-gfx list

On Thu, Nov 9, 2017 at 12:38 PM, Michel Dänzer <michel@daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> 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: Michel Dänzer <michel.daenzer@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index ccfbf14c0f09..ed8b7524b741 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4691,10 +4691,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
>         bool lock_and_validation_needed = false;
>
>         ret = drm_atomic_helper_check_modeset(dev, state);
> -       if (ret) {
> -               DRM_ERROR("Atomic state validation failed with error :%d !\n", ret);
> -               return ret;
> -       }
> +       if (ret)
> +               goto fail;
>
>         /*
>          * legacy_cursor_update should be made false for SoC's having
> @@ -4811,11 +4809,11 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
>
>  fail:
>         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)
> -               DRM_DEBUG_DRIVER("Atomic check stopped due to to signal.\n");
> +               DRM_DEBUG_DRIVER("Atomic check stopped due to signal.\n");
>         else
> -               DRM_ERROR("Atomic check failed with err: %d \n", ret);
> +               DRM_DEBUG_DRIVER("Atomic check failed with err: %d \n", ret);
>
>         return ret;
>  }
> --
> 2.15.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] amdgpu/dm: Don't use DRM_ERROR in amdgpu_dm_atomic_check
       [not found] ` <20171109173809.2865-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
  2017-11-09 17:58   ` Alex Deucher
@ 2017-11-09 19:14   ` Harry Wentland
  1 sibling, 0 replies; 3+ messages in thread
From: Harry Wentland @ 2017-11-09 19:14 UTC (permalink / raw)
  To: Michel Dänzer, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: dc_upstream-5C7GfCeVMHo

On 2017-11-09 12:38 PM, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer@amd.com>
> 
> 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: Michel Dänzer <michel.daenzer@amd.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index ccfbf14c0f09..ed8b7524b741 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4691,10 +4691,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
>  	bool lock_and_validation_needed = false;
>  
>  	ret = drm_atomic_helper_check_modeset(dev, state);
> -	if (ret) {
> -		DRM_ERROR("Atomic state validation failed with error :%d !\n", ret);
> -		return ret;
> -	}
> +	if (ret)
> +		goto fail;
>  
>  	/*
>  	 * legacy_cursor_update should be made false for SoC's having
> @@ -4811,11 +4809,11 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
>  
>  fail:
>  	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)
> -		DRM_DEBUG_DRIVER("Atomic check stopped due to to signal.\n");
> +		DRM_DEBUG_DRIVER("Atomic check stopped due to signal.\n");
>  	else
> -		DRM_ERROR("Atomic check failed with err: %d \n", ret);
> +		DRM_DEBUG_DRIVER("Atomic check failed with err: %d \n", ret);
>  
>  	return ret;
>  }
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-09 19:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09 17:38 [PATCH] amdgpu/dm: Don't use DRM_ERROR in amdgpu_dm_atomic_check Michel Dänzer
     [not found] ` <20171109173809.2865-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-11-09 17:58   ` Alex Deucher
2017-11-09 19:14   ` Harry Wentland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.