Browse Source

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>
Daniel Vetter 10 years ago
parent
commit
3cb9ae4fd8

+ 1 - 0
drivers/gpu/drm/armada/armada_crtc.c

@@ -12,6 +12,7 @@
 #include <linux/platform_device.h>
 #include <linux/platform_device.h>
 #include <drm/drmP.h>
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_plane_helper.h>
 #include "armada_crtc.h"
 #include "armada_crtc.h"
 #include "armada_drm.h"
 #include "armada_drm.h"
 #include "armada_fb.h"
 #include "armada_fb.h"

+ 1 - 0
drivers/gpu/drm/ast/ast_mode.c

@@ -31,6 +31,7 @@
 #include <drm/drmP.h>
 #include <drm/drmP.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_plane_helper.h>
 #include "ast_drv.h"
 #include "ast_drv.h"
 
 
 #include "ast_tables.h"
 #include "ast_tables.h"

+ 1 - 0
drivers/gpu/drm/bochs/bochs_kms.c

@@ -6,6 +6,7 @@
  */
  */
 
 
 #include "bochs.h"
 #include "bochs.h"
+#include <drm/drm_plane_helper.h>
 
 
 static int defx = 1024;
 static int defx = 1024;
 static int defy = 768;
 static int defy = 768;

+ 1 - 0
drivers/gpu/drm/cirrus/cirrus_mode.c

@@ -16,6 +16,7 @@
  */
  */
 #include <drm/drmP.h>
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_plane_helper.h>
 
 
 #include <video/cirrus.h>
 #include <video/cirrus.h>
 
 

+ 1 - 0
drivers/gpu/drm/gma500/psb_intel_display.c

@@ -21,6 +21,7 @@
 #include <linux/i2c.h>
 #include <linux/i2c.h>
 
 
 #include <drm/drmP.h>
 #include <drm/drmP.h>
+#include <drm/drm_plane_helper.h>
 #include "framebuffer.h"
 #include "framebuffer.h"
 #include "psb_drv.h"
 #include "psb_drv.h"
 #include "psb_intel_drv.h"
 #include "psb_intel_drv.h"

+ 1 - 0
drivers/gpu/drm/mgag200/mgag200_mode.c

@@ -15,6 +15,7 @@
 
 
 #include <drm/drmP.h>
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_plane_helper.h>
 
 
 #include "mgag200_drv.h"
 #include "mgag200_drv.h"
 
 

+ 1 - 0
drivers/gpu/drm/nouveau/dispnv04/crtc.c

@@ -26,6 +26,7 @@
 
 
 #include <drm/drmP.h>
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_plane_helper.h>
 
 
 #include "nouveau_drm.h"
 #include "nouveau_drm.h"
 #include "nouveau_reg.h"
 #include "nouveau_reg.h"

+ 1 - 0
drivers/gpu/drm/nouveau/nv50_display.c

@@ -26,6 +26,7 @@
 
 
 #include <drm/drmP.h>
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_plane_helper.h>
 #include <drm/drm_dp_helper.h>
 #include <drm/drm_dp_helper.h>
 
 
 #include <nvif/class.h>
 #include <nvif/class.h>

+ 1 - 0
drivers/gpu/drm/omapdrm/omap_crtc.c

@@ -20,6 +20,7 @@
 #include "omap_drv.h"
 #include "omap_drv.h"
 
 
 #include <drm/drm_mode.h>
 #include <drm/drm_mode.h>
+#include <drm/drm_plane_helper.h>
 #include "drm_crtc.h"
 #include "drm_crtc.h"
 #include "drm_crtc_helper.h"
 #include "drm_crtc_helper.h"
 
 

+ 1 - 0
drivers/gpu/drm/qxl/qxl_display.c

@@ -29,6 +29,7 @@
 #include "qxl_drv.h"
 #include "qxl_drv.h"
 #include "qxl_object.h"
 #include "qxl_object.h"
 #include "drm_crtc_helper.h"
 #include "drm_crtc_helper.h"
