Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5054270imu; Wed, 19 Dec 2018 05:00:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xgso7MaQxrJ58oYfCgKlYPbbflunhMuAeTFOOoJp0CVXiWwMwC5kFUTFD80l6YCXVa/n5J X-Received: by 2002:a63:594d:: with SMTP id j13mr19202572pgm.210.1545224430226; Wed, 19 Dec 2018 05:00:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545224430; cv=none; d=google.com; s=arc-20160816; b=unflVuYn80RhrfM8haTO1ltG5eeKvb3fU61O2BhZzUemQaaD1vfw9HPjZbftsIuJY2 H7WAHpvtQjX5EaE4BZmbf+nez+3Re5qpKCvBwO13InodAcDytaN3JosJ2VI6m1/ArM6p KS5CrR3mIvkdkzdhBRyQt9pFqr0Q6fInBP8+Cf1A08Q69OqYbM1A2lK2m/TAhuTAIVro dMseKh86ib32056tlEAT/l1sxGYb0346PAwqjsf1zzZpWy6G8ImEcVuirH/I8hKnpyX2 V/GFi7XjlkqbdyOvTCPQdA1ajIrONPJVB6x+STJQrwmbDsAF/f/KZ3hrwULM2BnXOt9w NMSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=IGsVDFxhEzZ1sPckc8MWUXI+8PJmzuLu0KVpvcpa6dQ=; b=OtmK07k3Yn8j7uY04pyI+M0k/ACyhhTuhzZbn4eBZ81I6yGt3ppEkR9l/GdgxzhqAO 7LzaoHQUFg8gaBOahAWjrirnGEKGhBoqWTkJMlXlydmD1FxeVSGETTxjOzNdwbEJsWVy Lc/Bs5r+IdNjQ53ki9XopeTJ81HrgV51JSrtFtxxEPke/sOPHn8Cg0hwAXuYp9mZOg6F Xxp1I25Lm7pM7hh14J7ygOywdsIGpHhfCn2iw1YkyoTkTSN3sndQTFCe206X0zPmdRu8 /f8BdzRAjA9A0yHhv4RVuAlhMWLuNjBT8LgLuu/RFC9/22hWEtMC4JU4R8Zw5oH/im0x /n8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s59si98913plb.350.2018.12.19.05.00.13; Wed, 19 Dec 2018 05:00:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728722AbeLSM1M (ORCPT + 99 others); Wed, 19 Dec 2018 07:27:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42788 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727151AbeLSM1M (ORCPT ); Wed, 19 Dec 2018 07:27:12 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3390A2BE87; Wed, 19 Dec 2018 12:27:12 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-174.ams2.redhat.com [10.36.117.174]) by smtp.corp.redhat.com (Postfix) with ESMTP id CDA8727C48; Wed, 19 Dec 2018 12:27:09 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 014377503; Wed, 19 Dec 2018 13:27:09 +0100 (CET) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org, David Airlie Cc: Gerd Hoffmann , David Airlie , virtualization@lists.linux-foundation.org (open list:VIRTIO GPU DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 01/10] drm/virtio: log error responses Date: Wed, 19 Dec 2018 13:26:59 +0100 Message-Id: <20181219122708.4586-2-kraxel@redhat.com> In-Reply-To: <20181219122708.4586-1-kraxel@redhat.com> References: <20181219122708.4586-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 19 Dec 2018 12:27:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If we got an error response code from the host, print it to the log. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_vq.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index e27c4aedb8..6bc2008b0d 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -192,8 +192,16 @@ void virtio_gpu_dequeue_ctrl_func(struct work_struct *work) list_for_each_entry_safe(entry, tmp, &reclaim_list, list) { resp = (struct virtio_gpu_ctrl_hdr *)entry->resp_buf; - if (resp->type != cpu_to_le32(VIRTIO_GPU_RESP_OK_NODATA)) - DRM_DEBUG("response 0x%x\n", le32_to_cpu(resp->type)); + if (resp->type != cpu_to_le32(VIRTIO_GPU_RESP_OK_NODATA)) { + if (resp->type >= cpu_to_le32(VIRTIO_GPU_RESP_ERR_UNSPEC)) { + struct virtio_gpu_ctrl_hdr *cmd; + cmd = (struct virtio_gpu_ctrl_hdr *)entry->buf; + DRM_ERROR("response 0x%x (command 0x%x)\n", + le32_to_cpu(resp->type), + le32_to_cpu(cmd->type)); + } else + DRM_DEBUG("response 0x%x\n", le32_to_cpu(resp->type)); + } if (resp->flags & cpu_to_le32(VIRTIO_GPU_FLAG_FENCE)) { u64 f = le64_to_cpu(resp->fence_id); -- 2.9.3