From: Emil Velikov <emil.velikov@collabora.com>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: "Pierre-Eric Pelloux-Prayer" <pierre-eric.pelloux-prayer@amd.com>,
"Marek Olšák" <maraeo@gmail.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
"Gurchetan Singh" <gurchetansingh@chromium.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"David Airlie" <airlied@redhat.com>,
kernel@collabora.com, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH v4 1/2] drm/virtio: Refactor job submission code path
Date: Thu, 30 Mar 2023 16:32:11 +0100 [thread overview]
Message-ID: <ZCWre6oy0vHNyIkW@arch-x395> (raw)
In-Reply-To: <20230323230755.1094832-2-dmitry.osipenko@collabora.com>
Hey Dmitry,
On 2023/03/24, Dmitry Osipenko wrote:
> Move virtio_gpu_execbuffer_ioctl() into separate virtgpu_submit.c file
> and refactor the code along the way to ease addition of new features to
> the ioctl.
>
At a glance, we have a handful of no-op as well as some functional
changes - let's split those up in separate patches.
> Reviewed-by: Rob Clark <robdclark@gmail.com>
> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
> ---
> +static int virtio_gpu_dma_fence_wait(struct virtio_gpu_submit *submit,
> + struct dma_fence *fence)
> +{
> + struct dma_fence_unwrap itr;
> + struct dma_fence *f;
> + int err;
> +
> + dma_fence_unwrap_for_each(f, &itr, fence) {
The dma_fence_unwrap_for_each() change should be a separate patch,
highlighting why we want it.
> + err = virtio_gpu_do_fence_wait(submit, f);
> + if (err)
> + return err;
> + }
> +
> + return 0;
> +}
> +
> + ret = virtio_gpu_init_submit(&submit, exbuf, dev, file,
> + fence_ctx, ring_idx);
> + if (ret)
> + goto cleanup;
> +
> + ret = virtio_gpu_wait_in_fence(&submit);
> + if (ret)
> + goto cleanup;
> +
We have reshuffled the order around in_fence waiting, out_fence install,
handles, cmdbuf, drm events, etc. Can we get that split up a bit, with
some comments.
If it were me, I would keep the wait_in_fence early and inline
virtio_gpu_init_submit (the nesting/abstraction seems a bit much). This
means one can omit the virtio_gpu_submit::exbuf all together.
HTH
Emil
next prev parent reply other threads:[~2023-03-30 15:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 23:07 [PATCH v4 0/2] Add sync object UAPI support to VirtIO-GPU driver Dmitry Osipenko
2023-03-23 23:07 ` [PATCH v4 1/2] drm/virtio: Refactor job submission code path Dmitry Osipenko
2023-03-30 15:32 ` Emil Velikov [this message]
2023-04-03 19:59 ` Dmitry Osipenko
2023-03-23 23:07 ` [PATCH v4 2/2] drm/virtio: Support sync objects Dmitry Osipenko
2023-03-30 17:24 ` Emil Velikov
2023-04-02 17:45 ` Dmitry Osipenko
2023-04-03 13:00 ` Emil Velikov
2023-04-03 13:22 ` Emil Velikov
2023-04-03 15:07 ` 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=ZCWre6oy0vHNyIkW@arch-x395 \
--to=emil.velikov@collabora.com \
--cc=airlied@redhat.com \
--cc=dmitry.osipenko@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=kernel@collabora.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maraeo@gmail.com \
--cc=pierre-eric.pelloux-prayer@amd.com \
--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