drm/rcar-du: Create rcar_du_planes structure
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sun, 16 Jun 2013 19:02:49 +0000 (21:02 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 9 Aug 2013 21:17:45 +0000 (23:17 +0200)
Move the plane-related fields of struct rcar_du_device to their own
structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_drv.h
drivers/gpu/drm/rcar-du/rcar_du_plane.h

index 7d2320fb948da5068a2199cca8999c9b5a33ed30..0305c21d71f3d09de6360e9651bf8ccf1a5fe572 100644 (file)
@@ -15,7 +15,6 @@
 #define __RCAR_DU_DRV_H__
 
 #include <linux/kernel.h>
-#include <linux/mutex.h>
 #include <linux/platform_data/rcar-du.h>
 
 #include "rcar_du_crtc.h"
@@ -49,15 +48,7 @@ struct rcar_du_device {
        unsigned int used_crtcs;
        unsigned int num_crtcs;
 
-       struct {
-               struct rcar_du_plane planes[RCAR_DU_NUM_SW_PLANES];
-               unsigned int free;
-               struct mutex lock;
-
-               struct drm_property *alpha;
-               struct drm_property *colorkey;
-               struct drm_property *zpos;
-       } planes;
+       struct rcar_du_planes planes;
 };
 
 static inline bool rcar_du_has(struct rcar_du_device *rcdu,
index 5397dba2fe5795fe64844efaedbbfe7ead226435..5c8488ca019fb369c8b823e206d9ff561fcc9e15 100644 (file)
 #ifndef __RCAR_DU_PLANE_H__
 #define __RCAR_DU_PLANE_H__
 
-struct drm_crtc;
-struct drm_framebuffer;
+#include <linux/mutex.h>
+
+#include <drm/drmP.h>
+#include <drm/drm_crtc.h>
+
 struct rcar_du_device;
 struct rcar_du_format_info;
 
@@ -54,6 +57,16 @@ struct rcar_du_plane {
        unsigned int dst_y;
 };
 
+struct rcar_du_planes {
+       struct rcar_du_plane planes[RCAR_DU_NUM_SW_PLANES];
+       unsigned int free;
+       struct mutex lock;
+
+       struct drm_property *alpha;
+       struct drm_property *colorkey;
+       struct drm_property *zpos;
+};
+
 int rcar_du_plane_init(struct rcar_du_device *rcdu);
 int rcar_du_plane_register(struct rcar_du_device *rcdu);
 void rcar_du_plane_setup(struct rcar_du_plane *plane);