All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Jesse Barnes <jbarnes@virtuousgeek.org>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: provide more error output when mode sets fail
Date: Wed, 20 Jul 2011 01:14:47 +0100	[thread overview]
Message-ID: <e39f63$sj34q@fmsmga002.fm.intel.com> (raw)
In-Reply-To: <1311115136-31474-1-git-send-email-jbarnes@virtuousgeek.org>

On Tue, 19 Jul 2011 15:38:56 -0700, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> If a mode set fails we may get a message from drm_crtc_helper if we're lucky,
> but it won't tell us anything about *why* we failed to set a mode.  So
> add a few DRM_ERRORs for the cases that shouldn't happen so we can debug
> things more easily.

Also fix drm not to simply ignore the error codes would also be useful.
But how does logging the error without logging the state help? Presumably
you are targeting the unreproducible cases?

> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 0f1c799..2434441 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -1934,7 +1934,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
>  
>  	/* no fb bound */
>  	if (!crtc->fb) {
> -		DRM_DEBUG_KMS("No FB bound\n");
> +		DRM_ERROR("No FB bound\n");
>  		return 0;
>  	}

Should this be flagged as en error then?

>  
> @@ -1943,6 +1943,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
>  	case 1:
>  		break;
>  	default:
> +		DRM_ERROR("no plane for crtc\n");
>  		return -EINVAL;
>  	}
>  
> @@ -1952,6 +1953,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
>  					 NULL);
>  	if (ret != 0) {
>  		mutex_unlock(&dev->struct_mutex);
> +		DRM_ERROR("pin & fence failed\n");

In this and the following, report the reason/error code for the failure.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2011-07-20  0:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 22:38 [PATCH] drm/i915: provide more error output when mode sets fail Jesse Barnes
2011-07-20  0:14 ` Chris Wilson [this message]
2011-07-20  0:22   ` Jesse Barnes

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='e39f63$sj34q@fmsmga002.fm.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.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 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.