From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79BB7FD0651 for ; Wed, 11 Mar 2026 14:40:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CD56E10E941; Wed, 11 Mar 2026 14:40:34 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="HHm/RvA0"; dkim-atps=neutral Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id BB75B10E92E for ; Wed, 11 Mar 2026 14:40:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1773240031; bh=EekSZLy6YP8Ncof+v9UOx5ImSQYENZkwGhIqc48E0EQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=HHm/RvA0k+wuRqG5eVqAq6vTr3EYEyG1/AVKoth99YHN9DYkQGkFLRIUpRCve5fJu qgKC7fIh0VJfeRlsUFZ8JciREDTXgX/hLriuusk46yl/6813q2FNsVkGH27miFCVjN Kkp411oeQ6Zr+fu+h8B82wMXlvt7RSpE237QkbMaUkZsyxpFvT4THrnQH7Dsoz+rEs mQzlDAz9c/4GrudO+9eOQoMLebe4hKRCfICWF4NLvWY5At6ilQkPxX2Y/M9h+X8OrY DfC3gkBLvoc0YwFyv0C6QCAoohHVhahbyfgP3nImn07s4JALYHXrU8acHiR9X7FNXG s371L6bUbYthQ== Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by bali.collaboradmins.com (Postfix) with ESMTPSA id D120717E0FA3; Wed, 11 Mar 2026 15:40:30 +0100 (CET) Message-ID: <68d3d2f0-c356-4a27-bc96-c4f1ac25b756@collabora.com> Date: Wed, 11 Mar 2026 15:40:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/4] drm/gem-dma: Support dedicated DMA device for allocation and mapping To: Chen-Yu Tsai , Matthias Brugger , Chun-Kuang Hu , Philipp Zabel , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , David Airlie , Simona Vetter Cc: linux-sunxi@lists.linux.dev, Paul Kocialkowski , linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260311094929.3393338-1-wenst@chromium.org> <20260311094929.3393338-3-wenst@chromium.org> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20260311094929.3393338-3-wenst@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Il 11/03/26 10:49, Chen-Yu Tsai ha scritto: > Support for a dedicated DMA device for prime imports was added in commit > 143ec8d3f939 ("drm/prime: Support dedicated DMA device for dma-buf imports"). > This allowed the DRM driver to provide a dedicated DMA device when its > own underlying device was not capable of DMA, for example when it is a > USB device (the original target) or a virtual device. The latter case is > common on embedded SoCs, on which the display pipeline is composed of > various fixed function blocks, and the DRM device is simply a made-up > device, an address space managing the routing between the blocks, or > whichever block the implementor thought made sense at the time. The > point is that the chosen device is often not the actual device doing > the DMA. Various drivers have used workarounds or reimplemented the > GEM DMA helpers to get the DMA addresses and IOMMUs to work correctly. > > Add support for the dedicated DMA device to the GEM DMA helpers. > > No existing driver currently uses the GEM DMA helpers and calls > drm_dev_set_dma_dev() to set a dedicated DMA device, so no existing > users should be affected. > > Reviewed-by: Thomas Zimmermann > Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno