From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm/i915: provide more error output when mode sets fail Date: Wed, 20 Jul 2011 01:14:47 +0100 Message-ID: References: <1311115136-31474-1-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 839F59F030 for ; Tue, 19 Jul 2011 17:14:50 -0700 (PDT) In-Reply-To: <1311115136-31474-1-git-send-email-jbarnes@virtuousgeek.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Jesse Barnes , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, 19 Jul 2011 15:38:56 -0700, Jesse Barnes 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 > --- > 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