Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+26 -3
+1
drivers/gpu/drm/armada/armada_crtc.c
··· 12 12 #include <linux/platform_device.h> 13 13 #include <drm/drmP.h> 14 14 #include <drm/drm_crtc_helper.h> 15 + #include <drm/drm_plane_helper.h> 15 16 #include "armada_crtc.h" 16 17 #include "armada_drm.h" 17 18 #include "armada_fb.h"
+1
drivers/gpu/drm/ast/ast_mode.c
··· 31 31 #include <drm/drmP.h> 32 32 #include <drm/drm_crtc.h> 33 33 #include <drm/drm_crtc_helper.h> 34 + #include <drm/drm_plane_helper.h> 34 35 #include "ast_drv.h" 35 36 36 37 #include "ast_tables.h"
+1
drivers/gpu/drm/bochs/bochs_kms.c
··· 6 6 */ 7 7 8 8 #include "bochs.h" 9 + #include <drm/drm_plane_helper.h> 9 10 10 11 static int defx = 1024; 11 12 static int defy = 768;
+1
drivers/gpu/drm/cirrus/cirrus_mode.c
··· 16 16 */ 17 17 #include <drm/drmP.h> 18 18 #include <drm/drm_crtc_helper.h> 19 + #include <drm/drm_plane_helper.h> 19 20 20 21 #include <video/cirrus.h> 21 22
+1
drivers/gpu/drm/gma500/psb_intel_display.c
··· 21 21 #include <linux/i2c.h> 22 22 23 23 #include <drm/drmP.h> 24 + #include <drm/drm_plane_helper.h> 24 25 #include "framebuffer.h" 25 26 #include "psb_drv.h" 26 27 #include "psb_intel_drv.h"
+1
drivers/gpu/drm/mgag200/mgag200_mode.c
··· 15 15 16 16 #include <drm/drmP.h> 17 17 #include <drm/drm_crtc_helper.h> 18 + #include <drm/drm_plane_helper.h> 18 19 19 20 #include "mgag200_drv.h" 20 21
+1
drivers/gpu/drm/nouveau/dispnv04/crtc.c
··· 26 26 27 27 #include <drm/drmP.h> 28 28 #include <drm/drm_crtc_helper.h> 29 + #include <drm/drm_plane_helper.h> 29 30 30 31 #include "nouveau_drm.h" 31 32 #include "nouveau_reg.h"
+1
drivers/gpu/drm/nouveau/nv50_display.c
··· 26 26 27 27 #include <drm/drmP.h> 28 28 #include <drm/drm_crtc_helper.h> 29 + #include <drm/drm_plane_helper.h> 29 30 #include <drm/drm_dp_helper.h> 30 31 31 32 #include <nvif/class.h>
+1
drivers/gpu/drm/omapdrm/omap_crtc.c
··· 20 20 #include "omap_drv.h" 21 21 22 22 #include <drm/drm_mode.h> 23 + #include <drm/drm_plane_helper.h> 23 24 #include "drm_crtc.h" 24 25 #include "drm_crtc_helper.h" 25 26
+1
drivers/gpu/drm/qxl/qxl_display.c
··· 29 29 #include "qxl_drv.h" 30 30 #include "qxl_object.h" 31 31 #include "drm_crtc_helper.h" 32 + #include <drm/drm_plane_helper.h> 32 33 33 34 static bool qxl_head_enabled(struct qxl_head *head) 34 35 {
+1
drivers/gpu/drm/radeon/radeon_display.c
··· 32 32 33 33 #include <linux/pm_runtime.h> 34 34 #include <drm/drm_crtc_helper.h> 35 + #include <drm/drm_plane_helper.h> 35 36 #include <drm/drm_edid.h> 36 37 37 38 #include <linux/gcd.h>
+1
drivers/gpu/drm/rcar-du/rcar_du_crtc.c
··· 19 19 #include <drm/drm_crtc_helper.h> 20 20 #include <drm/drm_fb_cma_helper.h> 21 21 #include <drm/drm_gem_cma_helper.h> 22 + #include <drm/drm_plane_helper.h> 22 23 23 24 #include "rcar_du_crtc.h" 24 25 #include "rcar_du_drv.h"
+1
drivers/gpu/drm/shmobile/shmob_drm_crtc.c
··· 19 19 #include <drm/drm_crtc_helper.h> 20 20 #include <drm/drm_fb_cma_helper.h> 21 21 #include <drm/drm_gem_cma_helper.h> 22 + #include <drm/drm_plane_helper.h> 22 23 23 24 #include <video/sh_mobile_meram.h> 24 25
+1
drivers/gpu/drm/sti/sti_drm_crtc.c
··· 10 10 11 11 #include <drm/drmP.h> 12 12 #include <drm/drm_crtc_helper.h> 13 + #include <drm/drm_plane_helper.h> 13 14 14 15 #include "sti_compositor.h" 15 16 #include "sti_drm_drv.h"
+2
drivers/gpu/drm/tegra/dc.c
··· 15 15 #include "drm.h" 16 16 #include "gem.h" 17 17 18 + #include <drm/drm_plane_helper.h> 19 + 18 20 struct tegra_dc_soc_info { 19 21 bool supports_interlacing; 20 22 bool supports_cursor;
+1
drivers/gpu/drm/tilcdc/tilcdc_crtc.c
··· 16 16 */ 17 17 18 18 #include "drm_flip_work.h" 19 + #include <drm/drm_plane_helper.h> 19 20 20 21 #include "tilcdc_drv.h" 21 22 #include "tilcdc_regs.h"
+1
drivers/gpu/drm/udl/udl_modeset.c
··· 14 14 #include <drm/drmP.h> 15 15 #include <drm/drm_crtc.h> 16 16 #include <drm/drm_crtc_helper.h> 17 + #include <drm/drm_plane_helper.h> 17 18 #include "udl_drv.h" 18 19 19 20 /*
+1
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
··· 26 26 **************************************************************************/ 27 27 28 28 #include "vmwgfx_kms.h" 29 + #include <drm/drm_plane_helper.h> 29 30 30 31 31 32 #define vmw_crtc_to_ldu(x) \
+1
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
··· 26 26 **************************************************************************/ 27 27 28 28 #include "vmwgfx_kms.h" 29 + #include <drm/drm_plane_helper.h> 29 30 30 31 31 32 #define vmw_crtc_to_sou(x) \
+1
drivers/staging/imx-drm/imx-drm-core.c
··· 24 24 #include <drm/drm_crtc_helper.h> 25 25 #include <drm/drm_gem_cma_helper.h> 26 26 #include <drm/drm_fb_cma_helper.h> 27 + #include <drm/drm_plane_helper.h> 27 28 28 29 #include "imx-drm.h" 29 30
-3
include/drm/drm_crtc.h
··· 880 880 struct drm_plane *primary, 881 881 struct drm_plane *cursor, 882 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 883 extern void drm_crtc_cleanup(struct drm_crtc *crtc); 887 884 extern unsigned int drm_crtc_index(struct drm_crtc *crtc); 888 885
+5
include/drm/drm_plane_helper.h
··· 25 25 #define DRM_PLANE_HELPER_H 26 26 27 27 #include <drm/drm_rect.h> 28 + #include <drm/drm_crtc.h> 28 29 29 30 /* 30 31 * Drivers that don't allow primary plane scaling may pass this macro in place ··· 42 41 * Helper functions to assist with creation and handling of CRTC primary 43 42 * planes. 44 43 */ 44 + 45 + extern int drm_crtc_init(struct drm_device *dev, 46 + struct drm_crtc *crtc, 47 + const struct drm_crtc_funcs *funcs); 45 48 46 49 extern int drm_plane_helper_check_update(struct drm_plane *plane, 47 50 struct drm_crtc *crtc,