AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <harry.wentland-5C7GfCeVMHo@public.gmane.org>
To: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: dc_upstream-5C7GfCeVMHo@public.gmane.org
Subject: Re: [PATCH] amdgpu/dm: Don't use DRM_ERROR in amdgpu_dm_atomic_check
Date: Thu, 9 Nov 2017 14:14:22 -0500	[thread overview]
Message-ID: <18a9f1ac-e58e-d00a-07a2-0ba9c0d9c7bb@amd.com> (raw)
In-Reply-To: <20171109173809.2865-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>

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

      parent reply	other threads:[~2017-11-09 19:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18a9f1ac-e58e-d00a-07a2-0ba9c0d9c7bb@amd.com \
    --to=harry.wentland-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=dc_upstream-5C7GfCeVMHo@public.gmane.org \
    --cc=michel-otUistvHUpPR7s880joybQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox