linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>,
	dri-devel@lists.freedesktop.org,
	David Airlie <airlied@redhat.com>
Cc: David Airlie <airlied@linux.ie>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:VIRTIO GPU DRIVER" 
	<virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH 01/10] drm/virtio: log error responses
Date: Fri, 21 Dec 2018 11:59:53 +0200	[thread overview]
Message-ID: <7af5ce00-d751-5c21-51f9-fdea793fd57b@gmail.com> (raw)
In-Reply-To: <20181219122708.4586-2-kraxel@redhat.com>

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 <kraxel@redhat.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> ---
>   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);
>   


  reply	other threads:[~2018-12-21 10:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181219122708.4586-1-kraxel@redhat.com>
2018-12-19 12:26 ` [PATCH 01/10] drm/virtio: log error responses Gerd Hoffmann
2018-12-21  9:59   ` Oleksandr Andrushchenko [this message]
2018-12-19 12:27 ` [PATCH 02/10] drm/virtio: fix pageflip flush Gerd Hoffmann
2019-01-02 17:09   ` Ezequiel Garcia
2018-12-19 12:27 ` [PATCH 03/10] drm/virtio: drop virtio_gpu_fence_cleanup() Gerd Hoffmann
2019-01-02 17:10   ` Ezequiel Garcia
2018-12-19 12:27 ` [PATCH 04/10] drm/virtio: move virtio_gpu_object_{attach,detach} calls Gerd Hoffmann
2018-12-19 12:27 ` [PATCH 05/10] drm/virtio: use struct to pass params to virtio_gpu_object_create() Gerd Hoffmann
2019-01-02 17:12   ` Ezequiel Garcia
2018-12-19 12:27 ` [PATCH 06/10] drm/virtio: params struct for virtio_gpu_cmd_create_resource() Gerd Hoffmann
2018-12-19 12:27 ` [PATCH 07/10] drm/virtio: params struct for virtio_gpu_cmd_create_resource_3d() Gerd Hoffmann
2018-12-19 12:27 ` [PATCH 08/10] drm/virtio: drop fencing in virtio_gpu_resource_create_ioctl Gerd Hoffmann
2018-12-19 12:27 ` [PATCH 09/10] drm/virtio: move virtio_gpu_cmd_create_resource call into virtio_gpu_object_create Gerd Hoffmann
2018-12-19 12:27 ` [PATCH 10/10] drm/virtio: ditch virtio_gpu_object_attach() calls Gerd Hoffmann

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=7af5ce00-d751-5c21-51f9-fdea793fd57b@gmail.com \
    --to=andr2000@gmail.com \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).