Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp832873imu; Fri, 21 Dec 2018 08:06:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN5ltuNYpihytGd3JsKo4mmgP9acKEZkHMMGNu8ivKPTtHDIbkj/VV6bmjz/exy4hZTa6HmQ X-Received: by 2002:a63:2109:: with SMTP id h9mr2932586pgh.277.1545408396993; Fri, 21 Dec 2018 08:06:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545408396; cv=none; d=google.com; s=arc-20160816; b=Lfu9Q8EHlHwZ1iV0xkN4TIN0vtOkROqjJZ6NDe4LkLsT66lOf+njeow4pqK5XptJjV PYcbS9RBSQ88QYgA8/C9zoYhL5/FrYpSmsNRpWXEJ6O1RcsyBV+DhEV73jrwYPXlBd9Y qtzXRDZia/pNFaQiWhyvOwVNGS88eWb43orPXPfTV9cPZa43MVXt1F+LN3Ez3s4JpT+Y gJkE6Yu5nv/+CASqmGT2pf5ROv85ZbaEAR8KAMlUBZ7VMnIwo6Q1M2BJxtXOefYL3ApE JefNybx/y0wCiWRtyVFOmiRLXNVzTGoyQKuzLTPD7PCCg0Ot3jrAhAN8LAPDmakWzqg9 IIZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=EZY0VwWEPq9uTwm+I+YKStnf5E+WhmoJ6xAAPWM1I/w=; b=nv+DhsJ2tdm3H7nd+dHiITfskTuDibPFl9kMe9CXcgB4wrNTi9dqsTZuAyODH2JDHj 3/we2iANGjahQ6d70I5NMt8mzl4ygaYo8HTni/uQaLQBGvzLXn4lXuGhXiVEWZnqxnnV 9+CuLf9lSIqj2hLGuStaS0e/3DicAgLKsx+tF1eZQamoA1OEZTD5YyS5JAMInI0BVDti 7/tEhEyKJY/2FbL3/yPrh2TQLsSJP9vLJGgghCTGbCmlKWD6Ab+7OuI7Zj+ToLol2HfI qy0C7RliARkqWYpPIyRLZwrVRa5FCbQ/+NtxDo5PasL9mkE6pS2UiqvPRIBLAb4/fnoT eBQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qrbanMnj; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4si22173709pfg.280.2018.12.21.08.06.21; Fri, 21 Dec 2018 08:06:36 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qrbanMnj; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389207AbeLUKAF (ORCPT + 99 others); Fri, 21 Dec 2018 05:00:05 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:44351 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389173AbeLUJ76 (ORCPT ); Fri, 21 Dec 2018 04:59:58 -0500 Received: by mail-lj1-f193.google.com with SMTP id k19-v6so4168343lji.11 for ; Fri, 21 Dec 2018 01:59:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=EZY0VwWEPq9uTwm+I+YKStnf5E+WhmoJ6xAAPWM1I/w=; b=qrbanMnj85ZJP9DYVhhqsFw+/rgj714z/fFezJnbkAOS7RKW6kApRjly++TtwFBE3a aAT/p1MK1xVAL2/SZaB4jYjZyK/gjl9Pw8fOqK3rZzuYFw1A63Vu3M14QTVgqh84j6kl VeFn4GWGA18A1Q23V/5XZ3Sp6JtBTRf4QBbnuxIRPRoweS5ChiJdZTtyrQTICTptMNG6 8JBwjNuTEd+WvtLLYX7DS33Ijx108c25pWq/F/uLvQ0ewcS8zb3OOpNb6mkJJKqSny3d GNxUbSaXKHkLdkUH6x0J/KEEHmExSY2+pz9vJvWW4vTpp1oVuJ517IuRbwpHTUqES0Oi 9R3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=EZY0VwWEPq9uTwm+I+YKStnf5E+WhmoJ6xAAPWM1I/w=; b=m+kSkGQciKmm5O9/T38W9GiFlkd43ssyZxwkpAGcZW7h8yS3ESKg5tAfSMNKu8CmCW AZfbJZKbpUDLrSQG8mCRF23t10hlgRv4bnxw16UNGCsBXLZNkl0FsfKrBaCL+UuIV9HO upUL9Y16mStbHtnSO/CzKn9i+odG8SaTk+8Yq4+1kUHi7Qt9opQNISDulEiob+1lfwhx uYUt1ky3BRLvL9tUF7kFL4Hu5UdmGG9MikFlLH5PA1bRdkOvMTNlvoflI+b20W7ut0Lu w6gAJrBBI/mr3x6eQf2Fo0JIM3uwtXMsWFfBPjd6nxR2g10TrbYtx/9U2S/nPn5XJEBj 3JSA== X-Gm-Message-State: AJcUukeYzkEfpP2BMXgIXhJ86eRIMHjTh4q9lQipmny6N2/7gApcB8hX qbEewfrg7C1ELIZGFlIWj74= X-Received: by 2002:a2e:7801:: with SMTP id t1-v6mr1156210ljc.84.1545386395371; Fri, 21 Dec 2018 01:59:55 -0800 (PST) Received: from [10.17.182.20] (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id f16-v6sm4647652lji.88.2018.12.21.01.59.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Dec 2018 01:59:54 -0800 (PST) Subject: Re: [PATCH 01/10] drm/virtio: log error responses To: Gerd Hoffmann , dri-devel@lists.freedesktop.org, David Airlie Cc: David Airlie , open list , "open list:VIRTIO GPU DRIVER" References: <20181219122708.4586-1-kraxel@redhat.com> <20181219122708.4586-2-kraxel@redhat.com> From: Oleksandr Andrushchenko Message-ID: <7af5ce00-d751-5c21-51f9-fdea793fd57b@gmail.com> Date: Fri, 21 Dec 2018 11:59:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181219122708.4586-2-kraxel@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/19/18 2:26 PM, Gerd Hoffmann wrote: > If we got an error response code from the host, print it to the log. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko > --- > 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); >