Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp564356pxb; Sat, 18 Sep 2021 10:38:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5M84TMtT3aU+XKsZPUtkynTASvxqjmvLFykjGjL/7Cs0hS5N0IeLIOAqWF7f2jBS+Cx95 X-Received: by 2002:a02:8606:: with SMTP id e6mr8726402jai.122.1631986729180; Sat, 18 Sep 2021 10:38:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631986729; cv=none; d=google.com; s=arc-20160816; b=TCeHcU9sXFcNC0FuOvq7WgFBZWrmYFg3LVYHyRWnv8v/Wb1Kh/3uEGTPH/kBaQIR0f 2gkJSFO2f+ky+0MUWKOlwKwFtpAzsl7Fma4LAoKuYMpfs2yjDG2h9/H39hCFJ4s8KvGe F9Otog5wwrq5d8h6TFyja0lzzj2LGS2mdCjTSezBNSjhAc0v04IjKRAN+cHPLaYZZ4zS Abuh53btjWH6z+fb7ymQhn6nLBOTGhl/9N/Qc8Y+CnG+WqlSE1QX0voVUURU6Un5HOYa LlJSNZv6kGa8GdJ4Ndils/1FFYVHxHEWwmB3CmO/qzAbujsdNJPlmQA/ZtnlgCJ+BHl+ DP8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=iQMJviYlb4ZEn676riwj+ykMcaYgM3Bpxtt9O2JGErE=; b=z0xxKZA8fjbpePRP+Bxy3nJY68OKYrrekDn6sgJz8U70ONLl/ayYTsDvlZQnOCmhri OTnXo6ZWHj6xk4bSWL+ATJBaGeZkuuFkZp/VDt9bfwtBn0rbfA4C4Jvbp4DBtK9dQZp2 z9NKS5pS061RcaxN/Oqe73TCd7npnTjyh3zvoAWLvZXSpw2WA0+roLlYUy1AtmVdEc2l tpA6PCYzxGxSOOgvtV0zYiLMQAl7CXwGljR+DXNWyyqJfJBGiBSCYWMNrob9OpiDGAIm eebuRN5Y8Wj5XiPIrqt6hW2MqKhgibDIx+2HmG4yN+ZZ8B8SbXxHUj0qoiasCi/U8Yl3 clcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@u92.eu header.s=fm3 header.b=WDwHHQXe; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=NQPv4xoz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i12si10420099ilu.99.2021.09.18.10.38.36; Sat, 18 Sep 2021 10:38:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@u92.eu header.s=fm3 header.b=WDwHHQXe; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=NQPv4xoz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241010AbhIRJoT (ORCPT + 99 others); Sat, 18 Sep 2021 05:44:19 -0400 Received: from wnew3-smtp.messagingengine.com ([64.147.123.17]:33631 "EHLO wnew3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242443AbhIRJoM (ORCPT ); Sat, 18 Sep 2021 05:44:12 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id 3B3CE2B011CB; Sat, 18 Sep 2021 05:42:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 18 Sep 2021 05:42:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=u92.eu; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=iQMJviYlb4ZEn676riwj+ykMcaY gM3Bpxtt9O2JGErE=; b=WDwHHQXezEJe3XzQX3Em61caD1JOywMykQAjQo9+FvS BAUw0ysziTYQHd2JcCD0Bk8z0AXCgaxpNkpKZQLKoYJ1OqQBcoFQ33Qgu5/ta31z DyByahRv0mE53Ony+dsf9vdzav7TkXvnoNMK9J+5jBpTqlb9TTjAdddlmlrRrTqr Yf6gJ7BLyxE0uyTPoJtiPyFjieupdONy4OEcmHP6qj5k/GfsUOqHapmuJhhnj03u aNQMVgCiAY4CTWJmetOTs/5AqGukMpQkXerlp7nEGlI0rsksg0Xiyj8h6lzqpt5F kGOaxLJK9jw+z2uqeAdy7jRYyyLk3cfoC3lOSyJK4ZQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=iQMJvi Ylb4ZEn676riwj+ykMcaYgM3Bpxtt9O2JGErE=; b=NQPv4xozCXDNOuWW95l8r0 wqgyyHyXfB+TEZFR29p5hrSTv1MyvPh8hK33MLJE8IkeC7FBi0cuYZiJYqFoOouk N1SMt7gdmUOFX7+6dS0zB2EDvB6PtfJ+RXPRE6Xm8Yv6zbnwvVa6/DoxXhlvqsiV DiPPdP8iqD22W7bL33bjydi/YElws4Ckpr/ugaxvRzvclMAOlkEEUlIc955FTNr+ MRHnTWDFICCu6KCQ4D+EyAmzhwMruzmoz98VLdiUyE9IpnmcGdvH0hhH/n8X3vhI fEDavwtqAGgk1//zVUmRJDSgl5exPhNz4+P4Pt8zN7dvnYLXClZYKlaWnCVGwsuA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehkedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttdejnecuhfhrohhmpefhvghrnhgr nhguohcutfgrmhhoshcuoehgrhgvvghnfhhoohesuhelvddrvghuqeenucggtffrrghtth gvrhhnpedvjeeifeelhfetiefhhfdthfefkefhhfeutdetvdfgvefgveefheffgfekjeef heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrh gvvghnfhhoohesuhelvddrvghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 18 Sep 2021 05:42:43 -0400 (EDT) Date: Sat, 18 Sep 2021 11:42:40 +0200 From: Fernando Ramos To: Sean Paul Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH 14/15] drm/amd: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN() Message-ID: References: <20210916211552.33490-1-greenfoo@u92.eu> <20210916211552.33490-15-greenfoo@u92.eu> <20210917155548.GO2515@art_vandelay> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/09/18 01:17AM, Fernando Ramos wrote: > > > +#include > > > > Top-level headers generally come above the driver headers. Also, now that I think > > about this a bit more, all of the new includes in this set should probably be > > for 'drm_modeset_lock.h' instead of 'drm_drv.h'. > > Ok. Let me try that. Turns out that the DRM_MODESET_LOCK_ALL_*() macros expansion includes a call to drm_drv_uses_atomic_modeset() which is defined in "drm_drv.h". Thus, #include'ing cannot be avoided. This makes me wonder... 1. "drm_drv.h" includes "drm_device.h", which includes "drm_mode_config.h", which includes "drm_modeset_lock.h" 2. "drm_modeset_lock.h" defines DRM_MODESET_LOCK_ALL_*() which expands into drm_drv_uses_atomic_modeset() 3. drm_drv_uses_atomic_modeset() is declared in "drm_drv.h" There seems to be a circular dependency here. We can try to fix this, but I suggest to do it in a different patch series.