drm: Don't include <drm/drm_encoder.h> in <drm/drm_crtc.h>
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 28 Nov 2016 18:51:09 +0000 (20:51 +0200)
committerArchit Taneja <architt@codeaurora.org>
Sun, 18 Dec 2016 10:59:29 +0000 (16:29 +0530)
<drm/drm_crtc.h> used to define most of the in-kernel KMS API. It has
now been split into separate files for each object type, but still
includes most other KMS headers to avoid breaking driver compilation.

As a step towards fixing that problem, remove the inclusion of
<drm/drm_encoder.h> from <drm/drm_crtc.h> and include it instead where
appropriate. Also remove the forward declarations of the drm_encoder and
drm_encoder_helper_funcs structures from <drm/drm_crtc.h> as they're not
needed in the header.

<drm/drm_encoder.h> now has to include <drm/drm_mode.h> and contain a
forward declaration of struct drm_encoder in order to allow including it
as the first header in a compilation unit.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sinclair Yeh <syeh@vmware.com> # For vmwgfx
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-2-git-send-email-laurent.pinchart+renesas@ideasonboard.com
27 files changed:
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
drivers/gpu/drm/ast/ast_drv.h
drivers/gpu/drm/bochs/bochs.h
drivers/gpu/drm/cirrus/cirrus_drv.h
drivers/gpu/drm/drm_connector.c
drivers/gpu/drm/drm_crtc_helper.c
drivers/gpu/drm/drm_edid.c
drivers/gpu/drm/drm_mode_config.c
drivers/gpu/drm/drm_of.c
drivers/gpu/drm/drm_plane_helper.c
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
drivers/gpu/drm/gma500/psb_intel_drv.h
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/mgag200/mgag200_drv.h
drivers/gpu/drm/nouveau/nouveau_connector.h
drivers/gpu/drm/qxl/qxl_drv.h
drivers/gpu/drm/radeon/radeon_mode.h
drivers/gpu/drm/rcar-du/rcar_du_encoder.h
drivers/gpu/drm/shmobile/shmob_drm_crtc.h
drivers/gpu/drm/tegra/drm.h
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
include/drm/drm_crtc.h
include/drm/drm_encoder.h
include/drm/drm_encoder_slave.h
include/drm/drm_modeset_helper_vtables.h

index 202b4176b74e08dc6321f2868a608e6e6934be79..b60346792bf8aaab47fd1669a0d7600c503cde34 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <drm/drm_crtc.h>
 #include <drm/drm_edid.h>
+#include <drm/drm_encoder.h>
 #include <drm/drm_dp_helper.h>
 #include <drm/drm_fixed.h>
 #include <drm/drm_crtc_helper.h>
index 908011d2c8f5200e92cc8db772b85315d5c16343..6f3b6f50cf524a6b4214da4818d3d43585fdd10a 100644 (file)
@@ -28,6 +28,7 @@
 #ifndef __AST_DRV_H__
 #define __AST_DRV_H__
 
+#include <drm/drm_encoder.h>
 #include <drm/drm_fb_helper.h>
 
 #include <drm/ttm/ttm_bo_api.h>
index 32dfe418cc983d6d595321932f838473eb2c6066..f626bab7f5e3d677762582152ea5a908c97f6de0 100644 (file)
@@ -4,6 +4,7 @@
 #include <drm/drmP.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_encoder.h>
 #include <drm/drm_fb_helper.h>
 
 #include <drm/drm_gem.h>
index 2188d6b61b3ead5c2ad712ba60082d9d1327b348..b59aeef4635aded2e22d23ac291a44a3b91dc625 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <video/vga.h>
 
+#include <drm/drm_encoder.h>
 #include <drm/drm_fb_helper.h>
 
 #include <drm/ttm/ttm_bo_api.h>
index 5a452628939272969c54239498b9a1ca86cd4a67..40f8126a9738edc2842373ecb0373cb0cea20edb 100644 (file)
@@ -23,6 +23,7 @@
 #include <drm/drmP.h>
 #include <drm/drm_connector.h>
 #include <drm/drm_edid.h>
+#include <drm/drm_encoder.h>
 
 #include "drm_crtc_internal.h"
 #include "drm_internal.h"
index 9d007f5f973255b4a7528e7da397d7e119824593..26061753f3bf8ba71125c950835a4f3df7656c87 100644 (file)
@@ -36,6 +36,7 @@
 #include <drm/drmP.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_crtc.h>
+#include <drm/drm_encoder.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
index 336be31ff3de79c85051961cf55de3bc1005ce3e..67d6a73731d8d5186c9d4a0883a08ae47e62063f 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/vga_switcheroo.h>
 #include <drm/drmP.h>
 #include <drm/drm_edid.h>
+#include <drm/drm_encoder.h>
 #include <drm/drm_displayid.h>
 
 #define version_greater(edid, maj, min) \
index b1e8bbceaf3916795590bcbccced69281e2768a2..5aba075f112c47c3eb40fc69ab550bcd8b0d50a9 100644 (file)
@@ -20,6 +20,7 @@
  * OF THIS SOFTWARE.
  */
 
+#include <drm/drm_encoder.h>
 #include <drm/drm_mode_config.h>
 #include <drm/drmP.h>
 
index 47848ed8ca48854afc4279572b887a1b6b3ae56e..b5f2f0fece99887a6467058f8a2e18b87fdbe58a 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/of_graph.h>
 #include <drm/drmP.h>
 #include <drm/drm_crtc.h>
+#include <drm/drm_encoder.h>
 #include <drm/drm_of.h>
 
 static void drm_release_of(struct device *dev, void *data)
index 7a7dddf604d7e6c5a23b5acbdeab7cd0025d2177..191a5f095cf9b2603cae34e4539a05f4eb3f085f 100644 (file)
@@ -29,6 +29,7 @@
 #include <drm/drm_rect.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_encoder.h>
 #include <drm/drm_atomic_helper.h>
 
 #define SUBPIXEL_MASK 0xffff
index e9e9aeecf2eb20f4d605f727c0264bdd831145e8..da9bfd432ca644e878e5fd797772c8a0b059228f 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef __FSL_DCU_DRM_DRV_H__
 #define __FSL_DCU_DRM_DRV_H__
 
+#include <drm/drm_encoder.h>
+
 #include "fsl_dcu_drm_crtc.h"
 #include "fsl_dcu_drm_output.h"
 #include "fsl_dcu_drm_plane.h"
index 2a3b7c684db243f6462d9bdb8f82dc14a9f80355..6a10215fc42d4f6ca2877390721253a34cb2338c 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/i2c-algo-bit.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_encoder.h>
 #include <linux/gpio.h>
 #include "gma_display.h"
 
index cd132c216a67decc86e4b1fbc22d544a8230b0ad..79dce55d462278b7cf5f080b4e6a50257a495ba0 100644 (file)
@@ -32,6 +32,7 @@
 #include "i915_drv.h"
 #include <drm/drm_crtc.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_encoder.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_dp_dual_mode_helper.h>
 #include <drm/drm_dp_mst_helper.h>
index 3e02ac20777ce82fdf40b632ef8648064eb1a2dc..87e0934773de7f7af294b6ea54f68722bbfed2e9 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <video/vga.h>
 
+#include <drm/drm_encoder.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/ttm/ttm_bo_api.h>
 #include <drm/ttm/ttm_bo_driver.h>
index 096983c42a1fb5cc1660c4ce36650aaaeb70342c..a4d1a059bd3d4f948c36c0a942150c68199ec974 100644 (file)
@@ -30,6 +30,7 @@
 #include <nvif/notify.h>
 
 #include <drm/drm_edid.h>
+#include <drm/drm_encoder.h>
 #include <drm/drm_dp_helper.h>
 #include "nouveau_crtc.h"
 
index 785aad42e9bbfcfb77b8d334c6f862c413135046..f15ddd0eb85b3436ed6ab1eeed32ae586350c2cc 100644 (file)
@@ -43,6 +43,7 @@
 #include <ttm/ttm_placement.h>
 #include <ttm/ttm_module.h>
 
+#include <drm/drm_encoder.h>
 #include <drm/drm_gem.h>
 
 /* just for ttm_validate_buffer */
index f1da484864a9c554ee4d7f846c3a75b63740e005..ad282648fc8b1e70adcd135b5618a56d818823ce 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <drm/drm_crtc.h>
 #include <drm/drm_edid.h>
