Commit ae425b6a authored by Laurent Pinchart's avatar Laurent Pinchart

drm/rcar-du: Create rcar_du_planes structure

Move the plane-related fields of struct rcar_du_device to their own
structure.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
parent 9194731c
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#define __RCAR_DU_DRV_H__ #define __RCAR_DU_DRV_H__
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/platform_data/rcar-du.h> #include <linux/platform_data/rcar-du.h>
#include "rcar_du_crtc.h" #include "rcar_du_crtc.h"
...@@ -49,15 +48,7 @@ struct rcar_du_device { ...@@ -49,15 +48,7 @@ struct rcar_du_device {
unsigned int used_crtcs; unsigned int used_crtcs;
unsigned int num_crtcs; unsigned int num_crtcs;
struct { struct rcar_du_planes 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;
} planes;
}; };
static inline bool rcar_du_has(struct rcar_du_device *rcdu, static inline bool rcar_du_has(struct rcar_du_device *rcdu,
......
...@@ -14,8 +14,11 @@ ...@@ -14,8 +14,11 @@
#ifndef __RCAR_DU_PLANE_H__ #ifndef __RCAR_DU_PLANE_H__
#define __RCAR_DU_PLANE_H__ #define __RCAR_DU_PLANE_H__
struct drm_crtc; #include <linux/mutex.h>
struct drm_framebuffer;
#include <drm/drmP.h>
#include <drm/drm_crtc.h>
struct rcar_du_device; struct rcar_du_device;
struct rcar_du_format_info; struct rcar_du_format_info;
...@@ -54,6 +57,16 @@ struct rcar_du_plane { ...@@ -54,6 +57,16 @@ struct rcar_du_plane {
unsigned int dst_y; 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_init(struct rcar_du_device *rcdu);
int rcar_du_plane_register(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); void rcar_du_plane_setup(struct rcar_du_plane *plane);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment