Commit d624d401 authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Chris Wilson

drm/i915/guc: Switch to CT_ERROR in ct_read

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: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: default avatarPiotr Piórkowski <piotr.piorkowski@intel.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200117082039.65644-5-michal.wajdeczko@intel.com
parent 235198d7
...@@ -617,12 +617,12 @@ static int ct_read(struct intel_guc_ct *ct, u32 *data) ...@@ -617,12 +617,12 @@ static int ct_read(struct intel_guc_ct *ct, u32 *data)
/* message len with header */ /* message len with header */
len = ct_header_get_len(data[0]) + 1; len = ct_header_get_len(data[0]) + 1;
if (unlikely(len > (u32)available)) { if (unlikely(len > (u32)available)) {
DRM_ERROR("CT: incomplete message %*ph %*ph %*ph\n", CT_ERROR(ct, "Incomplete message %*ph %*ph %*ph\n",
4, data, 4, data,
4 * (head + available - 1 > size ? 4 * (head + available - 1 > size ?
size - head : available - 1), &cmds[head], size - head : available - 1), &cmds[head],
4 * (head + available - 1 > size ? 4 * (head + available - 1 > size ?
available - 1 - size + head : 0), &cmds[0]); available - 1 - size + head : 0), &cmds[0]);
goto corrupted; goto corrupted;
} }
...@@ -636,8 +636,8 @@ static int ct_read(struct intel_guc_ct *ct, u32 *data) ...@@ -636,8 +636,8 @@ static int ct_read(struct intel_guc_ct *ct, u32 *data)
return 0; return 0;
corrupted: corrupted:
DRM_ERROR("CT: Corrupted descriptor addr=%#x head=%u tail=%u size=%u\n", CT_ERROR(ct, "Corrupted descriptor addr=%#x head=%u tail=%u size=%u\n",
desc->addr, desc->head, desc->tail, desc->size); desc->addr, desc->head, desc->tail, desc->size);
desc->is_in_error = 1; desc->is_in_error = 1;
return -EPIPE; return -EPIPE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment