diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-10-29 05:03:57 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-11-04 18:14:55 -0500 |
commit | 3cb9ae4fd82ebc9759bc59998c88c385d35496fe (patch) | |
tree | 32e7014a714680c4fe0344511791652750d9d8fa | |
parent | bbf0ef0334f2267687a92ec6d8114fd67b8157a3 (diff) |
drm: Move drm_crtc_init from drm_crtc.h to drm_plane_helper.h
Just a bit of OCD cleanup on headers - this function isn't the core
interface any more but just a helper for drivers who haven't yet
transitioned to universal planes. Put the declaration at the right
spot and sprinkle necessary #includes over all drivers.
Maybe this helps to encourage driver maintainers to do the switch.
v2: Fix #include ordering for tegra, reported by 0-day builder.
v3: Include required headers, reported by Thierry.
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Thierry Reding <treding@nvidia.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
22 files changed, 26 insertions, 3 deletions
diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c index 9a0cc09e6653..0b164fb1c107 100644 --- a/drivers/gpu/drm/armada/armada_crtc.c +++ b/drivers/gpu/drm/armada/armada_crtc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <drm/drmP.h> | 13 | #include <drm/drmP.h> |
14 | #include <drm/drm_crtc_helper.h> | 14 | #include <drm/drm_crtc_helper.h> |
15 | #include <drm/drm_plane_helper.h> | ||
15 | #include "armada_crtc.h" | 16 | #include "armada_crtc.h" |
16 | #include "armada_drm.h" | 17 | #include "armada_drm.h" |
17 | #include "armada_fb.h" | 18 | #include "armada_fb.h" |
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 9dc0fd5c1ea4..b7ee2634e47c 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <drm/drmP.h> | 31 | #include <drm/drmP.h> |
32 | #include <drm/drm_crtc.h> | 32 | #include <drm/drm_crtc.h> |
33 | #include <drm/drm_crtc_helper.h> | 33 | #include <drm/drm_crtc_helper.h> |
34 | #include <drm/drm_plane_helper.h> | ||
34 | #include "ast_drv.h" | 35 | #include "ast_drv.h" |
35 | 36 | ||
36 | #include "ast_tables.h" | 37 | #include "ast_tables.h" |
diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 6b7efcf363d6..5ffd4895d040 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include "bochs.h" | 8 | #include "bochs.h" |
9 | #include <drm/drm_plane_helper.h> | ||
9 | 10 | ||
10 | static int defx = 1024; | 11 | static int defx = 1024; |
11 | static int defy = 768; | 12 | static int defy = 768; |
diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c index c7c5a9d91fa0..99d4a74ffeaf 100644 --- a/drivers/gpu/drm/cirrus/cirrus_mode.c +++ b/drivers/gpu/drm/cirrus/cirrus_mode.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | #include <drm/drmP.h> | 17 | #include <drm/drmP.h> |
18 | #include <drm/drm_crtc_helper.h> | 18 | #include <drm/drm_crtc_helper.h> |
19 | #include <drm/drm_plane_helper.h> | ||
19 | 20 | ||
20 | #include <video/cirrus.h> | 21 | #include <video/cirrus.h> |
21 | 22 | ||
diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c index 87b50ba64ed4..b21a09451d1d 100644 --- a/drivers/gpu/drm/gma500/psb_intel_display.c +++ b/drivers/gpu/drm/gma500/psb_intel_display.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
22 | 22 | ||
23 | #include <drm/drmP.h> | 23 | #include <drm/drmP.h> |
24 | #include <drm/drm_plane_helper.h> | ||
24 | #include "framebuffer.h" | 25 | #include "framebuffer.h" |
25 | #include "psb_drv.h" | 26 | #include "psb_drv.h" |
26 | #include "psb_intel_drv.h" | 27 | #include "psb_intel_drv.h" |
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index 83485ab81ce8..9872ba9abf1a 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <drm/drmP.h> | 16 | #include <drm/drmP.h> |
17 | #include <drm/drm_crtc_helper.h> | 17 | #include <drm/drm_crtc_helper.h> |
18 | #include <drm/drm_plane_helper.h> | ||
18 | 19 | ||
19 | #include "mgag200_drv.h" | 20 | #include "mgag200_drv.h" |
20 | 21 | ||
diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c index fca6a1f9c20c..2a03e77abef4 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <drm/drmP.h> | 27 | #include <drm/drmP.h> |
28 | #include <drm/drm_crtc_helper.h> | 28 | #include <drm/drm_crtc_helper.h> |
29 | #include <drm/drm_plane_helper.h> | ||
29 | 30 | ||
30 | #include "nouveau_drm.h" | 31 | #include "nouveau_drm.h" |
31 | #include "nouveau_reg.h" | 32 | #include "nouveau_reg.h" |
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index ae873d1a8d46..76b8c4f980ea 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <drm/drmP.h> | 27 | #include <drm/drmP.h> |
28 | #include <drm/drm_crtc_helper.h> | 28 | #include <drm/drm_crtc_helper.h> |
29 | #include <drm/drm_plane_helper.h> | ||
29 | #include <drm/drm_dp_helper.h> | 30 | #include <drm/drm_dp_helper.h> |
30 | 31 | ||
31 | #include <nvif/class.h> | 32 | #include <nvif/class.h> |
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index 2d28dc337cfb..b0566a1ca28f 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include "omap_drv.h" | 20 | #include "omap_drv.h" |
21 | 21 | ||
22 | #include <drm/drm_mode.h> | 22 | #include <drm/drm_mode.h> |
23 | #include <drm/drm_plane_helper.h> | ||
23 | #include "drm_crtc.h" | 24 | #include "drm_crtc.h" |
24 | #include "drm_crtc_helper.h" | 25 | #include "drm_crtc_helper.h" |
25 | 26 | ||
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 0d1396266857..8b7892880ad2 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "qxl_drv.h" | 29 | #include "qxl_drv.h" |
30 | #include "qxl_object.h" | 30 | #include "qxl_object.h" |
31 | #include "drm_crtc_helper.h" | 31 | #include "drm_crtc_helper.h" |
32 | #include <drm/drm_plane_helper.h> | ||
32 | 33 | ||
33 | static bool qxl_head_enabled(struct qxl_head *head) | 34 | static bool qxl_head_enabled(struct qxl_head *head) |
34 | { | 35 | { |
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index 00ead8c2758a..f1b0fa1285bb 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <linux/pm_runtime.h> | 33 | #include <linux/pm_runtime.h> |
34 | #include <drm/drm_crtc_helper.h> | 34 | #include <drm/drm_crtc_helper.h> |
35 | #include <drm/drm_plane_helper.h> | ||
35 | #include <drm/drm_edid.h> | 36 | #include <drm/drm_edid.h> |
36 | 37 | ||
37 | #include <linux/gcd.h> | 38 | #include <linux/gcd.h> |
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index 148b50589181..088bfd875d29 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <drm/drm_crtc_helper.h> | 19 | #include <drm/drm_crtc_helper.h> |
20 | #include <drm/drm_fb_cma_helper.h> | 20 | #include <drm/drm_fb_cma_helper.h> |
21 | #include <drm/drm_gem_cma_helper.h> | 21 | #include <drm/drm_gem_cma_helper.h> |
22 | #include <drm/drm_plane_helper.h> | ||
22 | 23 | ||
23 | #include "rcar_du_crtc.h" | 24 | #include "rcar_du_crtc.h" |
24 | #include "rcar_du_drv.h" | 25 | #include "rcar_du_drv.h" |
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index 0ddce4d046d9..859ccb658601 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <drm/drm_crtc_helper.h> | 19 | #include <drm/drm_crtc_helper.h> |
20 | #include <drm/drm_fb_cma_helper.h> | 20 | #include <drm/drm_fb_cma_helper.h> |
21 | #include <drm/drm_gem_cma_helper.h> | 21 | #include <drm/drm_gem_cma_helper.h> |
22 | #include <drm/drm_plane_helper.h> | ||
22 | 23 | ||
23 | #include <video/sh_mobile_meram.h> | 24 | #include <video/sh_mobile_meram.h> |
24 | 25 | ||
diff --git a/drivers/gpu/drm/sti/sti_drm_crtc.c b/drivers/gpu/drm/sti/sti_drm_crtc.c index d2ae0c0e13be..36a1ad3c4823 100644 --- a/drivers/gpu/drm/sti/sti_drm_crtc.c +++ b/drivers/gpu/drm/sti/sti_drm_crtc.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <drm/drmP.h> | 11 | #include <drm/drmP.h> |
12 | #include <drm/drm_crtc_helper.h> | 12 | #include <drm/drm_crtc_helper.h> |
13 | #include <drm/drm_plane_helper.h> | ||
13 | 14 | ||
14 | #include "sti_compositor.h" | 15 | #include "sti_compositor.h" |
15 | #include "sti_drm_drv.h" | 16 | #include "sti_drm_drv.h" |
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 6553fd238685..cdfa126a4725 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include "drm.h" | 15 | #include "drm.h" |
16 | #include "gem.h" | 16 | #include "gem.h" |
17 | 17 | ||
18 | #include <drm/drm_plane_helper.h> | ||
19 | |||
18 | struct tegra_dc_soc_info { | 20 | struct tegra_dc_soc_info { |
19 | bool supports_interlacing; | 21 | bool supports_interlacing; |
20 | bool supports_cursor; | 22 | bool supports_cursor; |
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index d642d4a02134..29ec98baffd1 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "drm_flip_work.h" | 18 | #include "drm_flip_work.h" |
19 | #include <drm/drm_plane_helper.h> | ||
19 | 20 | ||
20 | #include "tilcdc_drv.h" | 21 | #include "tilcdc_drv.h" |
21 | #include "tilcdc_regs.h" | 22 | #include "tilcdc_regs.h" |
diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c index dc145d320b25..1701f1dfb23f 100644 --- a/drivers/gpu/drm/udl/udl_modeset.c +++ b/drivers/gpu/drm/udl/udl_modeset.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <drm/drmP.h> | 14 | #include <drm/drmP.h> |
15 | #include <drm/drm_crtc.h> | 15 | #include <drm/drm_crtc.h> |
16 | #include <drm/drm_crtc_helper.h> | 16 | #include <drm/drm_crtc_helper.h> |
17 | #include <drm/drm_plane_helper.h> | ||
17 | #include "udl_drv.h" | 18 | #include "udl_drv.h" |
18 | 19 | ||
19 | /* | 20 | /* |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c index 15e185ae4c99..5c289f748ab4 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | |||
@@ -26,6 +26,7 @@ | |||
26 | **************************************************************************/ | 26 | **************************************************************************/ |
27 | 27 | ||
28 | #include "vmwgfx_kms.h" | 28 | #include "vmwgfx_kms.h" |
29 | #include <drm/drm_plane_helper.h> | ||
29 | 30 | ||
30 | 31 | ||
31 | #define vmw_crtc_to_ldu(x) \ | 32 | #define vmw_crtc_to_ldu(x) \ |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c index b295463a60b3..7dc591d04d9a 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | |||
@@ -26,6 +26,7 @@ | |||
26 | **************************************************************************/ | 26 | **************************************************************************/ |
27 | 27 | ||
28 | #include "vmwgfx_kms.h" | 28 | #include "vmwgfx_kms.h" |
29 | #include <drm/drm_plane_helper.h> | ||
29 | 30 | ||
30 | 31 | ||
31 | #define vmw_crtc_to_sou(x) \ | 32 | #define vmw_crtc_to_sou(x) \ |
diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 9cb222e2996f..2f8007241734 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <drm/drm_crtc_helper.h> | 24 | #include <drm/drm_crtc_helper.h> |
25 | #include <drm/drm_gem_cma_helper.h> | 25 | #include <drm/drm_gem_cma_helper.h> |
26 | #include <drm/drm_fb_cma_helper.h> | 26 | #include <drm/drm_fb_cma_helper.h> |
27 | #include <drm/drm_plane_helper.h> | ||
27 | 28 | ||
28 | #include "imx-drm.h" | 29 | #include "imx-drm.h" |
29 | 30 | ||
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index c40070a92d6b..c3baaee09498 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -880,9 +880,6 @@ extern int drm_crtc_init_with_planes(struct drm_device *dev, | |||
880 | struct drm_plane *primary, | 880 | struct drm_plane *primary, |
881 | struct drm_plane *cursor, | 881 | struct drm_plane *cursor, |
882 | const struct drm_crtc_funcs *funcs); | 882 | const struct drm_crtc_funcs *funcs); |
883 | extern int drm_crtc_init(struct drm_device *dev, | ||
884 | struct drm_crtc *crtc, | ||
885 | const struct drm_crtc_funcs *funcs); | ||
886 | extern void drm_crtc_cleanup(struct drm_crtc *crtc); | 883 | extern void drm_crtc_cleanup(struct drm_crtc *crtc); |
887 | extern unsigned int drm_crtc_index(struct drm_crtc *crtc); | 884 | extern unsigned int drm_crtc_index(struct drm_crtc *crtc); |
888 | 885 | ||
diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h index 52e6870534b2..fa60d19f91c0 100644 --- a/include/drm/drm_plane_helper.h +++ b/include/drm/drm_plane_helper.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #define DRM_PLANE_HELPER_H | 25 | #define DRM_PLANE_HELPER_H |
26 | 26 | ||
27 | #include <drm/drm_rect.h> | 27 | #include <drm/drm_rect.h> |
28 | #include <drm/drm_crtc.h> | ||
28 | 29 | ||
29 | /* | 30 | /* |
30 | * Drivers that don't allow primary plane scaling may pass this macro in place | 31 | * Drivers that don't allow primary plane scaling may pass this macro in place |
@@ -42,6 +43,10 @@ | |||
42 | * planes. | 43 | * planes. |
43 | */ | 44 | */ |
44 | 45 | ||
46 | extern int drm_crtc_init(struct drm_device *dev, | ||
47 | struct drm_crtc *crtc, | ||
48 | const struct drm_crtc_funcs *funcs); | ||
49 | |||
45 | extern int drm_plane_helper_check_update(struct drm_plane *plane, | 50 | extern int drm_plane_helper_check_update(struct drm_plane *plane, |
46 | struct drm_crtc *crtc, | 51 | struct drm_crtc *crtc, |
47 | struct drm_framebuffer *fb, | 52 | struct drm_framebuffer *fb, |