]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: extract intel_fifo_underrun.h from intel_drv.h
authorJani Nikula <jani.nikula@intel.com>
Mon, 29 Apr 2019 12:29:24 +0000 (15:29 +0300)
committerJani Nikula <jani.nikula@intel.com>
Tue, 30 Apr 2019 11:29:51 +0000 (14:29 +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/0507c5523d1f07a48e6679a04db75246ce8ba766.1556540889.git.jani.nikula@intel.com
12 files changed:
drivers/gpu/drm/i915/Makefile.header-test
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_crt.c
drivers/gpu/drm/i915/intel_ddi.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_fifo_underrun.c
drivers/gpu/drm/i915/intel_fifo_underrun.h [new file with mode: 0644]
drivers/gpu/drm/i915/intel_hdmi.c
drivers/gpu/drm/i915/intel_sdvo.c
drivers/gpu/drm/i915/vlv_dsi.c

index ff84035018a5fa9cd5cf083281378678a2082e4a..01485f284a2029a786290b754141267d98ec2757 100644 (file)
@@ -29,6 +29,7 @@ header_test := \
        intel_dvo_dev.h \
        intel_fbc.h \
        intel_fbdev.h \
+       intel_fifo_underrun.h \
        intel_frontbuffer.h \
        intel_hdcp.h \
        intel_hdmi.h \
index 15f5415a0aa243d6197e7a80be0914734206cb82..ed21f7edc768186bfef202d336bf0d103d358484 100644 (file)
@@ -40,6 +40,7 @@
 #include "i915_drv.h"
 #include "i915_trace.h"
 #include "intel_drv.h"
+#include "intel_fifo_underrun.h"
 #include "intel_psr.h"
 
 /**
index b665c370111b2801202d5efcaaf451d4912d7fc2..1d32af65f9c461ebba7e99c82d5fe47e74c49865 100644 (file)
@@ -39,6 +39,7 @@
 #include "intel_crt.h"
 #include "intel_ddi.h"
 #include "intel_drv.h"
+#include "intel_fifo_underrun.h"
 
 /* Here's the desired hotplug mode */
 #define ADPA_HOTPLUG_BITS (ADPA_CRT_HOTPLUG_PERIOD_128 |               \
index f181c26f62fd3bded129ded58cfa4da190323692..a1f8056b43c50dedaa0a59b4852fc847fae5cc9a 100644 (file)
@@ -34,6 +34,7 @@
 #include "intel_dp.h"
 #include "intel_drv.h"
 #include "intel_dsi.h"
+#include "intel_fifo_underrun.h"
 #include "intel_hdcp.h"
 #include "intel_hdmi.h"
 #include "intel_lspcon.h"
index 2e2ed2c2b48206de72c1442c28529b61b81ec926..19a4874864d8c0e44ee0bed670bab3401b5ff1bd 100644 (file)
@@ -58,6 +58,7 @@
 #include "intel_dvo.h"
 #include "intel_fbc.h"
 #include "intel_fbdev.h"
+#include "intel_fifo_underrun.h"
 #include "intel_frontbuffer.h"
 #include "intel_hdcp.h"
 #include "intel_hdmi.h"
index 08d92570f17ffc5392fd6312fc30ac1ab453d494..b9b03b6203f6675f4b16b81c1cc237f16abd816e 100644 (file)
@@ -48,6 +48,7 @@
 #include "intel_ddi.h"
 #include "intel_dp.h"
 #include "intel_drv.h"
+#include "intel_fifo_underrun.h"
 #include "intel_hdcp.h"
 #include "intel_hdmi.h"
 #include "intel_lspcon.h"
index 20f28e43f45f51c922713708bf8cb22fbe26c339..17182f519d7f9d4fe0ead287567ad59c1d41b0bb 100644 (file)
@@ -1581,19 +1581,6 @@ intel_atomic_get_new_crtc_state(struct intel_atomic_state *state,
                                                                 &crtc->base));
 }
 
