All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Piotr Piórkowski" <piotr.piorkowski@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 4/5] drm/i915/guc: Switch to CT_ERROR in ct_read
Date: Fri, 17 Jan 2020 10:51:24 +0100	[thread overview]
Message-ID: <20200117095124.GA15960@intel.com> (raw)
In-Reply-To: <20200117082039.65644-5-michal.wajdeczko@intel.com>

Michal Wajdeczko <michal.wajdeczko@intel.com> wrote on pią [2020-sty-17 08:20:38 +0000]:
> As we now have "ct" available in ct_read function we can switch
> from generic DRM_ERROR to our custom CT_ERROR.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> index b84b6ec37b8d..09467728bc9b 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> @@ -620,12 +620,12 @@ static int ct_read(struct intel_guc_ct *ct, u32 *data)
>  	/* message len with header */
>  	len = ct_header_get_len(data[0]) + 1;
>  	if (unlikely(len > (u32)available)) {
> -		DRM_ERROR("CT: incomplete message %*ph %*ph %*ph\n",
> -			  4, data,
> -			  4 * (head + available - 1 > size ?
> -			       size - head : available - 1), &cmds[head],
> -			  4 * (head + available - 1 > size ?
> -			       available - 1 - size + head : 0), &cmds[0]);
> +		CT_ERROR(ct, "Incomplete message %*ph %*ph %*ph\n",
> +			 4, data,
> +			 4 * (head + available - 1 > size ?
> +			      size - head : available - 1), &cmds[head],
> +			 4 * (head + available - 1 > size ?
> +			      available - 1 - size + head : 0), &cmds[0]);
>  		goto corrupted;
>  	}
>  
> @@ -639,8 +639,8 @@ static int ct_read(struct intel_guc_ct *ct, u32 *data)
>  	return 0;
>  
>  corrupted:
> -	DRM_ERROR("CT: Corrupted descriptor addr=%#x head=%u tail=%u size=%u\n",
> -		  desc->addr, desc->head, desc->tail, desc->size);
> +	CT_ERROR(ct, "Corrupted descriptor addr=%#x head=%u tail=%u size=%u\n",
> +		 desc->addr, desc->head, desc->tail, desc->size);
>  	desc->is_in_error = 1;
>  	return -EPIPE;
>  }

LGTM 
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>

> -- 
> 2.19.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-01-17  9:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17  8:20 [Intel-gfx] [PATCH v2 0/5] Misc GuC CT improvements - part II Michal Wajdeczko
2020-01-17  8:20 ` [Intel-gfx] [PATCH v2 1/5] drm/i915/guc: Don't GEM_BUG_ON on corrupted G2H CTB Michal Wajdeczko
2020-01-17  8:20 ` [Intel-gfx] [PATCH v2 2/5] drm/i915/guc: Don't pass CTB while writing Michal Wajdeczko
2020-01-17  8:20 ` [Intel-gfx] [PATCH v2 3/5] drm/i915/guc: Don't pass CTB while reading Michal Wajdeczko
2020-01-17  8:20 ` [Intel-gfx] [PATCH v2 4/5] drm/i915/guc: Switch to CT_ERROR in ct_read Michal Wajdeczko
2020-01-17  9:51   ` Piotr Piórkowski [this message]
2020-01-17  8:20 ` [Intel-gfx] [PATCH v2 5/5] drm/i915/guc: Introduce CT_DEBUG Michal Wajdeczko
2020-01-17  8:51 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Misc GuC CT improvements - part II (rev2) Patchwork
2020-01-17  9:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-01-17  9:16 ` [Intel-gfx] ✗ Fi.CI.BUILD: warning " Patchwork
2020-01-20 11:30 ` [Intel-gfx] ✓ Fi.CI.IGT: success " 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=20200117095124.GA15960@intel.com \
    --to=piotr.piorkowski@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=michal.wajdeczko@intel.com \
    /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.