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>
This commit is contained in:
Daniel Vetter 2014-10-29 10:03:57 +01:00
parent bbf0ef0334
commit 3cb9ae4fd8
22 changed files with 26 additions and 3 deletions

View file

@ -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"

View file

@ -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"

View file

@ -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;

View file

@ -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>

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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>

View file

@ -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"

View file

@ -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)
{ {

View file

@ -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>

View file

@ -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"

View file

@ -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>

View file

@ -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"

View file

@ -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;

View file

@ -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"

View file

@ -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"
/* /*

View file

@ -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) \

View file

@ -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) \

View file

@ -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"

View file

@ -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);

View file

@ -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,