[PATCH 2/4] drm/xe/guc: Drop redundant logs about invalid G2H length
Matthew Brost
matthew.brost at intel.com
Tue Nov 5 19:31:53 UTC 2024
On Tue, Nov 05, 2024 at 06:30:30PM +0100, Michal Wajdeczko wrote:
> We are now logging details of the failed G2H message (including
> its length) at the GuC CT component. Drop now redundant log from
> the GuC submit code.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Matthew Brost <matthew.brost at intel.com>
Reviewed-by: Matthew Brost <matthew.brost at intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_submit.c | 28 ++++++----------------------
> 1 file changed, 6 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 7afcc243037c..4481890be941 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -1884,15 +1884,12 @@ static void handle_sched_done(struct xe_guc *guc, struct xe_exec_queue *q,
>
> int xe_guc_sched_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
> {
> - struct xe_device *xe = guc_to_xe(guc);
> struct xe_exec_queue *q;
> u32 guc_id = msg[0];
> u32 runnable_state = msg[1];
>
> - if (unlikely(len < 2)) {
> - drm_err(&xe->drm, "Invalid length %u", len);
> + if (unlikely(len < 2))
> return -EPROTO;
> - }
>
> q = g2h_exec_queue_lookup(guc, guc_id);
> if (unlikely(!q))
> @@ -1926,14 +1923,11 @@ static void handle_deregister_done(struct xe_guc *guc, struct xe_exec_queue *q)
>
> int xe_guc_deregister_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
> {
> - struct xe_device *xe = guc_to_xe(guc);
> struct xe_exec_queue *q;
> u32 guc_id = msg[0];
>
> - if (unlikely(len < 1)) {
> - drm_err(&xe->drm, "Invalid length %u", len);
> + if (unlikely(len < 1))
> return -EPROTO;
> - }
>
> q = g2h_exec_queue_lookup(guc, guc_id);
> if (unlikely(!q))
> @@ -1955,14 +1949,11 @@ int xe_guc_deregister_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
> int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len)
> {
> struct xe_gt *gt = guc_to_gt(guc);
> - struct xe_device *xe = guc_to_xe(guc);
> struct xe_exec_queue *q;
> u32 guc_id = msg[0];
>
> - if (unlikely(len < 1)) {
> - drm_err(&xe->drm, "Invalid length %u", len);
> + if (unlikely(len < 1))
> return -EPROTO;
> - }
>
> q = g2h_exec_queue_lookup(guc, guc_id);
> if (unlikely(!q))
> @@ -2002,10 +1993,8 @@ int xe_guc_error_capture_handler(struct xe_guc *guc, u32 *msg, u32 len)
> {
> u32 status;
>
> - if (unlikely(len != XE_GUC_ACTION_STATE_CAPTURE_NOTIFICATION_DATA_LEN)) {
> - xe_gt_dbg(guc_to_gt(guc), "Invalid length %u", len);
> + if (unlikely(len != XE_GUC_ACTION_STATE_CAPTURE_NOTIFICATION_DATA_LEN))
> return -EPROTO;
> - }
>
> status = msg[0] & XE_GUC_STATE_CAPTURE_EVENT_STATUS_MASK;
> if (status == XE_GUC_STATE_CAPTURE_EVENT_STATUS_NOSPACE)
> @@ -2020,14 +2009,11 @@ int xe_guc_exec_queue_memory_cat_error_handler(struct xe_guc *guc, u32 *msg,
> u32 len)
> {
> struct xe_gt *gt = guc_to_gt(guc);
> - struct xe_device *xe = guc_to_xe(guc);
> struct xe_exec_queue *q;
> u32 guc_id = msg[0];
>
> - if (unlikely(len < 1)) {
> - drm_err(&xe->drm, "Invalid length %u", len);
> + if (unlikely(len < 1))
> return -EPROTO;
> - }
>
> q = g2h_exec_queue_lookup(guc, guc_id);
> if (unlikely(!q))
> @@ -2052,10 +2038,8 @@ int xe_guc_exec_queue_reset_failure_handler(struct xe_guc *guc, u32 *msg, u32 le
> u8 guc_class, instance;
> u32 reason;
>
> - if (unlikely(len != 3)) {
> - drm_err(&xe->drm, "Invalid length %u", len);
> + if (unlikely(len != 3))
> return -EPROTO;
> - }
>
> guc_class = msg[0];
> instance = msg[1];
> --
> 2.43.0
>
More information about the Intel-xe
mailing list