Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Show the DPCD read error inline
Date: Wed, 10 Oct 2018 11:33:18 +0300	[thread overview]
Message-ID: <875zyanqup.fsf@intel.com> (raw)
In-Reply-To: <20181010081706.29931-1-chris@chris-wilson.co.uk>

On Wed, 10 Oct 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> When reporting the DPCD dump through debugfs, show the errors inline
> where appropriate. If a read at one particular offset fails, report it
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106371
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

This'll be phased out anyway in favor of using the DP aux device node.

> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 4565eda29c87..00c551d3e409 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -4915,13 +4915,10 @@ static int i915_dpcd_show(struct seq_file *m, void *data)
>  			continue;
>  
>  		err = drm_dp_dpcd_read(&intel_dp->aux, b->offset, buf, size);
> -		if (err <= 0) {
> -			DRM_ERROR("dpcd read (%zu bytes at %u) failed (%zd)\n",
> -				  size, b->offset, err);
> -			continue;
> -		}
> -
> -		seq_printf(m, "%04x: %*ph\n", b->offset, (int) size, buf);
> +		if (err < 0)
> +			seq_printf(m, "%04x: ERROR %d\n", b->offset, (int)err);
> +		else
> +			seq_printf(m, "%04x: %*ph\n", b->offset, (int)err, buf);
>  	}
>  
>  	return 0;

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-10-10  8:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10  8:17 [PATCH] drm/i915: Show the DPCD read error inline Chris Wilson
2018-10-10  8:33 ` Jani Nikula [this message]
2018-10-10 10:25   ` Chris Wilson
2018-10-10  9:31 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-10-10 10:35 ` ✓ Fi.CI.IGT: " Patchwork

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=875zyanqup.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.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