Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3022512pxk; Mon, 7 Sep 2020 00:16:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEf/0dJqW/VXMHJ4ae2kij484zuoyJWgKlGt/xmaj4UO/i7Gks0HqixjzWD+HSHta+dzx0 X-Received: by 2002:a17:907:2506:: with SMTP id y6mr620905ejl.265.1599462987868; Mon, 07 Sep 2020 00:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599462987; cv=none; d=google.com; s=arc-20160816; b=VdzTbjhkpQ27YioANcY3dRac+lo4VcR1mvo6mcU27xMWw6xLdZIVz18uFYwGbpx5gd n032gblxqQ8RxKAEuxCvaqVVMNQdC+dEZWZcnYQZeaRP6eaqkgM3vDHFVO9kZoRxuM+h aBxf5gUTeXZlyDcnz87TUCvIK6imd99ODrEpqdGQx8xL43C7/vwv/eWeKemKCjDXT9sW rq9rU6YCjUPHSwNue4cxFLN/oYm2pGGk90RwkDeKUiMpcstI3gpKFJSwZC9vNUuJ8EV6 S/pgJ3iiqyakemefOfp5EXjj2XtTpSNdGwSWX9N8A8vbSNZKAkIyuWIWnrwIqvAJZ4Q2 +H4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=KVfAGFVhhH+3gKxWPx4EEt2i/99FDkLx011kDtsMF+I=; b=fB0chQ50FuuJHL7YIhb+XbWMfqkfaGNvRnNge8S+WMAZ9wunz6rEfIIcXQkyt+STnb Asnm9ZiKp7CqVidIL4X1obeYUDw24s82aNvwx7/sWs+YNEw9X6eiQHv6t1ExvvooxRMy guryKgIg5KLe9z2B6vpf0wmSx4qZmt8blAy+XUFlSUMt9rzfkuI9Ng32ZZodRXogTKcR UNwtZeobqZRzRBaX/IznAEvsjK/BleQ6FCGq3ZZIjwDHe5gAgCtLcVwNWo68VvfQSqH2 GUBqoUM7yI/D3jSH3xpzp8Xarvkl3WOnXCEVyXFfwHF4dZpuSydtW8nL+KJ/tdoWruWn uknA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Euxtu+tr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx2si9163101ejb.202.2020.09.07.00.16.04; Mon, 07 Sep 2020 00:16:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Euxtu+tr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726948AbgIGHOh (ORCPT + 99 others); Mon, 7 Sep 2020 03:14:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726424AbgIGHOM (ORCPT ); Mon, 7 Sep 2020 03:14:12 -0400 Received: from mail-oo1-xc44.google.com (mail-oo1-xc44.google.com [IPv6:2607:f8b0:4864:20::c44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 775CDC061574 for ; Mon, 7 Sep 2020 00:14:11 -0700 (PDT) Received: by mail-oo1-xc44.google.com with SMTP id g26so33385ooa.9 for ; Mon, 07 Sep 2020 00:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KVfAGFVhhH+3gKxWPx4EEt2i/99FDkLx011kDtsMF+I=; b=Euxtu+trgjabIp7kfpqLzFQS+dE83z6NFR5B38p25hCsIskYQhJEXI8aDOFmjb9/rb ajdQe4bmbBxWioDNhCAVb/QZqh3F00karTYzM2FazYTVvrVMLOroBXd2TBPPFA8thdy7 kAmoBHvDcK9wIivmZv2bC4v0rV5TvwkjuxeM4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KVfAGFVhhH+3gKxWPx4EEt2i/99FDkLx011kDtsMF+I=; b=FVcNN5DZm9Q+c1C8R1Dm12dNczblYS95LlfujqRbOH8I70unhYpD30xwemoxp8I/qh q+W0Ig/HpkgQaHe0ugHJ/3tBOMy/l0YQibf4IFAVtdNR4XvdYmg7gnlUK8ySWP7vijFB kjz/giaK0dT30u3cfPuqKo9zqjx2rPCZmpz9anQg5SlnK4QxZM/RZsmicqrIGFlcdqF8 cc8iX3wULpWeSnG6TbYX5qzqg5VvsHcNk+5JKxEMM57Ro5tEi3DLT7PK8fUkkiLdvI6z KoHrLQZikiRlwrj92QsggrIfszPC5Lpet5QiaKJUJnVovj2Oeu3M8sLMPFdx9Qti2+U/ 5b+g== X-Gm-Message-State: AOAM533LA8hs3GvT3zoXiOU0NdyZ9jLXLsgME2ejYF6X6lo5KQfisxHr pi33yCPXBDO7UvLm5x+iAycg24EP4Upg6U64I68SJQ== X-Received: by 2002:a4a:e98e:: with SMTP id s14mr13829467ood.28.1599462848946; Mon, 07 Sep 2020 00:14:08 -0700 (PDT) MIME-Version: 1.0 References: <20200818092017.26290-1-kraxel@redhat.com> <20200818092017.26290-2-kraxel@redhat.com> <20200901074043.GT2352366@phenom.ffwll.local> <20200907063901.atwjdxz7iqyra22h@sirius.home.kraxel.org> In-Reply-To: <20200907063901.atwjdxz7iqyra22h@sirius.home.kraxel.org> From: Daniel Vetter Date: Mon, 7 Sep 2020 09:13:58 +0200 Message-ID: Subject: Re: [PATCH v2 1/2] drm: allow limiting the scatter list size. To: Gerd Hoffmann Cc: dri-devel , =?UTF-8?Q?Christian_K=C3=B6nig?= , Alex Deucher , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Lucas Stach , Russell King , Christian Gmeiner , Rob Clark , Sean Paul , Ben Skeggs , Sandy Huang , =?UTF-8?Q?Heiko_St=C3=BCbner?= , Thierry Reding , Jonathan Hunter , Oleksandr Andrushchenko , "open list:RADEON and AMDGPU DRM DRIVERS" , open list , "moderated list:DRM DRIVERS FOR VIVANTE GPU IP" , "open list:DRM DRIVER FOR MSM ADRENO GPU" , "open list:DRM DRIVER FOR MSM ADRENO GPU" , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , "moderated list:ARM/Rockchip SoC support" , "open list:ARM/Rockchip SoC support" , "open list:DRM DRIVERS FOR NVIDIA TEGRA" , "moderated list:DRM DRIVERS FOR XEN" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 7, 2020 at 8:39 AM Gerd Hoffmann 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 > > +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@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch