dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: christian.koenig@amd.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 0/2] drm: fix virtio-gpu + sev
Date: Mon, 7 Sep 2020 10:40:24 +0200	[thread overview]
Message-ID: <20200907084024.GT2352366@phenom.ffwll.local> (raw)
In-Reply-To: <20200907063343.18097-1-kraxel@redhat.com>

On Mon, Sep 07, 2020 at 08:33:41AM +0200, Gerd Hoffmann wrote:
> virtio-gpu must make sure scatter list segments are not too big.
> 
> Gerd Hoffmann (2):
>   drm: allow limiting the scatter list size.
>   drm/virtio: set max_segment

So this all feels a bit irky and mid-layer, and why can't the various
helpers not just use dma_max_mapping_size(drm_device->dev) directly.

And then I read that dma api use in virtio subsystem is a huge mess of
hacks, and that it doesn't set up these quirks through the dma api
abstraction but throught it's own abstraction on top. So we don't really
have any other option I think.

I think would be good to add a TODO item to the virtio_max_dma_size call
like:

	TODO: once virtio uses the dma api correctly, remove the explicit
	max_segment handling na duse dma_max_mapping_size directly
	everywhere.

Or maybe also put that into the @max_segment kerneldoc in the drm_device
struct.

With that: Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> on the
series.
-Daniel

> 
>  include/drm/drm_device.h                    |  8 ++++++++
>  include/drm/drm_prime.h                     |  3 ++-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c |  3 ++-
>  drivers/gpu/drm/drm_gem_shmem_helper.c      |  3 ++-
>  drivers/gpu/drm/drm_prime.c                 | 10 +++++++---
>  drivers/gpu/drm/etnaviv/etnaviv_gem.c       |  3 ++-
>  drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c |  3 ++-
>  drivers/gpu/drm/msm/msm_gem.c               |  3 ++-
>  drivers/gpu/drm/msm/msm_gem_prime.c         |  3 ++-
>  drivers/gpu/drm/nouveau/nouveau_prime.c     |  3 ++-
>  drivers/gpu/drm/radeon/radeon_prime.c       |  3 ++-
>  drivers/gpu/drm/rockchip/rockchip_drm_gem.c |  6 ++++--
>  drivers/gpu/drm/tegra/gem.c                 |  3 ++-
>  drivers/gpu/drm/vgem/vgem_drv.c             |  3 ++-
>  drivers/gpu/drm/virtio/virtgpu_kms.c        |  1 +
>  drivers/gpu/drm/xen/xen_drm_front_gem.c     |  3 ++-
>  16 files changed, 44 insertions(+), 17 deletions(-)
> 
> -- 
> 2.27.0
> 
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2020-09-07  8:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07  6:33 [PATCH v3 0/2] drm: fix virtio-gpu + sev Gerd Hoffmann
2020-09-07  6:33 ` [PATCH v3 1/2] drm: allow limiting the scatter list size Gerd Hoffmann
2020-09-07  6:33 ` [PATCH v3 2/2] drm/virtio: set max_segment Gerd Hoffmann
2020-09-07  8:40 ` Daniel Vetter [this message]

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=20200907084024.GT2352366@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    /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