[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 1/1] drm: allow limiting the scatter list size.
- To: dri-devel <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, Christian König <christian.koenig@xxxxxxx>, Alex Deucher <alexander.deucher@xxxxxxx>, David Airlie <airlied@xxxxxxxx>, Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>, Lucas Stach <l.stach@xxxxxxxxxxxxxx>, Russell King <linux+etnaviv@xxxxxxxxxxxxxxx>, Christian Gmeiner <christian.gmeiner@xxxxxxxxx>, Rob Clark <robdclark@xxxxxxxxx>, Sean Paul <sean@xxxxxxxxxx>, Ben Skeggs <bskeggs@xxxxxxxxxx>, Sandy Huang <hjc@xxxxxxxxxxxxxx>, Heiko Stübner <heiko@xxxxxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, Jonathan Hunter <jonathanh@xxxxxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, "open list:RADEON and AMDGPU DRM DRIVERS" <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>, open list <linux-kernel@xxxxxxxxxxxxxxx>, "moderated list:DRM DRIVERS FOR VIVANTE GPU IP" <etnaviv@xxxxxxxxxxxxxxxxxxxxx>, "open list:DRM DRIVER FOR MSM ADRENO GPU" <linux-arm-msm@xxxxxxxxxxxxxxx>, "open list:DRM DRIVER FOR MSM ADRENO GPU" <freedreno@xxxxxxxxxxxxxxxxxxxxx>, "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" <nouveau@xxxxxxxxxxxxxxxxxxxxx>, "moderated list:ARM/Rockchip SoC support" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "open list:ARM/Rockchip SoC support" <linux-rockchip@xxxxxxxxxxxxxxxxxxx>, "open list:DRM DRIVERS FOR NVIDIA TEGRA" <linux-tegra@xxxxxxxxxxxxxxx>, "moderated list:DRM DRIVERS FOR XEN" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Gerd Hoffmann <kraxel@xxxxxxxxxx>
- Date: Tue, 8 Sep 2020 12:02:53 +0200
- Delivery-date: Tue, 08 Sep 2020 10:03:33 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
> > > The comments I've found suggest very much not ... Or is that all very
> > > old stuff only that no one cares about anymore?
> >
> > I think these days it is possible to override dma_ops per device, which
> > in turn allows virtio to deal with the quirks without the rest of the
> > kernel knowing about these details.
> >
> > I also think virtio-gpu can drop the virtio_has_dma_quirk() checks, just
> > use the dma api path unconditionally and depend on virtio core having
> > setup dma_ops in a way that it JustWorks[tm]. I'll look into that next.
>
> The comment above vring_use_dma_api() suggests that this has not yet
> happened, that's why I'm asking.
Hmm, wading through the code, seems it indeed happen yet, even though my
testing didn't show any issues. Probably pure luck because devices and
cpus have the same memory view on x86. Guess I need to try this on
ppc64 to see it actually failing ...
So dropping the virtio_has_dma_quirk() checks isn't going to fly.
Using dma_max_mapping_size() should be fine though. It might use a
lower limit than needed for virtio, but it should not break things.
take care,
Gerd
|