qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: "Akihiko Odaki" <akihiko.odaki@daynix.com>,
	"Huang Rui" <ray.huang@amd.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Gert Wollny" <gert.wollny@collabora.com>,
	qemu-devel@nongnu.org,
	"Gurchetan Singh" <gurchetansingh@chromium.org>,
	"Alyssa Ross" <hi@alyssa.is>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Stefano Stabellini" <stefano.stabellini@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Xenia Ragiadakou" <xenia.ragiadakou@amd.com>,
	"Pierre-Eric Pelloux-Prayer" <pierre-eric.pelloux-prayer@amd.com>,
	"Honglei Huang" <honglei1.huang@amd.com>,
	"Julia Zhang" <julia.zhang@amd.com>,
	"Chen Jiqian" <Jiqian.Chen@amd.com>,
	"Rob Clark" <robdclark@gmail.com>,
	"Yiwei Zhang" <zzyiwei@chromium.org>,
	"Sergio Lopez Pascual" <slp@redhat.com>
Subject: Re: [PATCH v3 4/6] virtio-gpu: Handle virgl fence creation errors
Date: Thu, 31 Oct 2024 10:21:05 +0000	[thread overview]
Message-ID: <871pzwk1ym.fsf@draig.linaro.org> (raw)
In-Reply-To: <20241024233355.136867-5-dmitry.osipenko@collabora.com> (Dmitry Osipenko's message of "Fri, 25 Oct 2024 02:33:52 +0300")

Dmitry Osipenko <dmitry.osipenko@collabora.com> writes:

> Print out error messages when virgl fence creation fails to aid debugging
> of the fence-related bugs.
>
> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
> ---
>  hw/display/virtio-gpu-virgl.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
> index eedae7357f1a..3c564683820b 100644
> --- a/hw/display/virtio-gpu-virgl.c
> +++ b/hw/display/virtio-gpu-virgl.c
> @@ -892,6 +892,7 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
>                                        struct virtio_gpu_ctrl_command *cmd)
>  {
>      bool cmd_suspended = false;
> +    int ret;
>  
>      VIRTIO_GPU_FILL_CMD(cmd->cmd_hdr);
>  
> @@ -990,7 +991,16 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
>      }
>  
>      trace_virtio_gpu_fence_ctrl(cmd->cmd_hdr.fence_id, cmd->cmd_hdr.type);
> -    virgl_renderer_create_fence(cmd->cmd_hdr.fence_id, cmd->cmd_hdr.type);
> +
> +    /*
> +     * Unlike other virglrenderer functions, this one returns a positive
> +     * error code.
> +     */
> +    ret = virgl_renderer_create_fence(cmd->cmd_hdr.fence_id, 0);
> +    if (ret)
> +        qemu_log_mask(LOG_GUEST_ERROR,
> +                      "%s: virgl_renderer_create_fence error: %s",
> +                      __func__, strerror(ret));

braces please. Also if ret is only used for the if leg you might as well
combine it:

  if (virgl_renderer_create_fence(cmd->cmd_hdr.fence_id, 0) != 0) {
    qemu_log_mask(...) 
  }

>  }
>  
>  static void virgl_write_fence(void *opaque, uint32_t fence)

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2024-10-31 10:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-24 23:33 [PATCH v3 0/6] Support virtio-gpu DRM native context Dmitry Osipenko
2024-10-24 23:33 ` [PATCH v3 1/6] ui/sdl2: Restore original context after new context creation Dmitry Osipenko
2024-10-24 23:33 ` [PATCH v3 2/6] ui/sdl2: Implement dpy dmabuf functions Dmitry Osipenko
2024-10-31  7:32   ` Akihiko Odaki
2024-11-09  6:52     ` Dmitry Osipenko
2024-11-09 10:07       ` Akihiko Odaki
2024-11-09 14:39         ` Dmitry Osipenko
2024-10-24 23:33 ` [PATCH v3 3/6] linux-headers: Update to Linux v6.12-rc1 Dmitry Osipenko
2024-10-24 23:33 ` [PATCH v3 4/6] virtio-gpu: Handle virgl fence creation errors Dmitry Osipenko
2024-10-31 10:21   ` Alex Bennée [this message]
2024-11-01 17:16     ` Dmitry Osipenko
2024-10-24 23:33 ` [PATCH v3 5/6] virtio-gpu: Support asynchronous fencing Dmitry Osipenko
2024-10-31  7:44   ` Akihiko Odaki
2024-11-01 17:28     ` Dmitry Osipenko
2024-10-24 23:33 ` [PATCH v3 6/6] virtio-gpu: Support DRM native context Dmitry Osipenko
2024-10-31 10:26   ` Alex Bennée
2024-11-01 17:13     ` Dmitry Osipenko
2024-11-01 19:00       ` Dmitry Osipenko
2024-11-11  5:25     ` Akihiko Odaki
2024-11-13 14:29       ` Dmitry Osipenko

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=871pzwk1ym.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=Jiqian.Chen@amd.com \
    --cc=akihiko.odaki@daynix.com \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dmitry.osipenko@collabora.com \
    --cc=gert.wollny@collabora.com \
    --cc=gurchetansingh@chromium.org \
    --cc=hi@alyssa.is \
    --cc=honglei1.huang@amd.com \
    --cc=julia.zhang@amd.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierre-eric.pelloux-prayer@amd.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ray.huang@amd.com \
    --cc=robdclark@gmail.com \
    --cc=roger.pau@citrix.com \
    --cc=slp@redhat.com \
    --cc=stefano.stabellini@amd.com \
    --cc=xenia.ragiadakou@amd.com \
    --cc=zzyiwei@chromium.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).