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>
tirimbino
Daniel Vetter 10 years ago
parent bbf0ef0334
commit 3cb9ae4fd8
  1. 1
      drivers/gpu/drm/armada/armada_crtc.c
  2. 1
      drivers/gpu/drm/ast/ast_mode.c
  3. 1
      drivers/gpu/drm/bochs/bochs_kms.c
  4. 1
      drivers/gpu/drm/cirrus/cirrus_mode.c
  5. 1
      drivers/gpu/drm/gma500/psb_intel_display.c
  6. 1
      drivers/gpu/drm/mgag200/mgag200_mode.c
  7. 1
      drivers/gpu/drm/nouveau/dispnv04/crtc.c
  8. 1
      drivers/gpu/drm/nouveau/nv50_display.c
  9. 1
      drivers/gpu/drm/omapdrm/omap_crtc.c
  10. 1
      drivers/gpu/drm/qxl/qxl_display.c
  11. 1
      drivers/gpu/drm/radeon/radeon_display.c
  12. 1
      drivers/gpu/drm/rcar-du/rcar_du_crtc.c
  13. 1
      drivers/gpu/drm/shmobile/shmob_drm_crtc.c
  14. 1
      drivers/gpu/drm/sti/sti_drm_crtc.c
  15. 2
      drivers/gpu/drm/tegra/dc.c
  16. 1
      drivers/gpu/drm/tilcdc/tilcdc_crtc.c
  17. 1
      drivers/gpu/drm/udl/udl_modeset.c
  18. 1
      drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
  19. 1
      drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
  20. 1
      drivers/staging/imx-drm/imx-drm-core.c
  21. 3
      include/drm/drm_crtc.h
  22. 5
      include/drm/drm_plane_helper.h

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -880,9 +880,6 @@ extern int drm_crtc_init_with_planes(struct drm_device *dev,
struct drm_plane *primary,
struct drm_plane *cursor,
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 unsigned int drm_crtc_index(struct drm_crtc *crtc);

@ -25,6 +25,7 @@
#define DRM_PLANE_HELPER_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
@ -42,6 +43,10 @@
* 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,
struct drm_crtc *crtc,
struct drm_framebuffer *fb,

Loading…
Cancel
Save