[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKMK7uFixrbxVoaF4-1hXvQcPySaaYRooQ=LKoivPALH-UCgbw@mail.gmail.com>
Date: Mon, 7 Sep 2020 09:13:58 +0200
From: Daniel Vetter <daniel@...ll.ch>
To: Gerd Hoffmann <kraxel@...hat.com>
Cc: dri-devel <dri-devel@...ts.freedesktop.org>,
Christian König <christian.koenig@....com>,
Alex Deucher <alexander.deucher@....com>,
David Airlie <airlied@...ux.ie>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Lucas Stach <l.stach@...gutronix.de>,
Russell King <linux+etnaviv@...linux.org.uk>,
Christian Gmeiner <christian.gmeiner@...il.com>,
Rob Clark <robdclark@...il.com>, Sean Paul <sean@...rly.run>,
Ben Skeggs <bskeggs@...hat.com>,
Sandy Huang <hjc@...k-chips.com>,
Heiko Stübner <heiko@...ech.de>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>,
"open list:RADEON and AMDGPU DRM DRIVERS"
<amd-gfx@...ts.freedesktop.org>,
open list <linux-kernel@...r.kernel.org>,
"moderated list:DRM DRIVERS FOR VIVANTE GPU IP"
<etnaviv@...ts.freedesktop.org>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<linux-arm-msm@...r.kernel.org>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<freedreno@...ts.freedesktop.org>,
"open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS"
<nouveau@...ts.freedesktop.org>,
"moderated list:ARM/Rockchip SoC support"
<linux-arm-kernel@...ts.infradead.org>,
"open list:ARM/Rockchip SoC support"
<linux-rockchip@...ts.infradead.org>,
"open list:DRM DRIVERS FOR NVIDIA TEGRA"
<linux-tegra@...r.kernel.org>,
"moderated list:DRM DRIVERS FOR XEN" <xen-devel@...ts.xenproject.org>
Subject: Re: [PATCH v2 1/2] drm: allow limiting the scatter list size.
On Mon, Sep 7, 2020 at 8:39 AM Gerd Hoffmann <kraxel@...hat.com> wrote:
>
> > > + /**
> > > + * @max_segment:
> > > + *
> > > + * Max size for scatter list segments. When unset the default
> > > + * (SCATTERLIST_MAX_SEGMENT) is used.
> > > + */
> > > + size_t max_segment;
> >
> > Is there no better place for this then "at the bottom"? drm_device is a
> > huge structure, piling stuff up randomly doesn't make it better :-)
>
> Moved next to the other gem fields for now (v3 posted).
>
> > I think ideally we'd have a gem substruct like we have on the modeset side
> > at least.
>
> Phew, that'll be quite some churn in the tree. And there aren't that many
> gem-related fields in struct drm_device.
>
> So you are looking for something like below (header changes only)?
Hm yeah it's a lot less than I thought. And yes I think that would be neat.
-Daniel
>
> take care,
> Gerd
>
> diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
> index c455ef404ca6..950167ede98a 100644
> --- a/include/drm/drm_device.h
> +++ b/include/drm/drm_device.h
> @@ -299,22 +299,8 @@ struct drm_device {
> /** @mode_config: Current mode config */
> struct drm_mode_config mode_config;
>
> - /** @object_name_lock: GEM information */
> - struct mutex object_name_lock;
> -
> - /** @object_name_idr: GEM information */
> - struct idr object_name_idr;
> -
> - /** @vma_offset_manager: GEM information */
> - struct drm_vma_offset_manager *vma_offset_manager;
> -
> - /**
> - * @max_segment:
> - *
> - * Max size for scatter list segments for GEM objects. When
> - * unset the default (SCATTERLIST_MAX_SEGMENT) is used.
> - */
> - size_t max_segment;
> + /** @gem_config: Current GEM config */
> + struct drm_gem_config gem_config;
>
> /** @vram_mm: VRAM MM memory manager */
> struct drm_vram_mm *vram_mm;
> diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h
> index 337a48321705..74129fb29fb8 100644
> --- a/include/drm/drm_gem.h
> +++ b/include/drm/drm_gem.h
> @@ -39,6 +39,25 @@
>
> #include <drm/drm_vma_manager.h>
>
> +struct drm_gem_config {
> + /** @object_name_lock: GEM information */
> + struct mutex object_name_lock;
> +
> + /** @object_name_idr: GEM information */
> + struct idr object_name_idr;
> +
> + /** @vma_offset_manager: GEM information */
> + struct drm_vma_offset_manager *vma_offset_manager;
> +
> + /**
> + * @max_segment:
> + *
> + * Max size for scatter list segments for GEM objects. When
> + * unset the default (SCATTERLIST_MAX_SEGMENT) is used.
> + */
> + size_t max_segment;
> +};
> +
> struct drm_gem_object;
>
> /**
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Powered by blists - more mailing lists