+#include <drm/drm_plane_helper.h>
 
 
 static bool qxl_head_enabled(struct qxl_head *head)
 static bool qxl_head_enabled(struct qxl_head *head)
 {
 {

+ 1 - 0
drivers/gpu/drm/radeon/radeon_display.c

@@ -32,6 +32,7 @@
 
 
 #include <linux/pm_runtime.h>
 #include <linux/pm_runtime.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_plane_helper.h>
 #include <drm/drm_edid.h>
 #include <drm/drm_edid.h>
 
 
 #include <linux/gcd.h>
 #include <linux/gcd.h>

+ 1 - 0
drivers/gpu/drm/rcar-du/rcar_du_crtc.c

@@ -19,6 +19,7 @@
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_cma_helper.h>
+#include <drm/drm_plane_helper.h>
 
 
 #include "rcar_du_crtc.h"
 #include "rcar_du_crtc.h"
 #include "rcar_du_drv.h"
 #include "rcar_du_drv.h"

+ 1 - 0
drivers/gpu/drm/shmobile/shmob_drm_crtc.c

@@ -19,6 +19,7 @@
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_cma_helper.h>
+#include <drm/drm_plane_helper.h>
 
 
 #include <video/sh_mobile_meram.h>
 #include <video/sh_mobile_meram.h>
 
 

+ 1 - 0
drivers/gpu/drm/sti/sti_drm_crtc.c

@@ -10,6 +10,7 @@
 
 
 #include <drm/drmP.h>
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_plane_helper.h>
 
 
 #include "sti_compositor.h"
 #include "sti_compositor.h"
 #include "sti_drm_drv.h"
 #include "sti_drm_drv.h"

+ 2 - 0
drivers/gpu/drm/tegra/dc.c

@@ -15,6 +15,8 @@
 #include "drm.h"
 #include "drm.h"
 #include "gem.h"
 #include "gem.h"
 
 
+#include <drm/drm_plane_helper.h>
+
 struct tegra_dc_soc_info {
 struct tegra_dc_soc_info {
 	bool supports_interlacing;
 	bool supports_interlacing;
 	bool supports_cursor;
 	bool supports_cursor;

+ 1 - 0
drivers/gpu/drm/tilcdc/tilcdc_crtc.c

@@ -16,6 +16,7 @@
  */
  */
 
 
 #include "drm_flip_work.h"
 #include "drm_flip_work.h"
+#include <drm/drm_plane_helper.h>
 
 
 #include "tilcdc_drv.h"
 #include "tilcdc_drv.h"
 #include "tilcdc_regs.h"
 #include "tilcdc_regs.h"

+ 1 - 0
drivers/gpu/drm/udl/udl_modeset.c

@@ -14,6 +14,7 @@
 #include <drm/drmP.h>
 #include <drm/drmP.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_plane_helper.h>
 #include "udl_drv.h"
 #include "udl_drv.h"
 
 
 /*
 /*

+ 1 - 0
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c

@@ -26,6 +26,7 @@
  **************************************************************************/
  **************************************************************************/
 
 
 #include "vmwgfx_kms.h"
 #include "vmwgfx_kms.h"
+#include <drm/drm_plane_helper.h>
 
 
 
 
 #define vmw_crtc_to_ldu(x) \
 #define vmw_crtc_to_ldu(x) \

+ 1 - 0
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c

@@ -26,6 +26,7 @@
  **************************************************************************/
  **************************************************************************/
 
 
 #include "vmwgfx_kms.h"
 #include "vmwgfx_kms.h"
+#include <drm/drm_plane_helper.h>
 
 
 
 
 #define vmw_crtc_to_sou(x) \
 #define vmw_crtc_to_sou(x) \

+ 1 - 0
drivers/staging/imx-drm/imx-drm-core.c

@@ -24,6 +24,7 @@
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_plane_helper.h>
 
 
 #include "imx-drm.h"
 #include "imx-drm.h"
 
 

+ 0 - 3
include/drm/drm_crtc.h

@@ -880,9 +880,6 @@ extern int drm_crtc_init_with_planes(struct drm_device *dev,
 				     struct drm_plane *primary,
 				     struct drm_plane *primary,
 				     struct drm_plane *cursor,
 				     struct drm_plane *cursor,
 				     const struct drm_crtc_funcs *funcs);
 				     const struct drm_crtc_funcs *funcs);
-extern int drm_crtc_init(struct drm_device *dev,
-			 struct drm_crtc *crtc,
-			 const struct drm_crtc_funcs *funcs);
 extern void drm_crtc_cleanup(struct drm_crtc *crtc);
 extern void drm_crtc_cleanup(struct drm_crtc *crtc);
 extern unsigned int drm_crtc_index(struct drm_crtc *crtc);
 extern unsigned int drm_crtc_index(struct drm_crtc *crtc);
 
 

+ 5 - 0
include/drm/drm_plane_helper.h

@@ -25,6 +25,7 @@
 #define DRM_PLANE_HELPER_H
 #define DRM_PLANE_HELPER_H
 
 
 #include <drm/drm_rect.h>
 #include <drm/drm_rect.h>
+#include <drm/drm_crtc.h>
 
 
 /*
 /*
  * Drivers that don't allow primary plane scaling may pass this macro in place
  * Drivers that don't allow primary plane scaling may pass this macro in place
@@ -42,6 +43,10 @@
  * planes.
  * planes.
  */
  */
 
 
+extern int drm_crtc_init(struct drm_device *dev,
+			 struct drm_crtc *crtc,
+			 const struct drm_crtc_funcs *funcs);
+
 extern int drm_plane_helper_check_update(struct drm_plane *plane,
 extern int drm_plane_helper_check_update(struct drm_plane *plane,
 					 struct drm_crtc *crtc,
 					 struct drm_crtc *crtc,
 					 struct drm_framebuffer *fb,
 					 struct drm_framebuffer *fb,