From: Daniel Vetter <daniel@ffwll.ch>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: David Airlie <airlied@linux.ie>,
open list <linux-kernel@vger.kernel.org>,
Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org,
"open list:VIRTIO GPU DRIVER"
<virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH 1/4] drm/virtio: pass gem reservation object to ttm init
Date: Mon, 17 Jun 2019 16:08:25 +0200 [thread overview]
Message-ID: <20190617140825.GD12905@phenom.ffwll.local> (raw)
In-Reply-To: <20190617111406.14765-2-kraxel@redhat.com>
On Mon, Jun 17, 2019 at 01:14:03PM +0200, Gerd Hoffmann wrote:
> With this gem and ttm will use the same reservation object,
> so mixing and matching ttm / gem reservation helpers should
> work fine.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
While doing my prime doc+cleanup series I wondered whether we should do
this for everyone, and perhaps even remove ttm_bo.ttm_resv. Only driver
which doesn't yet have a gem_bo embedded in the same allocation is vmwgfx,
and that would be easy to fix by adding a vmwgfx_resv somehwere.
Anyway, looks like a solid start into the convergence story.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/virtio/virtgpu_object.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
> index b2da31310d24..242766d644a7 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_object.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_object.c
> @@ -132,7 +132,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
> virtio_gpu_init_ttm_placement(bo);
> ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size,
> ttm_bo_type_device, &bo->placement, 0,
> - true, acc_size, NULL, NULL,
> + true, acc_size, NULL,
> + bo->gem_base.resv,
> &virtio_gpu_ttm_bo_destroy);
> /* ttm_bo_init failure will call the destroy */
> if (ret != 0)
> --
> 2.18.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2019-06-17 14:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190617111406.14765-1-kraxel@redhat.com>
2019-06-17 11:14 ` [PATCH 1/4] drm/virtio: pass gem reservation object to ttm init Gerd Hoffmann
2019-06-17 11:14 ` [PATCH 2/4] drm/virtio: switch virtio_gpu_wait_ioctl() to gem helper Gerd Hoffmann
2019-06-17 11:14 ` [PATCH 3/4] drm/virtio: simplify cursor updates Gerd Hoffmann
2019-06-17 11:14 ` [PATCH 4/4] drm/virtio: remove virtio_gpu_object_wait Gerd Hoffmann
[not found] ` <20190617111406.14765-2-kraxel@redhat.com>
2019-06-17 14:08 ` Daniel Vetter [this message]
2019-06-17 14:11 ` [PATCH 1/4] drm/virtio: pass gem reservation object to ttm init Daniel Vetter
[not found] ` <20190617111406.14765-3-kraxel@redhat.com>
2019-06-17 14:15 ` [PATCH 2/4] drm/virtio: switch virtio_gpu_wait_ioctl() to gem helper Daniel Vetter
[not found] ` <20190617111406.14765-4-kraxel@redhat.com>
2019-06-17 14:18 ` [PATCH 3/4] drm/virtio: simplify cursor updates Daniel Vetter
[not found] ` <20190617141806.GG12905@phenom.ffwll.local>
2019-06-18 7:41 ` Gerd Hoffmann
[not found] ` <20190617111406.14765-5-kraxel@redhat.com>
2019-06-17 14:18 ` [PATCH 4/4] drm/virtio: remove virtio_gpu_object_wait Daniel Vetter
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=20190617140825.GD12905@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--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