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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D994CC61DA4 for ; Fri, 27 Jan 2023 10:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229884AbjA0KXW (ORCPT ); Fri, 27 Jan 2023 05:23:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbjA0KXU (ORCPT ); Fri, 27 Jan 2023 05:23:20 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D3AC28D3F for ; Fri, 27 Jan 2023 02:23:18 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 072E05C012A; Fri, 27 Jan 2023 05:23:18 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Fri, 27 Jan 2023 05:23:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1674814998; x=1674901398; bh=ESYKgkcp1o AJy2GgJO4g+7f5T9dErjzdnGeeRmEuZUM=; b=mwpIAxCPl5jp4IDgAX1HMAQz7t P6ShCHDnrH1GflyH8Oiq97HR30qjYMurrKI5ZWK4WBfLqGl6GTVLQfo0zxMI/HXA WD7qE9YBYFRb2gZiUxprPPapNm150XlAfUtYl2KLUV1lXaJAzzaZloghCypTNaKk Cd5WtrSP1gAWBR4ZpBjWZ4k8DYAcQy0jAHoliigtYpgr68jhxMYShdMLDJLjLi+h djHzMh1DlaTWcDUDL3WHuO2yn/gyYVVvrTPYm3sFdYAdIxjRT0S9iNgytORZa+Ha 2rxr0UelHsfRMOzX+9rkIjebvGrjxksDvXCh8tEt/o53tbTNtG9c7r6M0VPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1674814998; x=1674901398; bh=ESYKgkcp1oAJy2GgJO4g+7f5T9dE rjzdnGeeRmEuZUM=; b=YN9ZL+JlxxeownlNFQTeDHYHhwd5UXjirRQtL+7B70V4 +ROfEfH3ZiCrerrK87KwHP3AqEAlY5Ou+nRPUVtmLl6fm4D/dMw7balbW2yEOaTR SMR/SeA3S1C6L5ikV/vecKnI83KHatJIaJS03KSnymWDl0dJHVwdci0X9qCgYd0u AeNwU0fTCBK0pwYbEGbU6fvApuJbZO9xmXQbkPYcMtmyXw7FnrKrvzo+L5ZQSM7i 3++v/NmvwtE9TWiYxD+ZYalGPg4lKQI99k1n+K5vYEnoLYfpZWNgRedvtchA90xY aM/8mytclhX5U3TFghO1jiqLRJdeWAavCJplDU7kPQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddviedgudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 88516B60086; Fri, 27 Jan 2023 05:23:17 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-85-gd6d859e0cf-fm-20230116.001-gd6d859e0 Mime-Version: 1.0 Message-Id: <4db4ab2d-968f-4403-b85e-1465b3c1017e@app.fastmail.com> In-Reply-To: <20230127101701.GA1416485@linux.intel.com> References: <20230127093631.2132187-1-arnd@kernel.org> <20230127101701.GA1416485@linux.intel.com> Date: Fri, 27 Jan 2023 11:22:57 +0100 From: "Arnd Bergmann" To: "Stanislaw Gruszka" , "Arnd Bergmann" Cc: "Oded Gabbay" , "Jeffrey Hugo" , "Jacek Lawrynowicz" , "Dave Airlie" , "Thomas Zimmermann" , "Melissa Wen" , "Daniel Vetter" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] accel: work around DRM_ACCEL dependencies Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 27, 2023, at 11:17, Stanislaw Gruszka wrote: > On Fri, Jan 27, 2023 at 10:36:20AM +0100, Arnd Bergmann wrote: >> I think it will be necessary to establish a link hierarchy between drm.ko >> and drm_accel.ko to avoid circular dependencies like this, but until then >> the only way that both can be used is to have both subsystems built into >> the kernel. Enforce this using a Kconfig dependency. > > Hmm, it was discussed a bit before and conclusion was that accel will be > compiled in drm.ko to avoid circular dependencies. There should be > no drm_accel.ko module. Ok, got it. This does not sounds like a great solution as it ties the two modules closer together than most users want, but it should work as long as we control the dependencies for the individual drivers. >> diff --git a/drivers/accel/Kconfig b/drivers/accel/Kconfig >> index 834863902e16..dd18d3b2028c 100644 >> --- a/drivers/accel/Kconfig >> +++ b/drivers/accel/Kconfig >> @@ -8,7 +8,7 @@ >> # >> menuconfig DRM_ACCEL >> bool "Compute Acceleration Framework" >> - depends on DRM >> + depends on DRM=y > > Would making ivpu Kconfig: > > depends on DRM > select DRM_ACCEL > > solve the problem and still allow to drm to be build as module ? Right, that should work, I'll send a v2 patch to add an "if DRM" around the entire drivers/accel/Kconfig file, which should have the effect. Arnd