summary refs log tree commit diff
path: root/drivers/gpu/drm/sun4i/sun4i_crtc.h
diff options
context:
space:
mode:
authorIcenowy Zheng <icenowy@aosc.io>2017-05-17 22:47:17 +0800
committerMaxime Ripard <maxime.ripard@free-electrons.com>2017-06-01 09:47:23 +0200
commit87969338436710638076d8083dda8b0de703f4a5 (patch)
tree9157bb21d79e5a8297a3964f84d41c8b5a9bc82e /drivers/gpu/drm/sun4i/sun4i_crtc.h
parent7921e1477a5327ff22cc38a0ec74ace5d26dbba9 (diff)
downloadlinux-87969338436710638076d8083dda8b0de703f4a5.tar.gz
drm/sun4i: abstract a engine type
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>
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun4i_crtc.h')
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_crtc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.h b/drivers/gpu/drm/sun4i/sun4i_crtc.h
index 4dae3508424a..bf0ce36eb518 100644
--- a/drivers/gpu/drm/sun4i/sun4i_crtc.h
+++ b/drivers/gpu/drm/sun4i/sun4i_crtc.h
@@ -17,7 +17,7 @@ struct sun4i_crtc {
 	struct drm_crtc			crtc;
 	struct drm_pending_vblank_event	*event;
 
-	struct sun4i_backend		*backend;
+	struct sunxi_engine		*engine;
 	struct sun4i_tcon		*tcon;
 };
 
@@ -27,7 +27,7 @@ static inline struct sun4i_crtc *drm_crtc_to_sun4i_crtc(struct drm_crtc *crtc)
 }
 
 struct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm,
-				   struct sun4i_backend *backend,
+				   struct sunxi_engine *engine,
 				   struct sun4i_tcon *tcon);
 
 #endif /* _SUN4I_CRTC_H_ */