drm: sti: clear all mixer control
[deliverable/linux.git] / drivers / gpu / drm / sti / sti_mixer.h
1 /*
2 * Copyright (C) STMicroelectronics SA 2014
3 * Authors: Benjamin Gaignard <benjamin.gaignard@st.com>
4 * Fabien Dessenne <fabien.dessenne@st.com>
5 * for STMicroelectronics.
6 * License terms: GNU General Public License (GPL), version 2
7 */
8
9 #ifndef _STI_MIXER_H_
10 #define _STI_MIXER_H_
11
12 #include <drm/drmP.h>
13
14 #include "sti_layer.h"
15
16 #define to_sti_mixer(x) container_of(x, struct sti_mixer, drm_crtc)
17
18 /**
19 * STI Mixer subdevice structure
20 *
21 * @dev: driver device
22 * @regs: mixer registers
23 * @id: id of the mixer
24 * @drm_crtc: crtc object link to the mixer
25 * @pending_event: set if a flip event is pending on crtc
26 */
27 struct sti_mixer {
28 struct device *dev;
29 void __iomem *regs;
30 int id;
31 struct drm_crtc drm_crtc;
32 struct drm_pending_vblank_event *pending_event;
33 };
34
35 const char *sti_mixer_to_str(struct sti_mixer *mixer);
36
37 struct sti_mixer *sti_mixer_create(struct device *dev, int id,
38 void __iomem *baseaddr);
39
40 int sti_mixer_set_layer_status(struct sti_mixer *mixer,
41 struct sti_layer *layer, bool status);
42 void sti_mixer_clear_all_layers(struct sti_mixer *mixer);
43 int sti_mixer_set_layer_depth(struct sti_mixer *mixer, struct sti_layer *layer);
44 int sti_mixer_active_video_area(struct sti_mixer *mixer,
45 struct drm_display_mode *mode);
46
47 void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable);
48
49 /* depth in Cross-bar control = z order */
50 #define GAM_MIXER_NB_DEPTH_LEVEL 7
51
52 #define STI_MIXER_MAIN 0
53 #define STI_MIXER_AUX 1
54
55 #endif
This page took 0.054599 seconds and 5 git commands to generate.