From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 6A3C336BCDA for ; Fri, 10 Apr 2026 10:43:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775817790; cv=none; b=tUXd8NZEvB81CSfutTEHbY6LLnFDDiqnP2h/i+urLPdzw7JSkY3D6Gh4QRVdV0iwiHoTw2JUfKh0Gl0+2TY+L1bWbNoAB//kq7CWmEbUYMejhdx6OtHaLFlb6aJ5VKb8w6QYZDfsPsnk/ZKapGiN9SMo8NTgCuTSg6zR29JTl1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775817790; c=relaxed/simple; bh=bLHOvry8mx/y9qCzHWcu4EBafaHQykIVWmSbtNr2Png=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=eCJGHk2q4mN06Dps/+W2fE9Hyc05UcRzecqEbzKoa4+kgfJRC5/INb5AN7NHMK6VOmHdJYyV3FkHu4iNpayyRRta46IkpDp6j0MryzaH4Ogh0y0jl93fLdi7UtjsHD3KFmzVfH7jyyJN8A2nPsYpfFGAZxTqnTAMR0PCvERwDGk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=hemF5OiS; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="hemF5OiS" Received: from [192.168.88.20] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1DCBD1E7; Fri, 10 Apr 2026 12:41:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1775817698; bh=bLHOvry8mx/y9qCzHWcu4EBafaHQykIVWmSbtNr2Png=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=hemF5OiSr86Aoen8UoRMfRXG8SIcC5tcF2ot7ufaG6KDpk0r+BoEtMG+le2FjuTLy EGrSTba6m7boK5NC/jRfIEgPNerf+qL3zc4abVOnuGrMMbUqT3k9pQHayULp7cfhRx hb6tlG1hdMnxErqGhcAG7dxe9JzbH9RlJ7r5GVqQ= Message-ID: Date: Fri, 10 Apr 2026 13:43:04 +0300 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] drm/xlnx/zynqmp-dpsub: Fix dependencies for COMPILE_TEST To: Chen-Yu Tsai Cc: Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= References: <20260408081430.1712335-1-wenst@chromium.org> <386241e0-3d1b-43cc-8bc0-b6d35a97ba89@ideasonboard.com> Content-Language: en-US From: Tomi Valkeinen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, On 10/04/2026 12:08, Chen-Yu Tsai wrote: > On Fri, Apr 10, 2026 at 4:49 PM Tomi Valkeinen > wrote: >> >> Hi, >> >> On 08/04/2026 11:14, Chen-Yu Tsai wrote: >>> The zynqmp-dpsub driver does not have build time dependencies on the PHY >>> or DMA drivers. These are runtime hardware restrictions. >>> >>> Group the two dependencies with ARCH_ZYNQMP so that the driver can be >>> compile tested without them. >>> >>> Signed-off-by: Chen-Yu Tsai >>> --- >>> IMO the two driver dependencies could be removed altogether, but that >>> would be up to the driver and platform maintainers. >>> --- >>> drivers/gpu/drm/xlnx/Kconfig | 4 +--- >>> 1 file changed, 1 insertion(+), 3 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/xlnx/Kconfig b/drivers/gpu/drm/xlnx/Kconfig >>> index cfabf5e2a0bb..4c6729459f40 100644 >>> --- a/drivers/gpu/drm/xlnx/Kconfig >>> +++ b/drivers/gpu/drm/xlnx/Kconfig >>> @@ -1,10 +1,8 @@ >>> config DRM_ZYNQMP_DPSUB >>> tristate "ZynqMP DisplayPort Controller Driver" >>> - depends on ARCH_ZYNQMP || COMPILE_TEST >>> + depends on (ARCH_ZYNQMP && PHY_XILINX_ZYNQMP && XILINX_ZYNQMP_DPDMA) || COMPILE_TEST >>> depends on COMMON_CLK && DRM && OF >>> depends on DMADEVICES >>> - depends on PHY_XILINX_ZYNQMP >>> - depends on XILINX_ZYNQMP_DPDMA >>> select DMA_ENGINE >>> select DRM_CLIENT_SELECTION >>> select DRM_DISPLAY_DP_HELPER >> >> I think the above looks more difficult to understand than the current >> version. We should perhaps rather drop the dependencies. But if we go >> that way, then... we can also drop DMADEVICES, DMA_ENGINE, GENERIC_PHY >> at least. > > Perhaps. All the APIs for these are properly stubbed, so I guess > they also count as runtime dependencies. > >> What problem does this solve? Why are these two dependencies bad for >> compile testing, but the other dependencies/selects are ok? > > I was build testing changes across multiple DRM drivers in addition to > the main platform I work on. Having to find and select each dependency > was annoying. Ok, makes sense. > I would say DMADEVICES and GENERIC_PHY are much more common to embedded > devices than SoC specific drivers. Ok, so it was just that you already happened to have them, no searching needed. And I think COMMON_CLOCK and OF fall into the same category (if I recall right, those headers are also stubbed). >> I personally don't mind hard runtime dependencies expressed in the >> Kconfig, as searching for the correct dependency-drivers when your >> driver doesn't probe is always a PITA. > > I don't mind it either. But the way they are described means that compile > testing is overly dependent on having some other platform specific > driver enabled. > > > I suppose another way to write this would be: > > depends on ARCH_ZYNQMP if !COMPILE_TEST > depends on PHY_XILINX_ZYNQMP if !COMPILE_TEST > depends on XILINX_ZYNQMP_DPDMA if !COMPILE_TEST > ... > > Does that work for you? Yes, I think having them on separate lines makes it easier to read. As Ville mentioned, the || COMPILE_TEST seems to be more common, so we can use that. Can/should we also add the check to the select lines (DMADEVICES, DMA_ENGINE, GENERIC_PHY)? Does that help any? Hmm, but that requires "if !COMPILE_TEST", so if we do that, should we also use the same syntax for "depends on". Well, in any case, I'm fine with just dealing with the two xilinx specific dependencies, as those have the most impact. This patch is not too bad, so I can pick this one. But if we were to add a couple more configs to the same line, then I think it makes sense to split it up... Tomi