Received: by 2002:a05:7208:b08c:b0:82:bbfa:f723 with SMTP id c12csp378404rbb; Fri, 26 Apr 2024 06:58:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWK6QuPJRflStcg6nRyiFhIT+MIUPMMY8nvW78j8Y/57bla4on/osVNEsg1rikvXIIZbdjlNvy1TlWWO7CeTNYiN54cYbANrR1Y0l3Jcw== X-Google-Smtp-Source: AGHT+IGBRZINykq5JHrvKpXbHGvSKlU/esXuuT94sFG6uOMVI6IQroIG87PPPYer9RUOA+e8DXtH X-Received: by 2002:a25:8489:0:b0:de5:5919:c9e8 with SMTP id v9-20020a258489000000b00de55919c9e8mr2702198ybk.52.1714139898156; Fri, 26 Apr 2024 06:58:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714139898; cv=pass; d=google.com; s=arc-20160816; b=DZL8kU7BjFyleo5dBOXFuCbSXXeSumC1fM61+9lC/6h6XBVwlS+IX9h0dBn8nmWniL 5VF9QiFHPmIEaRTsmt6FuH5teHkxzduxmUjFNvkX2KKUKbM4CQ26f6yUac1mMQimPiw8 KnVbCmjT9F+26T4jQP9gp/jWHf+ro7QCnanKPPWDxgiBEBZ6uRcdwPxJHQr/e3YUtVxp nEnhM1JV0FUrG+PlZDpaUbX/OT6qyuctOPwwhBwWc0Xt6RIhXU8N22d6/SGVN07VUH7s Vu2d3JXcTBbSB9UnJNBrcFsFjngFqMAc0K6fJjgnJgmSDGBR8o24HWAi1oqY6Pvok+gl 5Qlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=xVVrPRwzfloS3nPvnH8wqYU62ehI63cdwFOhXNXyc4U=; fh=zOvBQ7A+t0/OLTrh/D01z8h9B8zJWhYXj+sjGB4UOog=; b=Y4fC14WjbUutN3IgVGmLUVLMAjyArjQ9R7ZNgNn8xPOLNO2iLNaffWA8weuhFyK0UJ /zdLdi3Uf2WeuYJOupOavD68x5qPqm+p8QciYrQ9TPz9UdxdD6IhyztRFspA4mgF5sYj wyfWwNre2rHl/nkAg0Wdq7R9+0fP0EYhUTsydI5DcKfR2eyGoeLr7Xa0t+I6BlYHYzyH jlnhDm+QJh+FJZzEWf5hRXe1RPJDZcHIy0r/iki0U1IfFh8bNc/br3ihYNV4acSQl795 dZu+rWp2fpWz4NWiYA/rnYDZe/I03P5gZ/M8a3w66jSRXft2rRxkOPIinsD+pCt61Xb4 GYhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FXZy47Tm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-160110-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160110-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id cn9-20020a05622a248900b00439d100fb3dsi11458427qtb.668.2024.04.26.06.58.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 06:58:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160110-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FXZy47Tm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-160110-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160110-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DDD191C213CE for ; Fri, 26 Apr 2024 13:58:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F6B714D29D; Fri, 26 Apr 2024 13:56:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FXZy47Tm" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 34DC21487E7; Fri, 26 Apr 2024 13:56:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714139770; cv=none; b=DIhzYEOrMQ+J243hGkmZa+GzfDhHRveTTgj19F/RnSgI9qCu946mNMG3vKfgWAUMGG1gTJNWhADEi+AsSEssTLTdXlLb+UuVLS7b9GgIpwpsDoytX6mRtzsmFmlUUGVhiEaQPAwOHDJf5CD70jnLjuJlBcdfEg/OhCiQPci2+h8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714139770; c=relaxed/simple; bh=0+zg+HziepsJXdpuYfXEg99K1gcbh+aTdTuGOHhJCk8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=l0Yuu3o/mPLBn3woccMZLy7UW4UOQlCMrMaCmkwms6VT7BZItO3PN1gELtcITGck3DAVok4TY+YmtBE2kIYhk4f0wF8LjwLfzOT3csdw/5JBhmn2f+hQXTSUrmJTOonxBLlZ8OaljHvqnHEo8nb3OEc1aYJouxanFJXu1WWkkWc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FXZy47Tm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A74FC2BD10; Fri, 26 Apr 2024 13:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714139769; bh=0+zg+HziepsJXdpuYfXEg99K1gcbh+aTdTuGOHhJCk8=; h=From:To:Cc:Subject:Date:From; b=FXZy47TmOUSg3WqWMcMut1Z7zIiZ4tmxrMRafdj5yH1iWAAh+yHzXlHbaNlxGA5Ot CV1+3AWLq9oEj0+MZ7uk/d+XiQu63zslESmwEqQQX9z6z0W+R1wuNRxIP5T9PM2c04 jfx9fVrA+LYvBpDU0VnsR0E+lIOIAY2091nAM2v+fX30k0457MkPQ9idi8rce6dtT6 AAyOfHXcG2It/3dta/8aCg923akzlajAkTsmmr6Juu0iRFGp2wry9p+icBkfFRDYg7 3L1heWYtSAESsX+VLYZC+GmrUGY2MfMugWazphB0375F0QSv4ZJVzqzrd5+L9906bz c1IgnoFFGR6wQ== From: Masahiro Yamada To: dri-devel@lists.freedesktop.org Cc: linux-kbuild@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Masahiro Yamada , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH v2] drm: move DRM-related CONFIG options into DRM submenu Date: Fri, 26 Apr 2024 22:56:02 +0900 Message-Id: <20240426135602.2500125-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When you create a submenu using the 'menu' syntax, there is no ambiguity about its end because the code between 'menu' and 'endmenu' becomes the submenu. In contrast, 'menuconfig' does not have the corresponding end marker. Instead, the end of the submenu is inferred from symbol dependencies. This is detailed in Documentation/kbuild/kconfig-language.rst, starting line 348. It outlines two methods to place the code under the submenu: (1) Open an if-block immediately after 'menuconfig', enclosing the submenu content within it (2) Add 'depends on' to every symbol intended for the submenu Many subsystems opt for (1) because it reliably maintains the submenu structure. The DRM subsystem adopts (2). The submenu ends when the sequence of 'depends on DRM' breaks. It can be confirmed by running a GUI frontend such as 'make menuconfig' and visiting the DRM menu: < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---- If you toggle this, you will notice most of the DRM-related options appear below it, not in the submenu. I highly recommend the approach (1). Obviously, (2) is not reliable, as the submenu breaks whenever someone forgets to add 'depends on DRM'. This commit encloses the entire DRM configuration with 'if DRM' and 'endif', except for DRM_PANEL_ORIENTATION_QUIRKS. Note: Now, 'depends on DRM' properties inside the if-block are all redundant. I leave it as follow-up cleanups. Signed-off-by: Masahiro Yamada Acked-by: Arnd Bergmann --- Changes in v2: - Rebased onto next-20240426 drivers/gpu/drm/Kconfig | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 959b19a04101..7df15543a70a 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -29,6 +29,8 @@ menuconfig DRM details. You should also select and configure AGP (/dev/agpgart) support if it is available for your platform. +if DRM + config DRM_MIPI_DBI tristate depends on DRM @@ -439,10 +441,6 @@ config DRM_HYPERV config DRM_EXPORT_FOR_TESTS bool -# Separate option because drm_panel_orientation_quirks.c is shared with fbdev -config DRM_PANEL_ORIENTATION_QUIRKS - tristate - config DRM_LIB_RANDOM bool default n @@ -463,3 +461,9 @@ config DRM_WERROR this config option is disabled by default. If in doubt, say N. + +endif + +# Separate option because drm_panel_orientation_quirks.c is shared with fbdev +config DRM_PANEL_ORIENTATION_QUIRKS + tristate -- 2.40.1