Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2925077pxa; Tue, 18 Aug 2020 01:30:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTOYZhWL+Xp0AEBp3Gc/OpP68kyHA/nqUFAL1ATJ8ZJNdg7FZ5/sQerSsgr5I2Xl0/uTQC X-Received: by 2002:a17:906:c143:: with SMTP id dp3mr18614153ejc.504.1597739425786; Tue, 18 Aug 2020 01:30:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597739425; cv=none; d=google.com; s=arc-20160816; b=CeX/R9R6Aj0B4rlXyISdbu64nQBZKaBnrNrwbABhUzLhQe3tQjzPgRBy5bkO9YsXme 4/RUWYJfoWlI25uQjoN/5oXpetyTUIni2mQdxWwUUavsyqrCZXdO6ivTKm27RxdiAxZk 3/RS8xivRMjRbNFj7LSMoN4jd+BanZ+PV9wAl79IEz95c4A1oPdxhEOzg88Jwu/PGELn tEQvdI79XLZubm3Si+gZuTSMYeA9gMyrlAK5JYto2GecX/s/evCEJtJO1A+JSwLMzgOp 4V8qGUaoT8V+lPemZVM/wgbO+cBB3lJR0/CH5Tk7zK+2cBJeOG37uhRjqBGCNd6UDNj/ Beqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YE9v2iUUt0C+eIB9363k6FZZUNnKbdhJpiU9fX/PhuY=; b=joKa0hoCkb5udR92QqIHnan4J23lE0wG/OPSv5TaQv5bDowMDaqUT8+BI4umOWwvIM b6askfo8oWl+V6AOnN46lAN2gxAF/q0eu2j7icwFEc5SSfAPYScUlhdLiQN2PM4dLiIp mPvNw7dvyPYezis9X1hbBl5noLVQJrj4wuIFZN7ubH52MBOZfRxmlrG/EGYkm5RifFOk 4Xj2ZGs0w5uf6iphL3qTVnshRIOdplynD5QsFq7lodv2OQexVyN0AQOmCR72scLqOKGZ fjF3GC3fPyk82M5M0UXW55k5itO8PdzxC8/UOHMGHhfvma2yvxl2LZfyWp8JyXXpZp/W BUeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Af/2mKqO"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v25si12414364ejb.238.2020.08.18.01.30.02; Tue, 18 Aug 2020 01:30:25 -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=@redhat.com header.s=mimecast20190719 header.b="Af/2mKqO"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726519AbgHRI1P (ORCPT + 99 others); Tue, 18 Aug 2020 04:27:15 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:31226 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726391AbgHRI1O (ORCPT ); Tue, 18 Aug 2020 04:27:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597739233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YE9v2iUUt0C+eIB9363k6FZZUNnKbdhJpiU9fX/PhuY=; b=Af/2mKqOvbxTNoooOkwf2vMQkD1fX7Bsqo7+NuMpZbcr6pnrUM1vF+jLc9VRucj8HrUKuL iv8JWKvDfGeaP6e6lk06lWGvq0CYSjuR8dJzCJjewDkHxveVPC8sQTfsNg041G6Adz/VOk MDAIKk1NmMkqOi9RnmuJ569MwcKJXQM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-11-ahIv83ehNsqc6ofMzQXlaA-1; Tue, 18 Aug 2020 04:27:09 -0400 X-MC-Unique: ahIv83ehNsqc6ofMzQXlaA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B292C1DDF1; Tue, 18 Aug 2020 08:27:06 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-195.ams2.redhat.com [10.36.112.195]) by smtp.corp.redhat.com (Postfix) with ESMTP id A5EAA261B9; Tue, 18 Aug 2020 08:27:04 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C21E09CBD; Tue, 18 Aug 2020 10:27:03 +0200 (CEST) Date: Tue, 18 Aug 2020 10:27:03 +0200 From: Gerd Hoffmann To: Christian =?utf-8?B?S8O2bmln?= Cc: dri-devel@lists.freedesktop.org, David Airlie , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , Sandy Huang , Thierry Reding , Oleksandr Andrushchenko , "open list:RADEON and AMDGPU DRM DRIVERS" , Jonathan Hunter , "open list:ARM/Rockchip SoC support" , Ben Skeggs , Russell King , "moderated list:DRM DRIVERS FOR XEN" , "open list:DRM DRIVER FOR MSM ADRENO GPU" , "moderated list:DRM DRIVERS FOR VIVANTE GPU IP" , "open list:DRM DRIVERS FOR NVIDIA TEGRA" , Sean Paul , "moderated list:ARM/Rockchip SoC support" , open list , Thomas Zimmermann , Alex Deucher , "open list:DRM DRIVER FOR MSM ADRENO GPU" Subject: Re: [PATCH 1/2] drm: allow limiting the scatter list size. Message-ID: <20200818082703.7z6fcvoymiqow5kw@sirius.home.kraxel.org> References: <20200818074828.9509-1-kraxel@redhat.com> <20200818074828.9509-2-kraxel@redhat.com> <9c355d64-1a61-eb59-be80-d9fc863ddf22@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9c355d64-1a61-eb59-be80-d9fc863ddf22@amd.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 18, 2020 at 09:57:59AM +0200, Christian K?nig wrote: > Am 18.08.20 um 09:48 schrieb Gerd Hoffmann: > > Add max_segment argument to drm_prime_pages_to_sg(). When set pass it > > through to the __sg_alloc_table_from_pages() call, otherwise use > > SCATTERLIST_MAX_SEGMENT. > > > > Also add max_segment field to gem objects and pass it to > > drm_prime_pages_to_sg() calls in drivers and helpers. > > > > Signed-off-by: Gerd Hoffmann > > I'm missing an explanation why this should be useful (it certainly is). virtio-gpu needs this to work properly with SEV (see patch 2/2 of this series). > And the maximum segment size seems misplaced in the GEM object. This is > usually a property of the device or even completely constant. Placing it in drm_device instead would indeed work for virtio-gpu, so I guess you are suggesting that instead? take care, Gerd