+#include <drm/drm_encoder.h>
 #include <drm/drm_dp_helper.h>
 #include <drm/drm_dp_mst_helper.h>
 #include <drm/drm_fixed.h>
index 7fc10a9c34c3c0ee803d3ad95fb39c1f1f0a080f..a050a36998579796f2dbdcac1ef10a1cb2314d84 100644 (file)
@@ -15,6 +15,7 @@
 #define __RCAR_DU_ENCODER_H__
 
 #include <drm/drm_crtc.h>
+#include <drm/drm_encoder.h>
 
 struct rcar_du_device;
 struct rcar_du_hdmienc;
index 38ed4ff8aaf228118f5e75d03e5f0d894101744c..818b31549ddcb9b2806a4c48a3f5a6cbf439c108 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <drm/drmP.h>
 #include <drm/drm_crtc.h>
+#include <drm/drm_encoder.h>
 
 struct backlight_device;
 struct shmob_drm_device;
index 0ddcce1b420df0166318cb5ec6491b186bc82926..5205790dd6798a9997254f557f906e56f4bfa89c 100644 (file)
@@ -17,6 +17,7 @@
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_edid.h>
+#include <drm/drm_encoder.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_fixed.h>
 
index b5c4bb14d0d1b87a6bbb5b25fd93d156705e851d..489956efbff83e7b6344afc387c2a6524a135790 100644 (file)
@@ -9,6 +9,8 @@
 #include "drmP.h"
 #include "drm_gem_cma_helper.h"
 
+#include <drm/drm_encoder.h>
+
 struct vc4_dev {
        struct drm_device *dev;
 
index 08906c8ce3fa75a9efd04c6de1b0afc9e9ac5640..025f2e3d483f3cda1dfd4edcc29fb1dfaf202381 100644 (file)
@@ -35,6 +35,7 @@
 #include <drm/drm_gem.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_encoder.h>
 #include <ttm/ttm_bo_api.h>
 #include <ttm/ttm_bo_driver.h>
 #include <ttm/ttm_placement.h>
index f42ce9a1c3ac65912048c15d058ccc2d67f53659..cb36e1d70133e62486728d2d93707f0721bc6c93 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_encoder.h>
 #include "vmwgfx_drv.h"
 
 /**
index 946672f97e1e122c5644b2c379f3068fe0551ef8..9ef0ac0ce69fbec36e3511f00c3ff8b026c94de4 100644 (file)
@@ -39,7 +39,6 @@
 #include <drm/drm_framebuffer.h>
 #include <drm/drm_modes.h>
 #include <drm/drm_connector.h>
-#include <drm/drm_encoder.h>
 #include <drm/drm_property.h>
 #include <drm/drm_bridge.h>
 #include <drm/drm_edid.h>
@@ -68,14 +67,12 @@ static inline uint64_t I642U64(int64_t val)
 }
 
 struct drm_crtc;
-struct drm_encoder;
 struct drm_pending_vblank_event;
 struct drm_plane;
 struct drm_bridge;
 struct drm_atomic_state;
 
 struct drm_crtc_helper_funcs;
-struct drm_encoder_helper_funcs;
 struct drm_plane_helper_funcs;
 
 /**
index c7438ff0d60922e2f5816aeecd65db306a68ffb6..cec6ac45c6ccaf0a2c3bbf3fcf4fe00e51c1940c 100644 (file)
 
 #include <linux/list.h>
 #include <linux/ctype.h>
+#include <drm/drm_mode.h>
 #include <drm/drm_mode_object.h>
 
+struct drm_encoder;
+
 /**
  * struct drm_encoder_funcs - encoder controls
  *
index 82cdf611393daa2db78289765d7771656acd9d50..1107b4b1c599f4ee962ed444670d73ee2d210046 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <drm/drmP.h>
 #include <drm/drm_crtc.h>
+#include <drm/drm_encoder.h>
 
 /**
  * struct drm_encoder_slave_funcs - Entry points exposed by a slave encoder driver
index 69c3974bf13351ef365327b06300fe8af46e60d1..625c7475c5df8015f383bc1b9689f380090ac1d5 100644 (file)
@@ -30,6 +30,7 @@
 #define __DRM_MODESET_HELPER_VTABLES_H__
 
 #include <drm/drm_crtc.h>
+#include <drm/drm_encoder.h>
 
 /**
  * DOC: overview