-/* intel_fifo_underrun.c */
-bool intel_set_cpu_fifo_underrun_reporting(struct drm_i915_private *dev_priv,
-                                          enum pipe pipe, bool enable);
-bool intel_set_pch_fifo_underrun_reporting(struct drm_i915_private *dev_priv,
-                                          enum pipe pch_transcoder,
-                                          bool enable);
-void intel_cpu_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
-                                        enum pipe pipe);
-void intel_pch_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
-                                        enum pipe pch_transcoder);
-void intel_check_cpu_fifo_underruns(struct drm_i915_private *dev_priv);
-void intel_check_pch_fifo_underruns(struct drm_i915_private *dev_priv);
-
 /* i915_irq.c */
 void gen5_enable_gt_irq(struct drm_i915_private *dev_priv, u32 mask);
 void gen5_disable_gt_irq(struct drm_i915_private *dev_priv, u32 mask);
index 74c8b05282942972ed9399e556ffd7ba26a02878..8545ad32bb50e382b632fdc0f28adc2520b4957f 100644 (file)
@@ -28,6 +28,7 @@
 #include "i915_drv.h"
 #include "intel_drv.h"
 #include "intel_fbc.h"
+#include "intel_fifo_underrun.h"
 
 /**
  * DOC: fifo underrun handling
diff --git a/drivers/gpu/drm/i915/intel_fifo_underrun.h b/drivers/gpu/drm/i915/intel_fifo_underrun.h
new file mode 100644 (file)
index 0000000..e04f22a
--- /dev/null
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#ifndef __INTEL_FIFO_UNDERRUN_H__
+#define __INTEL_FIFO_UNDERRUN_H__
+
+#include <linux/types.h>
+
+#include "intel_display.h"
+
+struct drm_i915_private;
+
+bool intel_set_cpu_fifo_underrun_reporting(struct drm_i915_private *dev_priv,
+                                          enum pipe pipe, bool enable);
+bool intel_set_pch_fifo_underrun_reporting(struct drm_i915_private *dev_priv,
+                                          enum pipe pch_transcoder,
+                                          bool enable);
+void intel_cpu_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
+                                        enum pipe pipe);
+void intel_pch_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
+                                        enum pipe pch_transcoder);
+void intel_check_cpu_fifo_underruns(struct drm_i915_private *dev_priv);
+void intel_check_pch_fifo_underruns(struct drm_i915_private *dev_priv);
+
+#endif /* __INTEL_FIFO_UNDERRUN_H__ */
index d2b3b32ea159b6e1cbfaf8188899ec2bbe2ab357..e2341d3868bbce62cfb174961834c1a32727c25c 100644 (file)
@@ -45,6 +45,7 @@
 #include "intel_ddi.h"
 #include "intel_dp.h"
 #include "intel_drv.h"
+#include "intel_fifo_underrun.h"
 #include "intel_hdcp.h"
 #include "intel_hdmi.h"
 #include "intel_lspcon.h"
index 0e3d91d9ef1367bc7755c2a6c65941a206d50a44..ef2748889a2aa00db4d0dee4438153038e762aba 100644 (file)
@@ -39,6 +39,7 @@
 #include "i915_drv.h"
 #include "intel_connector.h"
 #include "intel_drv.h"
+#include "intel_fifo_underrun.h"
 #include "intel_hdmi.h"
 #include "intel_panel.h"
 #include "intel_sdvo.h"
index b4c658334d0464bef574a4619e35f5582955db4c..5d343a09d5304d6099aed3eab4f3e8045b37ba58 100644 (file)
@@ -35,6 +35,7 @@
 #include "intel_connector.h"
 #include "intel_drv.h"
 #include "intel_dsi.h"
+#include "intel_fifo_underrun.h"
 #include "intel_panel.h"
 #include "intel_sideband.h"