[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] drm: allow limiting the scatter list size.
- To: Gerd Hoffmann <kraxel@xxxxxxxxxx>
- From: Christian König <christian.koenig@xxxxxxx>
- Date: Tue, 18 Aug 2020 10:31:19 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D+zrV1tiZSyPoEH1/0OgFEmJxkx6pkIq+hXK3ZVrooE=; b=BaJiXLVwQbrzdmL1v1e93sK+38Z0ubgqRVdVMVAt+M2/5wQ8lPGB29BmYw/SQI6kvjn4/t6SCuHYMi0kJdAZxiykft9rawE5OwHhX3wX76CqzHyMFuNIsxYGssY7kkj9lmZkWN1J5olQvhURqwqpmdM2KW0HDfsbBY9gJsSIaWGAuB0IsJtjeYWDTe+gaI8QLoMycWePd65zs6sGEAEG3ZbiM40/LQf8tKV5feauSLBMH7kyYpQKTfd42zv73EhYJv8oD9ApMtKi99bZSanCeLbUlfDpsrNQw73DxgFmXAIG98ExtC9gISYfuUZU8iuC+StxKLHfeYkml6LslIdywQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jozRH25AhCqdmExxZxGKK76UmbNNLnbQBJhG6aerRB2xADYfApJuAMlHNuDOiYSLkGtOUmTTAlceIo8JyAk1deAo3hCZz387iqzTzlLEKDyS7854wfihrOeoUv1x1CXTZKEIUSEAcyOoP6whxm+GIqWL+TiBogKYtb7yGC58zdvmCnWDgXEZjDGVgh1I46hVH20vbpeqtDG530/BJ+Ymf8NbbVtNElT6hMIvGibLTAL66CmlMz9i12NglM6we+kNmBDybLvO9tSvR7k7oo+ZeWJthp+vzPsIuEWvldjWRz08cJ7hBcfLs+S69i6z/bxO/yjdIyC8+8dNHkKHkCwmpQ==
- Authentication-results: lists.freedesktop.org; dkim=none (message not signed) header.d=none; lists.freedesktop.org; dmarc=none action=none header.from=amd.com;
- Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx, David Airlie <airlied@xxxxxxxx>, "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" <nouveau@xxxxxxxxxxxxxxxxxxxxx>, Sandy Huang <hjc@xxxxxxxxxxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, "open list:RADEON and AMDGPU DRM DRIVERS" <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>, Jonathan Hunter <jonathanh@xxxxxxxxxx>, "open list:ARM/Rockchip SoC support" <linux-rockchip@xxxxxxxxxxxxxxxxxxx>, Ben Skeggs <bskeggs@xxxxxxxxxx>, Russell King <linux+etnaviv@xxxxxxxxxxxxxxx>, "moderated list:DRM DRIVERS FOR XEN" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "open list:DRM DRIVER FOR MSM ADRENO GPU" <linux-arm-msm@xxxxxxxxxxxxxxx>, "moderated list:DRM DRIVERS FOR VIVANTE GPU IP" <etnaviv@xxxxxxxxxxxxxxxxxxxxx>, "open list:DRM DRIVERS FOR NVIDIA TEGRA" <linux-tegra@xxxxxxxxxxxxxxx>, Sean Paul <sean@xxxxxxxxxx>, "moderated list:ARM/Rockchip SoC support" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, open list <linux-kernel@xxxxxxxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>, Alex Deucher <alexander.deucher@xxxxxxx>, "open list:DRM DRIVER FOR MSM ADRENO GPU" <freedreno@xxxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 18 Aug 2020 08:31:46 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Am 18.08.20 um 10:27 schrieb Gerd Hoffmann:
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 <kraxel@xxxxxxxxxx>
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).
Yeah, that's the problem patch 2/2 never showed up here :)
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?
That is probably the best approach, yes.
For Intel and AMD it could even be global/constant, but it certainly
doesn't needs to be kept around for each buffer.
Christian.
take care,
Gerd
|