]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - drivers/gpu/drm/sun4i/sun4i_layer.h
Merge tag 'mips_fixes_4.17_1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan...
[mirror_ubuntu-jammy-kernel.git] / drivers / gpu / drm / sun4i / sun4i_layer.h
CommitLineData
9026e0d1
MR
1/*
2 * Copyright (C) 2015 Free Electrons
3 * Copyright (C) 2015 NextThing Co
4 *
5 * Maxime Ripard <maxime.ripard@free-electrons.com>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 */
12
13#ifndef _SUN4I_LAYER_H_
14#define _SUN4I_LAYER_H_
15
87969338
IZ
16struct sunxi_engine;
17
9026e0d1
MR
18struct sun4i_layer {
19 struct drm_plane plane;
20 struct sun4i_drv *drv;
ace6c095 21 struct sun4i_backend *backend;
9026e0d1
MR
22 int id;
23};
24
d540f82a
MR
25struct sun4i_layer_state {
26 struct drm_plane_state state;
8f1f2553 27 unsigned int pipe;
ca07b210 28 bool uses_frontend;
d540f82a
MR
29};
30
9026e0d1
MR
31static inline struct sun4i_layer *
32plane_to_sun4i_layer(struct drm_plane *plane)
33{
34 return container_of(plane, struct sun4i_layer, plane);
35}
36
d540f82a
MR
37static inline struct sun4i_layer_state *
38state_to_sun4i_layer_state(struct drm_plane_state *state)
39{
40 return container_of(state, struct sun4i_layer_state, state);
41}
42
7921e147 43struct drm_plane **sun4i_layers_init(struct drm_device *drm,
87969338 44 struct sunxi_engine *engine);
9026e0d1
MR
45
46#endif /* _SUN4I_LAYER_H_ */