drm/i915: extract intel_quirks.h from intel_drv.h
authorJani Nikula <jani.nikula@intel.com>
Mon, 29 Apr 2019 12:29:30 +0000 (15:29 +0300)
committerJani Nikula <jani.nikula@intel.com>
Tue, 30 Apr 2019 12:04:37 +0000 (15:04 +0300)
It used to be handy that we only had a couple of headers, but over time
intel_drv.h has become unwieldy. Extract declarations to a separate
header file corresponding to the implementation module, clarifying the
modularity of the driver.

Ensure the new header is self-contained, and do so with minimal further
includes, using forward declarations as needed. Include the new header
only where needed, and sort the modified include directives while at it
and as needed.

No functional changes.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1e2fb90dcce2063b1c464dc64aa8fa6005b62bc6.1556540890.git.jani.nikula@intel.com
drivers/gpu/drm/i915/Makefile.header-test
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_quirks.c
drivers/gpu/drm/i915/intel_quirks.h [new file with mode: 0644]

index dafaaa2ec9db48a3474698c7b7658471505adcdb..aed6734785de48d5da5f4762f464ee4d33034382 100644 (file)
@@ -43,8 +43,9 @@ header_test := \
        intel_pipe_crc.h \
        intel_pm.h \
        intel_psr.h \
-       intel_sideband.h \
+       intel_quirks.h \
        intel_sdvo.h \
+       intel_sideband.h \
        intel_sprite.h \
        intel_tv.h \
        intel_uncore.h \
index a815f2439be48dbc9b1cae0265b643c8781a3a43..ca36b379aac423797aedae1429df3d95d417ddba 100644 (file)
@@ -67,6 +67,7 @@
 #include "intel_pipe_crc.h"
 #include "intel_pm.h"
 #include "intel_psr.h"
+#include "intel_quirks.h"
 #include "intel_sdvo.h"
 #include "intel_sideband.h"
 #include "intel_sprite.h"
index f71a412b37ccf62eff485cf6db4f0b13444ec47a..b2cdd723cfc2615ffa9fb2c61acfdde046b4b2b6 100644 (file)
@@ -1789,9 +1789,6 @@ int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data,
                              struct drm_file *file_priv);
 void intel_overlay_reset(struct drm_i915_private *dev_priv);
 
-/* intel_quirks.c */
-void intel_init_quirks(struct drm_i915_private *dev_priv);
-
 /* intel_runtime_pm.c */
 void intel_runtime_pm_init_early(struct drm_i915_private *dev_priv);
 int intel_power_domains_init(struct drm_i915_private *);
index ec2b0fc92b8b7ed8c00bf920dedf962a7b833c09..0b749c28541fcc60920b8b232541f2bb08a9d673 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/dmi.h>
 
 #include "intel_drv.h"
+#include "intel_quirks.h"
 
 /*
  * Some machines (Lenovo U160) do not work with SSC on LVDS for some reason
diff --git a/drivers/gpu/drm/i915/intel_quirks.h b/drivers/gpu/drm/i915/intel_quirks.h
new file mode 100644 (file)
index 0000000..b0fcff1
--- /dev/null
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#ifndef __INTEL_QUIRKS_H__
+#define __INTEL_QUIRKS_H__
+
+struct drm_i915_private;
+
+void intel_init_quirks(struct drm_i915_private *dev_priv);
+
+#endif /* __INTEL_QUIRKS_H__ */