From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-m1973172.qiye.163.com (mail-m1973172.qiye.163.com [220.197.31.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC4F6C13B; Fri, 9 Jan 2026 01:31:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.31.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767922295; cv=none; b=m3Zgl/WU2nuUKzkZfgBPys8a05hOme2wyisARDKrahbkVcNMt6A1P9W20mgCH2ZnYNA3XrCkzl/llJ1Lq4C2nj8CvG04TF4UeIJ7vFqGYdHT+afrgkMF4uyCkrJF3UZEzxeP9VsTQ9Jz1msO8FPszKp/5evzGQfMoOly4qRbdr8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767922295; c=relaxed/simple; bh=XG04LBIBTjzCP2psK3Uo1GUfr6kBVaisav07ZgmiORY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tq+kkuiRoeRnnCf0ByX07ATXY7C1y21y1WlTlUYQMx8b8eLf5QZKvlW3pRzUU+IemFginlwprl8ICg9e7v0aiOCe2fTDV8AJFNgsFCUPrwOklJcQ4u80avoo+ryemEHkPaMGokN7gzsnLpIVlL/ki8F5DkeSTpNmGy55nbeYa7E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com; spf=pass smtp.mailfrom=rock-chips.com; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b=GY6B1+W4; arc=none smtp.client-ip=220.197.31.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b="GY6B1+W4" Received: from [172.16.12.51] (unknown [58.22.7.114]) by smtp.qiye.163.com (Hmail) with ESMTP id 3002cb6fd; Fri, 9 Jan 2026 09:26:02 +0800 (GMT+08:00) Message-ID: <4e01f121-1912-4897-98e8-cb543a501707@rock-chips.com> Date: Fri, 9 Jan 2026 09:26:00 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 8/9] drm/rockchip: Drop ROCKCHIP_IOMMU depend for DRM_ROCKCHIP To: Heiko Stuebner , Neil Armstrong , Jessica Zhang , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sandy Huang , Andy Yan , Vinod Koul , Kishon Vijay Abraham I , Chaoyi Chen Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-phy@lists.infradead.org References: <20251106020632.92-1-kernel@airkyi.com> <20251106020632.92-9-kernel@airkyi.com> <4072834.X9hSmTKtgW@phil> Content-Language: en-US From: Chaoyi Chen In-Reply-To: <4072834.X9hSmTKtgW@phil> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-HM-Tid: 0a9ba05c4d8f03abkunm1426e5ab1f2143 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZQkhKTlZCS0gaTUhNS0NDTx9WFRQJFh oXVRMBExYaEhckFA4PWVdZGBILWUFZTkNVSUlVTFVKSk9ZV1kWGg8SFR0UWUFZT0tIVUpLSU9PT0 hVSktLVUpCS0tZBg++ DKIM-Signature: a=rsa-sha256; b=GY6B1+W46frWd3oLL1NM66g6O0EUywg5e7gk4XfQ3+7+led+dGGAoMeVwkHlhjufEtT6S0JKF8Ui/NstMhkxCh8FkpHFb3JVv/f+FQiHYJd8kjAsXth6LNavSgbTlumydJfio2Zlgs31cMsy3m+jrDNfczdZ39KJiNyjhMpbMuo=; s=default; c=relaxed/relaxed; d=rock-chips.com; v=1; bh=IjEhf4jC5xnT6sGVRluMHT0B2HAAj6xJis8dbhxb8WM=; h=date:mime-version:subject:message-id:from; Hi Heiko, On 1/9/2026 3:03 AM, Heiko Stuebner wrote: > Am Donnerstag, 6. November 2025, 03:06:31 Mitteleuropäische Normalzeit schrieb Chaoyi Chen: >> From: Chaoyi Chen >> >> On the RK3506 platform, there is no iommu hardware. And even on >> platform that have iommu hardware, it should be possible to use >> VOP without enabling iommu. In this case, a contiguous memory >> space like CMA should be used. >> >> So this patch removes the dependency on ROCKCHIP_IOMMU. >> >> Signed-off-by: Chaoyi Chen >> --- >> drivers/gpu/drm/rockchip/Kconfig | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig >> index b7b025814e72..a056d419190c 100644 >> --- a/drivers/gpu/drm/rockchip/Kconfig >> +++ b/drivers/gpu/drm/rockchip/Kconfig >> @@ -1,7 +1,8 @@ >> # SPDX-License-Identifier: GPL-2.0-only >> config DRM_ROCKCHIP >> tristate "DRM Support for Rockchip" >> - depends on DRM && ROCKCHIP_IOMMU >> + depends on DRM >> + depends on ROCKCHIP_IOMMU || !ROCKCHIP_IOMMU > > I don't really understand this yes+no line :-) > > Can't you just > - drop the dependency altogether > or > - do a depends on ROCKCHIP_IOMMU if ARM64 > > This trick is called optional-dependencies [0]. In addition to the familiar depends on ROCKCHIP_IOMMU part, the newly added !ROCKCHIP_IOMMU ensures that DRM_ROCKCHIP can still be built even when ROCKCHIP_IOMMU is not build. [0]: https://docs.kernel.org/kbuild/kconfig-language.html#optional-dependencies If we just: - drop the dependency altogether When IOMMU is enabled, the dependency relationship cannot be handled correctly. For example, the following configuration is possible: ROCKCHIP_IOMMU=m, DRM_ROCKCHIP=y, which leads to a build failure. - do a depends on ROCKCHIP_IOMMU if ARM64 This changes the semantics. On arm64 we should also be able to work without IOMMU being enabled. -- Best, Chaoyi