forked from Minki/linux
8796933843
As we are going to add support for the Allwinner DE2 engine in sun4i-drm driver, we will finally have two types of display engines -- the DE1 backend and the DE2 mixer. They both do some display blending and feed graphics data to TCON, and is part of the "Display Engine" called by Allwinner, so I choose to call them both "engine" here. Abstract the engine type to a new struct with an ops struct, which contains functions that should be called outside the engine-specified code (in TCON, CRTC or TV Encoder code). In order to preserve bisectability, we also switch the backend and layer code in its own module. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
35 lines
850 B
C
35 lines
850 B
C
/*
|
|
* Copyright (C) 2015 Free Electrons
|
|
* Copyright (C) 2015 NextThing Co
|
|
*
|
|
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation; either version 2 of
|
|
* the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef _SUN4I_LAYER_H_
|
|
#define _SUN4I_LAYER_H_
|
|
|
|
struct sunxi_engine;
|
|
|
|
struct sun4i_layer {
|
|
struct drm_plane plane;
|
|
struct sun4i_drv *drv;
|
|
struct sun4i_backend *backend;
|
|
int id;
|
|
};
|
|
|
|
static inline struct sun4i_layer *
|
|
plane_to_sun4i_layer(struct drm_plane *plane)
|
|
{
|
|
return container_of(plane, struct sun4i_layer, plane);
|
|
}
|
|
|
|
struct drm_plane **sun4i_layers_init(struct drm_device *drm,
|
|
struct sunxi_engine *engine);
|
|
|
|
#endif /* _SUN4I_LAYER_H_ */
|