From patchwork Tue Dec 12 14:51:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13489359 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EF6E5C4167D for ; Tue, 12 Dec 2023 14:51:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 32CE410E5D2; Tue, 12 Dec 2023 14:51:21 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id B5BC010E1E1; Tue, 12 Dec 2023 14:51:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702392679; x=1733928679; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=14uzE/WQpu/5VFsjOENh/drinb+dswmrOkGho48GCHI=; b=fnG3k5XRvJ3ZtFxYgViyOLZCZr9dSeejUWXSPfWEOSHRfpKBnNIL6QLa p9as9koNJOa/XOavPGipOQLXzQzTjAEL+DSbv0HlzuPCut+PjO3dfhUpi N5QxiZw2uKWJ8fNsUMd5fmurhRfT8QY+wJI5qxCeRCQjIMndfGdt/IrVk TIZIYh9bG8yUSxrs2ukZ6985gzRSg9xCPsPHLQSvIoEkCN08Yvuy1scFX k9fB/dHiT0fceMrgcYP5sPVMG1eJEJ75HzCqb67+g2F1nHXtxXHxxurVE qIdmQkDistwzGRyAbEYH/gD3MLV9OTOPb8LxUzy0/0B6FWLD2Tbcc1DGu g==; X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="379810495" X-IronPort-AV: E=Sophos;i="6.04,270,1695711600"; d="scan'208";a="379810495" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2023 06:51:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="864232078" X-IronPort-AV: E=Sophos;i="6.04,270,1695711600"; d="scan'208";a="864232078" Received: from ggilardi-mobl1.amr.corp.intel.com (HELO localhost) ([10.252.49.147]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2023 06:51:16 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/edid: prefer forward declarations over includes in drm_edid.h Date: Tue, 12 Dec 2023 16:51:13 +0200 Message-Id: <20231212145113.3849191-1-jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jani.nikula@intel.com, intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" There's no need to include either linux/hdmi.h or drm/drm_mode.h. They can be removed by using forward declarations. While at it, group the forward declarations together, and remove the unnecessary ones. Signed-off-by: Jani Nikula --- include/drm/drm_edid.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index 518d1b8106c7..37c2702ee9ef 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -24,11 +24,14 @@ #define __DRM_EDID_H__ #include -#include -#include +enum hdmi_quantization_range; +struct drm_connector; struct drm_device; +struct drm_display_mode; struct drm_edid; +struct hdmi_avi_infoframe; +struct hdmi_vendor_infoframe; struct i2c_adapter; #define EDID_LENGTH 128 @@ -319,11 +322,6 @@ struct cea_sad { u8 byte2; /* meaning depends on format */ }; -struct drm_encoder; -struct drm_connector; -struct drm_connector_state; -struct drm_display_mode; - int drm_edid_to_sad(const struct edid *edid, struct cea_sad **sads); int drm_edid_to_speaker_allocation(const struct edid *edid, u8 **sadb); int drm_av_sync_delay(struct drm_connector *connector,